Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 01:37:16 +0000



Post From: Skip/Cancel Downloading Data During Backtests

[2024-06-19 06:27:21]
gtaranti - Posts: 69
To everybody who finds it useful, I may have found a solution to this problem by enforcing a data recalculate on all my dependent charts in the chartbook and a reload and recalculate on the main chart.
After the end of each backtest I have added code in the custom study that does exactly this:


sc.RecalculateChart(3);
sc.RecalculateChart(4);
sc.RecalculateChart(5);
sc.RecalculateChart(8);
sc.FlagToReloadChartData = 1; // affects only the chart the custom study is running

I've observed that now, after each backtest run, the next backtest starts normally without stalling on the dreaded "Downloading Continuous Contract Data" message.

As a sidenote, I wanted to have the ability through SC API to reload and recalculate a specific chart in the chartbook by having the FlagToReloadChartData as a function, but this works for now as it is.