OnDataPoint()
<< Click to Display Table of Contents >> OnDataPoint() |
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.
Notes: 1.Historical data processing receives a single update for every base bar determined by the BuiltFrom property 2.When using TickReplay, historical updates will call for every tick handled by the core regardless of the BuiltFrom property defined 3.Once transitioned to real-time, updates will call on every tick processed by the core 4.The bid/ask parameters will ONLY be available historically when using Tick Replay, unless you are using a 1-tick series 5.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...). |
This method does not return a value.
bars |
The Bars object of your bars type |
open |
A double value representing the open price |
high |
A double value representing the high price |
low |
A double value representing the low price |
close |
A double value representing the close price |
time |
A DateTime value representing the time |
volume |
A long value representing the volume |
isBar |
A bool value representing if OnDataPoint should treat the timestamp as an already built bar instead of an intrabar timestamp. |
bid |
A double value representing the bid price |
ask |
A double value representing the ask price |
protected override void OnDataPoint(Bars bars, double open, double high, double low, double close,
DateTime time, long volume, bool isBar, double bid, double ask)
{
}
protected override void OnDataPoint(Bars bars, double open, double high, double low, |