At which Barindex do the instruction Barindex refers in the code :
The one of the main timeframe of the graph, or the one of the timeframe of the intruction Timeframe just above ?
In clear, if i have Barindex under the instruction Timeframe (5 minutes, default) and later in the code Barindex under the instruction Timeframe (1 hour, default) ; are those 2 barindex are the same or are their correlated to the timeframe selected just above them with the instruction timeframe ?
Each time frame has its own count.
Backtest this code:
Timeframe(1h,UpdateOnClose)
Bar1h = BarIndex
Timeframe(5mn,UpdateOnClose)
Bar5mn= BarIndex
Timeframe (default)
buy at -close limit
Graph Bar1h
Graph Bar5mn