OnDataPoint()
OnDataPoint()
Definition
Called for each record in the corresponding base dataset used to build the BarType (i.e., for every tick, minute, or day). The OnDataPoint() method is where you should adjust data points (bar values) of your series through AddBar() and UpdateBar(). See also the BuiltFrom property.
- Historical data processing receives a single update for every base bar determined by the BuiltFrom property.
- When using TickReplay, historical updates will call for every tick handled by the core regardless of the BuiltFrom property defined.
- Once transitioned to real-time, updates will call on every tick processed by the core.
- The bid/ask parameters will ONLY be available historically when using Tick Replay, unless you are using a 1-tick series.
- isBar could be true in case the BarsSeries was internally copied to another BarsSeries and is only needed for IsTimeBased = true BarsTypes (e.g. Second/Minute/Day…).
Method Return Value
This method does not return a value.
Method Parameters
Syntax
You must override the method in your Bars Type with the following syntax.
protected override void OnDataPoint(Bars bars, double open, double high, double low, double close, DateTime time, long volume, bool isBar, double bid, double ask) \{ \}

