Skip to content
All library documents

Using Expiring Stop Orders to Straddle Current Price

Article MQL5 code base

Summary

The document outlines a price-straddle order approach using buy-stop and sell-stop orders placed a chosen number of points above and below current price action. The orders are intended to expire after a specified period, making the setup time-limited. It also describes how the script should handle an existing open position: set that position’s stop loss one point inside the opposing pending order.

If setting the stop loss fails, the described fallback is to close the position and create the straddle orders. This is a brief specification, not a complete strategy evaluation. It does not define how to choose the distance from price or expiry period, explain order sizing or market conditions, or provide data on execution, slippage, risk, or profitability. The concept therefore describes order placement and a failure-handling rule, but offers no evidence that the setup is profitable or suitable across instruments.

Key ideas

  • The setup places buy-stop and sell-stop orders around current price action.
  • The pending orders are intended to expire after a chosen time period.
  • An existing position receives a stop loss just inside the opposing order, if that update succeeds.
  • If the stop-loss update fails, the described fallback closes the position before placing the orders.
  • The document provides no tested settings or evidence of trading performance.

Tags

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