Skip to content
All library documents

Bar-Open Pending Stop Orders with High-Low Offsets and Risk Inputs

Article MQL5 code base

Summary

The document outlines an Expert Advisor that places pending buy and sell stop orders using offsets from the current timeframe bar’s high and low. It operates when a new bar opens and does not analyze price ticks within the bar. Users can configure order size, separate take-profit and stop-loss distances for buys and sells, and the offsets used to position pending orders.

An option prevents new pending orders while a position is open. The listed inputs also include an equity-based profit percentage and a unique identifier for the advisor. This is a description of configurable order placement, rather than a fully specified trading strategy: it does not explain how the offsets are chosen, how orders are canceled or replaced, or what market conditions make the approach suitable. No backtest, performance evidence, or detailed risk evaluation is supplied, so the document alone does not establish profitability or execution behavior across brokers and instruments.

Key ideas

  • The advisor places pending buy and sell stop orders when a new bar opens.
  • Order prices are offset from the current bar’s high or low.
  • Buy and sell orders have separately configurable stop-loss and take-profit distances.
  • A setting can block new pending orders while a position is open.
  • The document gives no entry rationale, backtest, or evidence of profitability.

Tags

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