My strategy involves multiple TFs. I am using Range 1 and 1 Tick timeframes.
I have added 1 Tick as the secondary Timeframe and 1 Range is my primary where I have added my strategy.
It seems like the order in which BarsInProgress is being called is incorrect. In my mind, the 1 Tick should be called first and then the 1 Range.
Just to test things, I added the following code so see how things are,
switch(BarsInProgress)
{
case 0: // 1 Range TF
Print("Range1: Highs="+ Highs[0][0]+"Lows=" +Lows[0][0]);
break;
case 1: // 1 Tick TF
Print("Tick1: Highs="+ Highs[1][0]+"Lows=" +Lows[1][0]);
break;
}
and here is the output I am getting
Tick1: Highs=3828.25Lows=3828.25 <---Correct
Range1: Highs=3828.25Lows=3828 <----Called before 3828 tick is posted
Tick1: Highs=3828Lows=3828 <-----Called after 1 Range has been posted
Range1: Highs=3827.75Lows=3827.5
Tick1: Highs=3828Lows=3828
Tick1: Highs=3828Lows=3828
Tick1: Highs=3827.5Lows=3827.5
Tick1: Highs=3827.5Lows=3827.5
Tick1: Highs=3827.25Lows=3827.25
Tick1: Highs=3827.25Lows=3827.25
Tick1: Highs=3827.25Lows=3827.25
Tick1: Highs=3827.5Lows=3827.5
Tick1: Highs=3827.25Lows=3827.25
Range1: Highs=3827.5Lows=3827.25
Tick1: Highs=3827.5Lows=3827.5
Range1: Highs=3828Lows=3827.75
Tick1: Highs=3828.25Lows=3828.25
Range1: Highs=3828.25Lows=3828
Tick1: Highs=3827.5Lows=3827.5
Range1: Highs=3827.75Lows=3827.5
Tick1: Highs=3827.25Lows=3827.25
Tick1: Highs=3827Lows=3827
Range1: Highs=3827.25Lows=3827
Now, if you look at the pictures attached, you can see the issue, if I am using Tick TF to drive calculations and paint results on 1 range TF then it throws things off.
Because, if you look at the 2nd and 3rd line of the output, Range 1 is called before Tick 1 TF. Shouldn't it be the other way around?
Comment