Skip to content

Commit

Permalink
feat: update athena protos
Browse files Browse the repository at this point in the history
  • Loading branch information
keivanipchihagh committed Mar 20, 2024
1 parent b623936 commit 40950c4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions protos/athena/athena.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import "candlestick_struct.proto";

// GetBacktestRequest
message GetBacktestRequest {
// Broker configurations.
Config config = 1;
// Backtest configurations.
BacktestConfig config = 1;
// Candlesticks data.
Candlestick candlesticks = 2;
}
Expand Down
14 changes: 12 additions & 2 deletions protos/athena/athena_struct.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "google/protobuf/timestamp.proto";
package athena.v1;

// Config
message Config {
message BacktestConfig {
// Commission rate charged by the broker for each trade.
float commission = 1;
// Initial balance for trading.
Expand All @@ -31,6 +31,10 @@ message Order {
float stop_loss = 4;
// Take-profit price.
float take_profit = 5;
// Is order contingent.
bool is_contingent = 6;
// Hash.
string hash = 6;
}

// Trade
Expand All @@ -46,6 +50,12 @@ message Trade {
float exit_price = 4;
// The exit time of the trade.
float exit_time = 5;
// Profit/loss in units.
float pl = 6;
// Profit/loss in percentage.
float pl_ptc = 7;
// Hash.
string hash = 8;
}

// Statistics
Expand All @@ -58,4 +68,4 @@ message Statistics {
int64 n_trades = 3;
// Win rate ratio.
float win_rate = 4;
}
}

0 comments on commit 40950c4

Please sign in to comment.