I am attempting to identify different bar interval openings on a chart. For example, the primary bar series is an M15 EUR/USD chart. On that chart, I would like to identify the Daily Open and the 60 min openings on that M15 EUR/USD chart.
Also of note, is that I will be creating this using Calculate.OnEachTick. I have read the guidance HERE, but am still having trouble. I have tried using additional bar series, but the opening event seems to be off, and I'm wondering if I can get the 60 min opening some way other than using additional bar series?
For the Daily Open, I can find it this way, that does NOT require an additional bar series.
if( Bars.IsFirstBarOfSession ) //Daily Open { if (IsFirstTickOfBar) //ONLY process this ONE TIME as a bar opens. HISTORICALLY, this block is processed I think on the close? { Draw.VerticalLine(this, "D1"+CurrentBar, 0, Brushes.Green, DashStyleHelper.Dot, 1); d1OpenBar = CurrentBar; d1OpenPrice= Open[0]; } }
For the M60 Opening, is there another possible way of doing this reliably w/o needing to add an additional bar series to try and time the opening event?
Comment