Skip to content
All library documents

Filtering F2a_AO Signals with a Higher-Timeframe Candle

Article MQL5 code base

Summary

This Expert Advisor trades signals from the F2a_AO semaphore indicator after filtering them by the direction of a closed candle on a higher timeframe. The timeframe and candle index are configurable, with daily timeframe and the most recently closed bar as defaults. This adds a trend context check to the indicator’s signals.

The document describes a historical test on USDCHF using a 12-hour chart for 2011. It says the displayed tests used default Expert Advisor settings and did not use stop loss or take profit, but provides no numerical performance results or analysis of the trades. The example therefore explains the filtering setup rather than establishing that it is profitable. It also notes that the supporting trade library assumes brokers with nonzero spreads and the ability to set stop loss and take profit when opening a position, limiting which broker setups it supports.

Key ideas

  • The Expert Advisor takes signals from the F2a_AO semaphore indicator and applies an additional filter.
  • The filter uses the direction of a closed candle from a configurable higher timeframe.
  • The timeframe and candle index are input parameters, defaulting to daily and bar index one.
  • The document describes a 2011 USDCHF test on a 12-hour chart, with no stop loss or take profit used.
  • The supporting trade library has broker requirements that may limit its use.

Tags

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