Apart from Calculate.OnEachTick and Calculate.OnBarClose, what else can change the order in which BarsArray updates trigger where both BarsArrays are the same Instrument and different time-frames? Both of the below sequences were generated in Playback(Historical).
Please find below the sequence of expected behaviour (in line with Working With Multi-Time Frame Objects), with Calculate.OnEachTick and IsFirstTickOfBar is used to identify the close of the 5min BarsArray (BA[0][1]) and the concurrent developing 15min BA[1][0], and in turn the close of the 15min BarsArray (BA[0][1]), and:
- BIP (BarsInProgress) is shown as BarsInProgress, CurrentBars[0], & Times[BarsInProgress][0]
- BA[0] 5min is shown as target barsAgo0 & Times[0][barsAgo0], and
- BA[1] 15min is shown as target barsAgo1 & Times[1][barsAgo1]
[B]BIP[/B] [B]BA[0] 5min[/B] [B]BA[1] 15min[/B] 0 72 (4:05 PM) --> [1](4:00 PM), [0](4:15 PM) 1 72 (4:15 PM) --> [1](4:00 PM), [1](4:00 PM) 0 73 (4:10 PM) --> [1](4:05 PM), [0](4:15 PM) 0 74 (4:15 PM) --> [1](4:10 PM), [0](4:15 PM) 0 75 (4:20 PM) --> [1](4:15 PM), [0](4:30 PM) 1 75 (4:30 PM) --> [1](4:15 PM), [1](4:15 PM) 0 76 (4:25 PM) --> [1](4:20 PM), [0](4:30 PM) 0 77 (4:30 PM) --> [1](4:25 PM), [0](4:30 PM) 0 78 (4:35 PM) --> [1](4:30 PM), [0](4:45 PM) 1 78 (4:45 PM) --> [1](4:30 PM), [1](4:30 PM) 0 79 (4:40 PM) --> [1](4:35 PM), [0](4:45 PM) 0 80 (4:45 PM) --> [1](4:40 PM), [0](4:45 PM) 0 81 (4:50 PM) --> [1](4:45 PM), [0](5:00 PM) 1 81 (5:00 PM) --> [1](4:45 PM), [1](4:45 PM)
[B]BIP[/B] [B]BA[0] 5min[/B] [B]BA[1] 15min[/B] 0 72 (4:05 PM) --> [1](4:00 PM), [0](4:15 PM) 1 72 (4:15 PM) --> [1](4:00 PM), [1](4:00 PM) [B]0[/B] 73 (4:10 PM) --> [1](4:05 PM), [0](4:15 PM) - note 5 consecutive BA[0] updates [B]0[/B] 74 (4:15 PM) --> [1](4:10 PM), [0](4:15 PM) [B]0[/B] 75 (4:20 PM) --> [1](4:15 PM), [0][B](4:15 PM)[/B] [B]0[/B] 76 (4:25 PM) --> [1](4:20 PM), [0][B](4:15 PM)[/B] [B]0[/B] 77 (4:30 PM) --> [1](4:25 PM), [0](4:30 PM) 1 77 (4:30 PM) --> [1](4:25 PM), [1](4:15 PM) - expected to occur after [0][75] 0 78 (4:35 PM) --> [1](4:30 PM), [0][B](4:30 PM)[/B] 0 79 (4:40 PM) --> [1](4:35 PM), [0][B](4:30 PM)[/B] 0 80 (4:45 PM) --> [1](4:40 PM), [0](4:45 PM) 1 80 (4:45 PM) --> [1](4:40 PM), [1](4:30 PM) - expected to occur after [0][78] 0 81 (4:50 PM) --> [1](4:45 PM), [0][B](4:45 PM)[/B] 0 82 (4:55 PM) --> [1](4:50 PM), [0][B](4:45 PM)[/B] 0 83 (5:00 PM) --> [1](4:55 PM), [0](5:00 PM) 1 83 (5:00 PM) --> [1](4:55 PM), [1](4:45 PM) - expected to occur after [0][81] 0 84 (5:05 PM) --> [1](5:00 PM), [0](5:00 PM)
I am sure it is obvious... but I can not crack it.
Any ideas for further investigation are appreciated.
Comment