Skip to content
All library documents

Daily-Bar Contrarian Entries at a Scheduled Time

Article MQL5 code base

Summary

This Expert Advisor checks the direction of the most recent daily bar at a configured time, then opens a position in the opposite direction if no position is already open. The strategy is a simple scheduled contrarian rule: the prior daily move determines whether the new trade is long or short, while the entry time is set by hour and minute inputs.

The listed controls include trade volume, take-profit and stop-loss distances, permitted slippage, symbol selection, and entry time. Zero disables either protective price level. The document refers to a visual strategy-tester display but gives no quantitative performance statistics, sample period, or market details. It also does not specify exit logic beyond the available profit and loss settings, or discuss transaction costs and risk sizing. The description is sufficient to understand the entry premise, but not to judge profitability or generalize results.

Key ideas

  • The system reads the direction of the latest daily bar at a selected time.
  • It opens a position in the opposite direction when no position is open.
  • The entry schedule and instrument can be configured, along with volume and slippage.
  • Take profit and stop loss are optional settings that can be disabled.
  • The referenced tester visualization is not accompanied by performance statistics or validation details.

Tags

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