Skip to content
All library documents

Two-Indicator Trend-Following Entries with X2MA and JFatl

Article MQL5 code base

Summary

This Expert Advisor combines two indicators to identify trend-following entries. ColorX2MA sets the slower trend direction, while ColorJFatl signals a possible entry when the faster trend changes. A trade signal occurs at bar close when the indicator directions agree and the fast trend has just turned toward that direction.

The document describes the entry logic and notes that the higher-timeframe indicator variants are only for visualization in the strategy tester. It reports a test on EURJPY in 2015, using an H4 slow trend and M30 entries, with default inputs and no stop loss or take profit. The test is presented as a chart rather than detailed performance statistics, so it does not establish robustness, risk-adjusted returns, or behavior across other markets and periods. The indicator files are also required for the EA to operate.

Key ideas

  • The slower ColorX2MA signal defines the primary trend direction.
  • ColorJFatl identifies entries when the faster trend changes direction.
  • A signal requires the fast and slow directions to agree at bar close, with the fast trend newly changed.
  • The reported EURJPY test used H4 for the slow trend and M30 for entries, without stop loss or take profit.

Tags

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