Skip to content

Commit

Permalink
feat: minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
keivanipchihagh committed Mar 21, 2024
1 parent f3e137f commit 0662e0e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 12 deletions.
4 changes: 2 additions & 2 deletions protos/athena/athena.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ package athena.v1;
import "athena/athena_struct.proto";
import "candlestick_struct.proto";

// GetBacktestRequest
// [message] GetBacktestRequest
message GetBacktestRequest {
// Backtest configurations.
Configuration config = 1;
// Candlesticks data.
repeated Candlestick candlesticks = 2;
}

// GetBacktestResponse
// [message] GetBacktestResponse
message GetBacktestResponse {
// Backtest statistics.
Statistics statistics = 1;
Expand Down
47 changes: 37 additions & 10 deletions protos/candlestick_struct.proto
Original file line number Diff line number Diff line change
@@ -1,20 +1,47 @@
syntax = "proto3";

import "enums_struct.proto";
import "google/protobuf/timestamp.proto";

// Candlestick
// Represents a single candlestick bar with timestamp and other properties.
message Candlestick {
// Candlestick's Timestamp.
google.protobuf.Timestamp timestamp = 1;
// [message] Ohlcv
// Represents open, high, low, close, and volume.
message Ohlcv {
// Candlestick's opening price.
float open = 2;
float open = 1;
// Candlestick's high price.
float high = 3;
float high = 2;
// Candlestick's low price.
float low = 4;
float low = 3;
// Candlestick's closing price.
float close = 5;
float close = 4;
// Traded volume.
float volume = 6;
float volume = 5;
}

// [message] Candlestick
// Represents a single candlestick.
message Candlestick {
// Candlestick's Timestamp.
google.protobuf.Timestamp timestamp = 1;
// Candlestick's open, high, low, close and volume data.
Ohlcv ohlcv = 2;
// Signal
Signal signal = 3;
}

// [message] Signal
// Represents signal for a single.
message Signal {
// Timestamp for when the signal is generated
google.protobuf.Timestamp timestamp = 1;
// Position: Long or short
Position position = 3;
// Side: Buy or sell
Side side = 4;
// Take-profit price
float take_profit = 6;
// Stop-loss price
float stop_loss = 7;
// Confidence percentage [0-1]
float confidence = 5;
}

0 comments on commit 0662e0e

Please sign in to comment.