Normally when you want to reference the close of the previous bar, you would use this to get the close of 10 minutes back (with IOG and barmagnifier set on 1 tick):
Code: Select all
If barstatus(1) = 2 then begin
close_10barsback = close[10];
end;
I assumed with IOG and barmagnifier, when I want to get the close of 10 ticks back I would use this:
Code: Select all
close_10ticksback = close[10];
Without the barstatus statement, I would reference the tick data.(every tick is a bar then)
But it seems the close[1] or any reference with [1] is always the barclose of the chart resolution. But when you use for example "close", you will get the close of 1 tick. And with the use of the barstatus statement, you will get the close of the chart resolution (in this case 1 min).
This made me doubt about how this worked in the past, but I could be wrong. Tried solving this with array's but I couldn't find a way to reference past bars without the [10] statement. Which is also used with an array.
Does someone have an idea how to solve this?