Skip to content
All library documents

Modifying MQL5 Wizard Signals for Dynamically Priced Pending Orders

Article MQL5 articles

Summary

The article explains how to adapt an Expert Advisor generated by the MQL5 Wizard so its pending orders can be placed at a price calculated by the trading system. The standard setup uses a fixed price offset from the current market. The proposed modification passes access to the main signal object into a customized signal generator, allowing the generator to obtain a dynamic level such as a previous bar’s open or close, or a moving-average value.

The example system uses daily Envelopes signals and places stop orders in the direction of a hoped-for pullback after the prior bar moves up or down. The article outlines which generated modules to modify and recommends leaving shared Standard Library base classes untouched. It shows tests on EURUSD and USDJPY over a stated historical period with specified stop-loss and take-profit levels, but the excerpt gives no performance figures or evidence of robustness. The method is an implementation guide for flexible order placement, not a validated trading strategy.

Key ideas

  • The Wizard’s default price-level input places pending orders at a fixed offset from market price.
  • A customized signal module can derive order levels from changing market data.
  • Passing the main signal object into the module provides access to the relevant signal methods.
  • The example uses daily Envelopes signals to place stop orders after the previous bar’s direction.
  • The presented currency-pair tests lack performance details and do not establish strategy robustness.

Tags

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