Skip to content

Latest commit

 

History

History
executable file
·
105 lines (73 loc) · 3.09 KB

ALGORITHM.md

File metadata and controls

executable file
·
105 lines (73 loc) · 3.09 KB

Classes

Backtest

Incomplete

Scheduler

Used to run functions at specified intervals or times of day.

Backtest

Incomplete

Kind: global class

backtest.run(minute) ⇒ Promise.<Object>

Runs a backtest on the given algorithm.

Kind: instance method of Backtest

Param
minute

Scheduler

Used to run functions at specified intervals or times of day.

Kind: global class

new Scheduler(f)

Creates a new scheduled task

Param Type
f function

scheduler.onMarketOpen(offset) ⇒ Promise.<Date>

Runs every day on market open.

Kind: instance method of Scheduler
Returns: Promise.<Date> - - Date object of next invocation.
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
offset Number The offset, in milliseconds, from market open to run the algorithm. Negative is before, positive is after.

scheduler.onMarketClose(offset) ⇒ Promise.<schedule>

Runs every day on market close.

Kind: instance method of Scheduler
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
offset Number The offset, in milliseconds, from market close to run the algorithm. Negative is before, positive is after.

scheduler.every(minutes, extended)

Runs every 'x' minutes while the market is open.

Kind: instance method of Scheduler
Author: Torrey Leonard https://github.com/Ladinn

Param Type Description
minutes Number
extended Boolean Whether to run during extended trading hours.

scheduler.cancel()

Cancels a job.

Kind: instance method of Scheduler
Author: Torrey Leonard https://github.com/Ladinn

scheduler.getNext() ⇒ Date | Error

Returns the date of the next invocation of the given job.

Kind: instance method of Scheduler
Author: Torrey Leonard https://github.com/Ladinn