Sell Stop-Limit Orders with Deposit-Based Position Sizing
Summary
This script places a sell stop-limit order using trigger levels measured from the current price, then attaches stop-loss and take-profit levels measured from the open price. It also offers an MM input that scales deal volume according to a chosen fraction of the full deposit, making position sizing part of the order setup rather than a separate manual step.
The listed inputs control the deposit fraction, stop and limit offsets, protective exit distances, order expiry, and retry count and delay after unsuccessful transactions. The document gives parameter examples, including a 0.1 money-management setting, 300-point trigger and stop offsets, an 800-point target, and four retries. These are configuration examples, not evidence of profitability. The script description does not specify how points map to risk across instruments, how the deposit fraction translates into quantity, or how execution handles gaps and partial fills. Traders would need to check those details and account for instrument-specific constraints before relying on the order logic.
Key ideas
- The script submits a sell stop-limit order using separate stop and limit trigger offsets.
- Stop-loss and take-profit distances are measured from the resulting open price.
- The MM input determines trade volume as a fraction of the deposit.
- Expiry and retry settings control order duration and handling of unsuccessful transactions.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.