Documentation/AlgoCode/Function reference
qty
Script-side quantity hint stored on the risk plan.
qty 1
A number on the script, stored with stop/target for hosts that read dovee.risk.qty. It also shows as a Qty knob in the script inputs UI (default 1 on strategies). Live webhook JSON fills qty from this number when risk sizing does not replace it. When risk N percent produces the entry size, qty is that quantity. A partial exit sends the quantity closed in that slice. If you omit qty, Dovee still exposes the knob so you can size the alert.
Return value
—
Note
- qty does not place broker orders.
- When risk N percent is present and the stop distance is usable, the initial fill and the webhook qty use the risk quantity instead of qty. Capital 100000, risk 1 percent, stop 5 points, and entry 100 produce qty 200. A partial exit webhook sends the closed slice. qty remains the scale-in add and the fallback.
Example
when ema(9) crosses above ema(21) buy qty 1 stop 10 points