I have some problem with barstype development.
Here is the code.
protected override void OnDataPoint(Bars bars, double open, double high, double low, double close, DateTime time, long volume, bool isBar, double bid, double ask) { if (SessionIterator == null) SessionIterator = new SessionIterator(bars); bool isNewSession = SessionIterator.IsNewSession(time, isBar); if (isNewSession) SessionIterator.GetNextSession(time, isBar); if(isNewSession) { Print("New session "+time); } }
The issue is when I'm running it on CL 12-18 90 Days, I have duplicate records in the Output with the same date.
I have attached output screenshot and cs file with code.
Comment