BarBuilder functions are used exclusively from Bar Type scripts in order to build custom bar types.


Read more: Bar Type Scripts


Sections


Functions

Function Details


Functions


Name

Description

BarBuilderCommitBar()

Commits the current bar being built and start a new one.

double BarBuilderGetClose()

Gets the close of the current bar being built.

long BarBuilderGetEndDateTime()

Gets the end date/time of the current bar being built.

double BarBuilderGetHigh()

Gets the high of the current bar being built.

bool BarBuilderGetIsMissing()

Determines whether the current bar is missing (true) or not (false).

double BarBuilderGetLow()

Gets the low of the current bar being built.

double BarBuilderGetOpen()

Gets the open of the current bar being built.

double BarBuilderGetOpenInterest()

Gets the open interest of the current bar being built.

long BarBuilderGetStartDateTime()

Gets the start date/time of the current bar being built.

double BarBuilderGetVolume()

Gets the volume of the current bar being built.

BarBuilderMergeTick(long, double, long)

Merges a specified tick with the current bar being built.

BarBuilderSetClose(double)

Sets the close of the current bar being built.

BarBuilderSetEndDateTime(long)

Sets the end date/time of the current bar being built.

BarBuilderSetHigh(double)

Sets the high of the current bar being built.

BarBuilderSetIsMissing(bool)

Sets whether the current bar being built is missing.

BarBuilderSetLow(double)

Sets the low of the current bar being built.

BarBuilderSetOpen(double)

Sets the open of the current bar being built.

BarBuilderSetOpenInterest(double)

Sets the open interest of the current bar being built.

BarBuilderSetStartDateTime(long)

Sets the start date/time of the current bar being built.

BarBuilderSetVolume(long)

Sets the volume of the current bar being built.


Function Details


BarBuilderCommitBar()

Commits the current bar being built and start a new one.


Scripts


BarType


double BarBuilderGetClose()

Gets the close of the current bar being built.


Returns


The close of the current bar being built.


Scripts


BarType


long BarBuilderGetEndDateTime()

Gets the end date/time of the current bar being built.


Returns


The end date/time of the current bar being built.


Scripts


BarType


double BarBuilderGetHigh()

Gets the high of the current bar being built.


Returns


The high of the current bar being built.


Scripts


BarType


bool BarBuilderGetIsMissing()

Determines whether the current bar is missing (true) or not (false).


Returns


True if the bar is missing, false otherwise.


Scripts


BarType


double BarBuilderGetLow()

Gets the low of the current bar being built.


Returns


The low of the current bar being built.


Scripts


BarType


double BarBuilderGetOpen()

Gets the open of the current bar being built.


Returns


The open of the current bar being built.


Scripts


BarType


double BarBuilderGetOpenInterest()

Gets the open interest of the current bar being built.


Returns


The open interest of the current bar being built.


Scripts


BarType


long BarBuilderGetStartDateTime()

Gets the start date/time of the current bar being built.


Returns


The start date/time of the current bar being built.


Scripts


BarType


double BarBuilderGetVolume()

Gets the volume of the current bar being built.


Returns


The volume of the current bar being built.


Scripts


BarType


BarBuilderMergeTick(long dateTime, double price, long size)

Merges a specified tick with the current bar being built.


Parameters


Type

Identifier

Description

long

dateTime

The tick date/time

double

price

The tick price

int

size

The tick size


Scripts


BarType


BarBuilderSetClose(double close)

Sets the close of the current bar being built.


Parameters


Type

Identifier

Description

double

close

The bar close


Scripts


BarType


BarBuilderSetEndDateTime(long dateTime)

Sets the end date/time of the current bar being built.


Parameters


Type

Identifier

Description

long

dateTime

The bar end date/time


Scripts


BarType


BarBuilderSetHigh(double high)

Sets the high of the current bar being built.


Parameters


Type

Identifier

Description

double

high

The bar high


Scripts


BarType


BarBuilderSetIsMissing(bool isMissing)

Sets whether the current bar being built is missing.


Parameters


Type

Identifier

Description

bool

isMissing

True if the bar is missing, false otherwise


Scripts


BarType


BarBuilderSetLow(double low)

Sets the low of the current bar being built.


Parameters


Type

Identifier

Description

double

low

The bar low


Scripts


BarType


BarBuilderSetOpen(double open)

Sets the open of the current bar being built.


Parameters


Type

Identifier

Description

double

open

The bar open


Scripts


BarType


BarBuilderSetOpenInterest(double openInterest)

Sets the open interest of the current bar being built.


Parameters


Type

Identifier

Description

double

openInterest

The bar open interest


Scripts


BarType


BarBuilderSetStartDateTime(long dateTime)

Sets the start date/time of the current bar being built.


Parameters


Type

Identifier

Description

long

dateTime

The bar start date/time


Scripts


BarType


BarBuilderSetVolume(long volume)

Sets the volume of the current bar being built.


Parameters


Type

Identifier

Description

long

volume

The bar volume


Scripts


BarType