Skip to content

Bar

QuantConnect.Data.Market.Bar

Bar()
Bar(open: float, high: float, low: float, close: float)

Bases: Object, IBar

Base Bar Class: Open, High, Low, Close and Period.

Signature descriptions:

  • Default initializer to setup an empty bar.

  • Initializer to setup a bar with a given information.

Parameters:

Name Type Description Default
open Optional[float]

Decimal Opening Price

None
high Optional[float]

Decimal High Price of this bar

None
low Optional[float]

Decimal Low Price of this bar

None
close Optional[float]

Decimal Close price of this bar

None

open

open: float

Opening price of the bar: Defined as the price at the start of the time period.

high

high: float

High price of the bar during the time period.

low

low: float

Low price of the bar during the time period.

close

close: float

Closing price of the bar. Defined as the price at Start Time + TimeSpan.

clone

clone() -> Bar

Returns a clone of this bar

to_string

to_string() -> str

Returns a string that represents the current object.

Returns:

Type Description
str

A string that represents the current object.

update

update(value: float) -> None

Updates the bar with a new value. This will aggregate the OHLC bar

Parameters:

Name Type Description Default
value float

The new value

required