Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 01:35:41 +0000



Post From: ChartsToReplay setting within n_ACSIL::s_ChartReplayParameters not working

[2023-03-17 15:33:50]
User864728 - Posts: 4
I've updated to v2486 and when I use the below code, 'Charts to Replay' setting is the only one that doesn't change when I trigger a replay through my custom study - so if I forget to change this setting from 'All Charts in Chartbook' to 'Single Chart', I've wasted time running a test since the results produced with the incorrect setting are inaccurate.


SCDateTime ReplayStartDateTime = sc.BaseDateTimeIn[0];
  
n_ACSIL::s_ChartReplayParameters ChartReplayParameters;
ChartReplayParameters.ChartNumber = sc.ChartNumber;
ChartReplayParameters.ReplaySpeed = 100000;
ChartReplayParameters.StartDateTime = ReplayStartDateTime;
ChartReplayParameters.SkipEmptyPeriods = 1;
ChartReplayParameters.ReplayMode = n_ACSIL::ChartReplayModeEnum::REPLAY_MODE_ACCURATE_TRADING_SYSTEM_BACK_TEST;
ChartReplayParameters.ChartsToReplay = n_ACSIL::ChartsToReplayEnum::CHARTS_TO_REPLAY_SINGLE_CHART;
ChartReplayParameters.ClearExistingTradeSimulationDataForSymbolAndTradeAccount = 1;
  
sc.StartChartReplayNew(ChartReplayParameters);