Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Facebook !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Experts

Popular MACD Strategy from Viral YouTube Video (3.5M+ Views) - expert pour MetaTrader 5

Vues:
2450
Note:
(3)
Publié:
Mise à jour:
\MQL5\Indicators\ \MQL5\Include\
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance


This Expert Advisor is based on a MACD crossover strategy with trend filtering and support/resistance confirmation. The logic is built according to the most common interpretation of such strategies, using standard indicators. The code is full of comments explaining every line of code step by step.

The Strategy Components are simple:

  • MACD Crossovers: Standard MACD settings (Fast: 12, Slow: 26, Signal: 9) are used to detect momentum shifts:

  • Trend Filter:  A 200-period moving average filters trades: Only buys are allowed above the MA, and sells if the price is below the MA

  • Support/Resistance Condition: Trades are only allowed if price has recently touched a key support or resistance level. These levels are detected using a custom SupportResistance indicator (included as external dependency), based on the relative highs/lows of the last 10 and 20 candles.
  • Signal Validity Window: To avoid missing setups due to timing mismatch, the EA uses a configurable time window to "remember" support/resistance and MACD signals ( SignalValidity parameter).

  • Risk Management: Stop loss is placed a fixed number of points (specified by the user) from the 200 MA.  and the Take profit is automatically calculated as 1.5× the stop loss distance


Input Parameters

Parameter Description
SignalValidity (int) Number of candles a signal remains valid after appearing (default: 7)
Lotsize (double) Trade volume for each order
SLPointDistanceFromMA (int) Distance (in points) between the MA and the stop loss level


Backtest results on GBPJPY for the last 2 years


Visualization of the strategy


Input parameters



ServerTime ServerTime

A lightweight, customizable tool that displays server time on your chart for precise trading decisions.

Seven strategies in One expert Seven strategies in One expert

Name of expert is 'MultiStrategyEA'

BBMA ZoneZeroLoss (ZZL) Grandma Ally BBMA ZoneZeroLoss (ZZL) Grandma Ally

BBMA ZoneZeroLoss Histogram shows trading zones e.g. for "Reentry" setup for risk minimisation

Bull Bear Volume Bull Bear Volume

An indicator that provides a clear visualization of volume pressure on each side of the market