AddBar()

View as Markdown

Definition

Adds new data points for the Bars Type.

Syntax

AddBar(Bars bars, double open, double high, double low, double close, DateTime time, long volume)

AddBar(Bars bars, double open, double high, double low, double close, DateTime time, long volume, double bid, double ask)

Parameters

barsThe Bars object of your bars type
openA double value representing the open price
highA double value representing the high price
lowA double value representing the low price
closeA double value representing the close price
timeA DateTime value representing the time
volumeA long value representing the volume
bidA double value representing the bid price
askA double value representing the ask price

Examples

1AddBar(bars, open, high, low, close, time, (long)Math.Min(volumeTmp, bars.BarsPeriod.Value));