Support Board
Date/Time: Sun, 06 Jul 2025 10:21:49 +0000
Post From: ASCIL Trade Statistics
[2025-06-29 15:54:19] |
Gradient - Posts: 154 |
Hi, I have a couple questions regarding accessing PnL and other Statistics via ACSIL. Is this information isolated to the live environment? I've run backtests that use the sc.GetTradeStatisticsForSymbolV2 to monitor the running PnL for the purpose of setting a daily limit and periodically this limit is breached. For Example: n_ACSIL::s_TradeStatistics TradeStatistics; if (sc.GetTradeStatisticsForSymbolV2(n_ACSIL::STATS_TYPE_DAILY_ALL_TRADES, TradeStatistics)) { pnl= TradeStatistics.ClosedTradesProfitLoss; } if(pnl <= -dailyDrawdown.GetFloat()){ symbolLimit=1; sc.SetAlert(1,"Symbol Limit Met"); } I've also used the sc.GetTotalNetProfitLossForAllSymbols method as a means of managing exposure across multiple instruments and it too doesn't appear to be working properly during backtesting. For Example: double pnl; int& accountLimit=sc.GetPersistentInt(0); if (sc.IsFullRecalculation){ sc.GetPersistentInt(0)=0; } pnl=sc.GetTotalNetProfitLossForAllSymbols(1); if(pnl <= -accountDrawdown.GetFloat()){ accountLimit=1; sc.SetAlert(1,"Account Limit Met"); } I checked the documentation here:ACSIL Interface Members - Functions: sc.GetTradeStatisticsForSymbolV2() which states to see this link:Automated Trading From an Advanced Custom Study for more information on the method; but these links create a circular reference, they're just pointing to each other. Can someone provide a link to the documentation for retrieving Statistics in both live and simulated trading? Date Time Of Last Edit: 2025-06-29 15:55:13
|
![]() |