Fix initial balance on the backtest + n8n webhook

This commit is contained in:
2025-11-10 18:37:44 +07:00
parent b3f3df5fbc
commit d02a07f86b
2 changed files with 16 additions and 5 deletions

View File

@@ -32,7 +32,7 @@
"WebhookUrl": "https://n8n.kai.managing.live/webhook/fa9308b6-983b-42ec-b085-71599d655951",
"IndicatorRequestWebhookUrl": "https://n8n.kai.managing.live/webhook/3aa07b66-1e64-46a7-8618-af300914cb11",
"Username": "managing-api",
"Password": "mH%g5qr!WvCd6%9Fck22Xo"
"Password": "T259836*PdiV2@%!eR%Qf4"
},
"SqlMonitoring": {
"Enabled": true,

View File

@@ -174,6 +174,7 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
{
Id = entity.Identifier,
Config = JsonConvert.DeserializeObject<TradingBotConfig>(entity.ConfigJson),
Ticker = entity.Ticker,
FinalPnl = entity.FinalPnl,
WinRate = entity.WinRate,
GrowthPercentage = entity.GrowthPercentage,
@@ -190,7 +191,9 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
: null
: null,
Score = entity.Score,
ScoreMessage = entity.ScoreMessage ?? string.Empty
ScoreMessage = entity.ScoreMessage ?? string.Empty,
InitialBalance = entity.InitialBalance,
NetPnl = entity.NetPnl
});
return (mappedBacktests, totalCount);
@@ -247,6 +250,7 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
{
Id = entity.Identifier,
Config = JsonConvert.DeserializeObject<TradingBotConfig>(entity.ConfigJson),
Ticker = entity.Ticker,
FinalPnl = entity.FinalPnl,
WinRate = entity.WinRate,
GrowthPercentage = entity.GrowthPercentage,
@@ -263,7 +267,9 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
: null
: null,
Score = entity.Score,
ScoreMessage = entity.ScoreMessage ?? string.Empty
ScoreMessage = entity.ScoreMessage ?? string.Empty,
InitialBalance = entity.InitialBalance,
NetPnl = entity.NetPnl
});
return (mappedBacktests, totalCount);
@@ -575,7 +581,9 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
Fees = entity.Fees,
SharpeRatio = (double?)entity.SharpeRatio,
Score = entity.Score,
ScoreMessage = entity.ScoreMessage ?? string.Empty
ScoreMessage = entity.ScoreMessage ?? string.Empty,
InitialBalance = entity.InitialBalance,
NetPnl = entity.NetPnl
});
return (mappedBacktests, totalCount);
@@ -699,6 +707,7 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
{
Id = entity.Identifier,
Config = JsonConvert.DeserializeObject<TradingBotConfig>(entity.ConfigJson),
Ticker = entity.Ticker,
FinalPnl = entity.FinalPnl,
WinRate = entity.WinRate,
GrowthPercentage = entity.GrowthPercentage,
@@ -709,7 +718,9 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
Fees = entity.Fees,
SharpeRatio = (double?)entity.SharpeRatio,
Score = entity.Score,
ScoreMessage = entity.ScoreMessage ?? string.Empty
ScoreMessage = entity.ScoreMessage ?? string.Empty,
InitialBalance = entity.InitialBalance,
NetPnl = entity.NetPnl
});
return (mappedBacktests, totalCount);