Skip to content
All library documents

A Moving Average and Stochastic Filter for Short-Term Trend Entries

Article MQL5 code base

Summary

This Expert Advisor concept seeks short-term trend entries on a 15-minute chart, using moving averages on both the 15-minute and hourly charts to establish direction. After identifying the trend, it checks that price is close to the 15-minute moving average and waits for a stochastic crossover in an extreme zone: an upward cross below 20 for a buy or a downward cross above 80 for a sell. The document specifies that both entry checks must be satisfied together.

The page supplies code fragments for calculating indicator values and expressing the buy and sell conditions. It also identifies EURUSD on the 15-minute timeframe and a historical period from 2016 to 2017, but gives no performance statistics, trade outcomes, or risk-management rules. It is therefore a description of entry logic rather than evidence of profitability. The stated distance threshold uses points or pips, so interpretation may depend on broker conventions and instrument precision.

Key ideas

  • The system uses moving averages on 15-minute and hourly charts to identify direction.
  • It checks for price proximity to the 15-minute average before entering.
  • A stochastic crossover below 20 triggers the described buy setup.
  • A stochastic crossover above 80 triggers the described sell setup.
  • The page gives entry code and a historical instrument period but no performance evidence.

Tags

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