Havent seen this asked before but i have the following situation.
3 Instruments are added to a screen and i was putting together an indicator to evaluate the 3 bars such as using
BarsArray[1][0] BarsArray[0][0] && BarsArray[2][0] .
Inside these bar's im checking just the close using Closes[1][0], Closes[2][0], Closes[0][0].
As i need to evaluate all at the same time i put a basic sanity check in to state
if (Times[1][0] == Times[0][0] && Times[1][0] == Times[2][0])
{
// Do something.
}
However obviously using this method i do not get all the required bars as sometimes bars are ahead or behind me. In the case that they overlap different sessions for instance they will never get triggered.
What i am wondering is what is the best way to do this to only evaluate if the time is the same.
I presume using GetBars is the best way but does anyone have an example as im only interested if they actually overlap in time producing an evaluation.
Im working on 1 minute bars. Any help appreciated.