From 40950c4891fcfa93c4016f7e1b027ab9de05cd31 Mon Sep 17 00:00:00 2001 From: Keivan Ipchi Hagh Date: Thu, 21 Mar 2024 00:52:33 +0330 Subject: [PATCH] feat: update athena protos --- protos/athena/athena.proto | 4 ++-- protos/athena/athena_struct.proto | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/protos/athena/athena.proto b/protos/athena/athena.proto index bddd73d..c7661df 100644 --- a/protos/athena/athena.proto +++ b/protos/athena/athena.proto @@ -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; } diff --git a/protos/athena/athena_struct.proto b/protos/athena/athena_struct.proto index 031dd18..0b00db2 100644 --- a/protos/athena/athena_struct.proto +++ b/protos/athena/athena_struct.proto @@ -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. @@ -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 @@ -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 @@ -58,4 +68,4 @@ message Statistics { int64 n_trades = 3; // Win rate ratio. float win_rate = 4; -} \ No newline at end of file +}