Primitives
cancelOrder
Cancels all pending orders after a specified time period. This helps manage risk by ensuring orders don't stay open indefinitely.
cancelOrder (all)
Cancels all pending orders after a specified time period. This helps manage risk by ensuring orders don't stay open indefinitely.
Input parameters
| Prop | Type | Default | Description |
|---|---|---|---|
afterSeconds* | number | The number of seconds to wait before canceling orders | |
transmit | boolean | true | Whether to transmit the cancel order immediately |
SQL example
IF cancelOrder afterSeconds=300
TICK price > 100 THEN cancelOrder SET transmit=true
POS pnlTicks > 5 THEN cancelOrder SET transmit=truebreakEven
Position management algorithm that moves the stop loss to the entry price (break-even) once the position has moved in profit by a specified number of ticks. This helps protect profits while letting winning trades run.
coolDown
Enforces a minimum time period between trades to prevent over-trading. This helps manage risk by ensuring sufficient time between trading decisions.