Idea by: mserega76.
MQL5 code by: Vladimir Karputov.
Welcome to the world of automated trading! If you’re looking to elevate your trading game, the Interceptor EA for MetaTrader 5 could be just what you need. This strategy utilizes a "fan" of Moving Averages across three different timeframes, with five Moving Averages on each. It’s specifically designed for GBP/USD on the M5 timeframe, and trying to run it on any other symbol or timeframe will result in an error. So, stick to what it knows best!
In the code, two methods are utilized for fetching data from the Moving Average indicators:
- Data from a single bar per request using iMAGet
- Data from multiple bars per request using iMAGetArray and iStochasticGetArray
Additionally, CopyRates is employed for quicker calculations, enhancing the EA’s performance.
Input Parameters
- Lot size for normal position openings (when signals don’t align)
- Flat coefficient on M5 (points per bar)
- Initial stop loss (if below 100, no stop loss is applied)
- Take profit level (if below 100, no take profit is applied)
- Minimum profit in points for breakeven adjustments
- Stop loss adjustments for breakeven (applies if parameter is above 9)
- Maximum distance between MAs for the fan on M5 (in signal 1 only)
- Maximum distance between MAs for the fan on M15 (in signal 4 only)
- Maximum distance between MAs for the fan on M15 (in signal 6 only)
- Stochastic period settings (for M5)
- Upper level of stochastic (for M5)
- Lower level of stochastic (for M5)
- Stochastic period settings (for M15)
- Upper level of stochastic (for M15)
- Lower level of stochastic (for M15)
- Minimum candlestick body size (in signal 1 only)
- Low flat (minimum flat length in bars)
- High flat (maximum flat height in points)
- Minimum distance in bars between indicator peaks for divergence on M5
- Minimum percentage of the long hammer shadow
- Maximum percentage of the short hammer shadow
- Minimum hammer size in points (for M5)
- Age of the hammer (highest bar number)
- Maximum bars for hammer confirmation (in signal 6 only)
- Narrow source (maximum width of the fan on M5 at its narrowest)
- Bars ago when the fan converged to the "narrow source" (almost a point)
- Maximum/minimum range broken through (narrow source in bars)
- Mark your positions with this number
- Minimum trailing stop shift
- Distance from trailing stop to price (if below 100, trailing stops are disabled)
Here’s a snapshot from a single test using the "Every tick based on real ticks" mode:

Comments 0