if (CurrentBars[0] < RangeBars || CurrentBars[1] < RangeBars*5 )
return;
The strategy can be enabled and all seems fine, but the strategy will not execute any trades. The reason is that the CurrentBars[1] is lagging far behiind the CurrentBars[0] count. When I debug I'll see that my CurrentBars[0] is correctly above 10,000 because the script has gone through the chart historical data which is set to load 200 days. Unfortunately the CurrentBars[1] is a much lower count and no where near satisfying my check above. This means that the script will not execute my trade logic and would need to wait until the 50,000 count is reached at some later point to start executing trade logic.
How do I get the secondary series historical data to sync up like primary series? I have tries adding both series to the chart which I initiate strategy, but no luck. The strategy would take many days of running before the CurrentBars[1] count is reached.
Comment