Skip to content

Commit 0662e0e

Browse files
feat: minor improvements
1 parent f3e137f commit 0662e0e

File tree

2 files changed

+39
-12
lines changed

2 files changed

+39
-12
lines changed

protos/athena/athena.proto

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ package athena.v1;
55
import "athena/athena_struct.proto";
66
import "candlestick_struct.proto";
77

8-
// GetBacktestRequest
8+
// [message] GetBacktestRequest
99
message GetBacktestRequest {
1010
// Backtest configurations.
1111
Configuration config = 1;
1212
// Candlesticks data.
1313
repeated Candlestick candlesticks = 2;
1414
}
1515

16-
// GetBacktestResponse
16+
// [message] GetBacktestResponse
1717
message GetBacktestResponse {
1818
// Backtest statistics.
1919
Statistics statistics = 1;

protos/candlestick_struct.proto

+37-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,47 @@
11
syntax = "proto3";
22

3+
import "enums_struct.proto";
34
import "google/protobuf/timestamp.proto";
45

5-
// Candlestick
6-
// Represents a single candlestick bar with timestamp and other properties.
7-
message Candlestick {
8-
// Candlestick's Timestamp.
9-
google.protobuf.Timestamp timestamp = 1;
6+
// [message] Ohlcv
7+
// Represents open, high, low, close, and volume.
8+
message Ohlcv {
109
// Candlestick's opening price.
11-
float open = 2;
10+
float open = 1;
1211
// Candlestick's high price.
13-
float high = 3;
12+
float high = 2;
1413
// Candlestick's low price.
15-
float low = 4;
14+
float low = 3;
1615
// Candlestick's closing price.
17-
float close = 5;
16+
float close = 4;
1817
// Traded volume.
19-
float volume = 6;
18+
float volume = 5;
19+
}
20+
21+
// [message] Candlestick
22+
// Represents a single candlestick.
23+
message Candlestick {
24+
// Candlestick's Timestamp.
25+
google.protobuf.Timestamp timestamp = 1;
26+
// Candlestick's open, high, low, close and volume data.
27+
Ohlcv ohlcv = 2;
28+
// Signal
29+
Signal signal = 3;
30+
}
31+
32+
// [message] Signal
33+
// Represents signal for a single.
34+
message Signal {
35+
// Timestamp for when the signal is generated
36+
google.protobuf.Timestamp timestamp = 1;
37+
// Position: Long or short
38+
Position position = 3;
39+
// Side: Buy or sell
40+
Side side = 4;
41+
// Take-profit price
42+
float take_profit = 6;
43+
// Stop-loss price
44+
float stop_loss = 7;
45+
// Confidence percentage [0-1]
46+
float confidence = 5;
2047
}

0 commit comments

Comments
 (0)