Introduction
Automation Platform
Botmain DAO
Building Trading Strategies
API References Dev Live Stream
@botmain/common / Class

DailyBarsProvider

No documentation has been provided.

Properties

NameTypeDescription
count
number

The actual number of daily bars in the stack

stackSize
number

Capacity of historical data stack. The maximum number of daily bars available to the strategy via lookback

today
Bar

Today's bar. If an intraday or ticks subscription exists, this property is updated automatically during the day from intraday bars or from trades

yesterday
Bar

Previous trading day bar

Methods

atDate()

Gets the historical bar on the given date.

Presentation
atDate(date: Date): Bar;
Parameters
NameTypeDescription
date
Date

The date of the bar to retrieve. The date must be within the stack size (if called on the first bar in a run)

Returns

Bar

daysAgo()

The number of days back to retrieve data. Zero means the current day.

Presentation
daysAgo(lookback: number): Bar;
Parameters
NameTypeDescription
lookback
number

the number of days back to retrieve data. This value must not exceed the stack size (if called on the first bar in a run).

Returns

Bar

monthsAgo()

The number of months back to retrieve data. Zero means the current month.

Presentation
monthsAgo(lookback: number): Bar;
Parameters
NameTypeDescription
lookback
number

the number of months back to retrieve data. The total number of days must not exceed the stack size (if called on the first bar in a run).

Returns

Bar

quartersAgo()

The number of quarters back to retrieve data. Zero means the current quarter.

Presentation
quartersAgo(lookback: number): Bar;
Parameters
NameTypeDescription
lookback
number

the number of quarters back to retrieve data. The total number of days must not exceed the stack size (if called on the first bar in a run).

Returns

Bar

weeksAgo()

The number of weeks back to retrieve data. Zero means the current week.

Presentation
weeksAgo(lookback: number): Bar;
Parameters
NameTypeDescription
lookback
number

the number of weeks back to retrieve data. The total number of days must not exceed the stack size (if called on the first bar in a run).

Returns

Bar