Skip to content
All library documents

Channel Trading with Timed Limit Orders and Opposite-Side Targets

Article MQL5 code base

Summary

This Expert Advisor trades a price channel during configured hours. At the start of the trading window, it places limit orders at both channel boundaries and sets take-profit levels toward the opposite boundary. It uses no stop loss. At the end of the window, it closes open positions and removes unfilled orders. The channel indicator's values are calculated inside the advisor, so a separate copy of that indicator is not needed. Settings also control position volume, slippage, order identification, spread handling, and retries while the trading environment updates.

The document reports testing from January 2, 2017, through March 29, 2018. Default settings performed poorly, after which the trading hours were optimized on EURUSD hourly data using one-minute OHLC modeling; the author says results improved but gives no figures. This limited account does not establish profitability or robustness. In particular, the method's reliance on selected trading hours and the absence of a stop loss merit scrutiny, and the document provides no comparison across instruments or periods.

Key ideas

  • The advisor places limit orders at both edges of a calculated price channel during a scheduled trading window.
  • Take-profit levels target the opposite channel edge, and the strategy uses no stop loss.
  • Open positions are closed and unfilled orders removed when the trading window ends.
  • Default settings performed poorly in the stated test, while optimizing the trading hours reportedly improved results.
  • The document provides no numerical optimized performance or evidence of robustness across other periods and markets.

Tags

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