Skip to content
All library documents

Configurable Sell Stop Orders with Stop Loss and Take Profit

Article MQL5 code base

Summary

This script places a pending Sell Stop order and exposes inputs for money management, allowed price deviation, entry distance, stop loss, take profit, retry count, and the pause between attempts. The settings let a user configure the order’s size and the distances of its entry and protective levels, while also defining how the script should respond when a trade attempt fails. The document lists example defaults but does not explain the order-submission logic or how money management is calculated.

A Sell Stop is generally used to enter a short position if price falls to a specified level, so the script provides a basic execution building block rather than a complete trading system. The note offers no market-selection rule, signal, backtest, or performance evidence. Stop and target distances are specified in points, whose value depends on the instrument’s quote conventions. The brief description also leaves unclear whether the stop loss and take profit are measured from the current price or the eventual fill in the actual implementation, and it gives no discussion of slippage or risk limits.

Key ideas

  • The script is designed to submit a pending Sell Stop order.
  • Inputs control order sizing, entry distance, price deviation, and protective levels.
  • The script can retry failed trade attempts with a configurable pause.
  • The document does not describe the entry signal or provide performance results.
  • Point-based distances and money-management behavior depend on instrument conventions and implementation details.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.