I wonder if you could give some guidance.
I am running a strategy on a 1min chart in NT7 with
CalculateOnBarClose = false;
and use 'FirstTickOfBar' to replicate a bar-close type strategy.I only trade 1 instrument.
In addition to running the strategy on the 1min chart I have also added the following timeframes:
Add(PeriodType.Minute, 15);
Add(PeriodType.Minute, 60);
Add(PeriodType.Day, 1);
I have programmed much of my strategy adding in 15min and 60min data/signals but I seem to have a problem with the daily data.
I have put in a null check as follows ( I require at least 3 days data for the values I would like to calculate using daily data):
if (CurrentBars[3] < 4 ) return;
But when I check the value of CurrentBars[3] in the output window, it never gets above zero - ie it appears that despite having 10 days of data loaded on my 1min chart the CurrentBars[3] array is unable to load for whatever reason. (If I remove the daily data, then my strategy works fine across all 10 days using 1min, 15min, 60min barsarrays.)
Is there a reason why I cannot load daily data on a 1min chart if, for example, 'CalculateOnBarClose = false;'?
I recall that NT6.5 required barsarrays to be loaded in decreasing size order I think - is something similar causing a problem for my data loading here perhaps?
Any tips/guidance much appreciated. Many thanks.
Comment