Skip to content
All library documents

Color-Change Signals with a Defined Trading Window

Article MQL5 code base

Summary

This Expert Advisor trades when the ColorJFatl_Digit indicator changes color at a bar close. Users can set start and end times; the stated defaults allow trading from midnight and close positions at 23:59. If the start time falls later than the end time, the closing time is interpreted as occurring the next day.

The document describes the time controls and notes that the indicator file must be installed for the advisor to work. It also mentions a trading library for brokers with nonzero spreads and support for setting stop loss and take profit when opening positions. A EURUSD H4 test for 2015 is referenced, but the text provides no performance figures or detailed evaluation. The reported tests used default inputs and no stop loss or take profit, so they do not establish how the strategy performs under other settings or market conditions.

Key ideas

  • The advisor generates a signal at bar close when the indicator changes color.
  • Start and end hour and minute inputs define the permitted trading interval.
  • When the start time is later than the end time, the closing time falls on the following day.
  • The referenced EURUSD H4 test used default inputs and omitted stop loss and take profit.

Tags

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