I am not getting the results I expected, and I am guessing that I am not running the indicator on the correct timeframe, because if I change the primary timeframe it changes the results.
My understanding from the documentation is that if we use the construct
if (BarsInProgress == 1)
{
Close[0]
}
Then the [0] in Close[0] is referring only to the timeframe with the 1 index, without using BarsArray[1].
Is this correct? There is no need to use BarsArray[1], because we are inside this construct?
if it is then we should be able to do something from ZlagMATS like this:
if (BarsInProgress == 1)
{
if(ToTime(Time[0]) >= 20000 && ToTime(Time[0]) <= 110000)
Do something....
}
And in the above Time[0] would be referring to the timestamp of the timeframe with the 1 index, without using BarsArray[1].
Is this correct?
I'll leave it at that for now and ask a follow up depending on what the answer is.
I've attached the indicator and Strategy.

Comment