Skip to content
All library documents

Trading Indicator Color-Crossover Signals with Session Time Controls

Article MQL5 code base

Summary

This document describes an expert advisor that trades changes in the direction color of a PercentageCrossover indicator. It generates a signal when a bar closes and the indicator changes direction, then allows trades to be restricted to a configurable daily time window. The default schedule covers the day and closes positions near its end; a window that spans midnight is also supported.

The material is primarily an explanation of the signal and operating settings rather than a full strategy evaluation. It notes that example tests used default inputs and omitted stop-loss and take-profit settings, and it references a USDJPY four-hour test for 2015 without providing performance figures in the text. The advisor depends on a separate compiled indicator and a trading library, so the excerpt alone is insufficient to reproduce the setup. It gives no evidence of robustness, transaction-cost sensitivity, or live performance.

Key ideas

  • A trade signal occurs at bar close when the indicator changes direction.
  • The advisor can limit trading to a specified start and end time.
  • Positions are closed at the configured end time, including when the session crosses midnight.
  • The cited historical test used USDJPY on a four-hour chart and did not use stop loss or take profit.
  • The setup relies on a separate indicator file and trading library.

Tags

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