Skip to content
All library documents

Trading an Expert Advisor on Indicator Histogram Color Changes

Article MQL5 code base

Summary

The document describes an Expert Advisor that generates a signal when a bar closes and the i4_DRF_v2 indicator histogram changes color. It therefore uses a confirmed bar-close signal rather than reacting to an unfinished bar. Running the advisor requires the compiled indicator file to be installed in the terminal’s indicator directory.

Key ideas

  • The advisor signals trades when the indicator histogram changes color at bar close.
  • The compiled indicator is a required dependency for the Expert Advisor.
  • A helper library is described for broker spreads and for setting stop loss and take profit with an order.
  • The cited test uses default advisor parameters on EURAUD four-hour data for 2015.
  • Stop loss and take profit were not used in the reported test, limiting what its results can show.

Tags

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