Command | Description |
---|---|
onStrategyStart | Called when the strategy starts running |
onBarOpen(bar) | Called on the leading edge of all bars. The bar argument exposes the date and open properties |
onBar(bar) | Called on the trailing edge of all bars. The bar argument exposes the date, open, high, low, close and volume properties |
onPositionOpened | Called whenever a new position is opened. |
onPositionChanged | Called whenever an existing position is increased or decreased. |
onPositionClosed | Called whenever position is closed. |
onTrade(trade) | Called when a new trade is received. The trade argument exposes the price, size and volume properties |
onQuote(quote) | Called when a new quote (bid/ask) is received. The quote parameter exposes the bid, bidSize, ask and askSize properties |