Primitives
hedge
Places a hedge order in the opposite direction of the current position to reduce risk. This helps protect against adverse market movements.
hedge (tick)
Places a hedge order in the opposite direction of the current position to reduce risk. This helps protect against adverse market movements.
Input parameters
| Prop | Type | Default | Description |
|---|---|---|---|
side* | string | The side of the hedge order (long or short) | |
size* | number | The size of the hedge order | |
transmit | boolean | false | Whether to transmit the order immediately |
SQL example
TICK price WITH minutes=1 > 0 THEN hedge SET side=long, size=50, transmit=true