MACD-SignalLineCross Strategy

MACD-SignalLineCross is an elementary strategy concept using the Moving Average Convergence/Divergence indicator. You can calculate the value of the MACD Histogram by subtracting the value of slow EMA (higher period) from fast EMA (lower period). MACD Signal Line is then calculated as a simple MA from the MACD Histogram values.

Strategy Logic: The start of a new trend can be detected when the MACD Signal Line value crosses the MACD Histogram value. Based on the direction of the crossover and the absolute value of the MACD Histogram, we can distinguish:

Buy Signal:  MACD Signal Line crosses under the MACD Histogram, and the MACD Histogram value < 0.

Sell Signal: MACD Signal Line crosses over the MACD Histogram, and the MACD Histogram value is > 0.

MACD-SignalLineCross Entry Signals

MACD-SignalLineCross Strategy Inputs:

  • UniqueStrategyNumber – Unique strategy identifier (Magic Number), each running strategy should have a different UniqueStrategyNumber.
  • MACDFastEMAPeriod – Period settings for the fast EMA (lower period) from which is the MACD Histogram value calculated
  • MACDSlowEMAPeriod – Period settings for the slow EMA (higher period) from which is the MACD Histogram value calculated
  • MACDSignalMAPeriod – Period settings for the MA of the MACD Signal Line
  • OrderSizeLots – Fixed order Size in Lots
  • StopLossPoints – Stop Loss distance from the entry price in Points (0 = No SL is set)
  • TakeProfitPoints – Take Profit distance from the entry price in Points (0 = No TP is set)
  • TrailingStopPoints – Trailing Stop distance in Points. When the Stop Loss distance from the current price is higher, the Stop Loss is adjusted closer to fit the preset level (0 = No TS is set)

Point – Minimal change in the asset quotation (usually the last digit)

Pip = 10 Points (regarding FX pairs)

Get the MACD-SignalLineCross forex strategy:

Did you achieve the expected results in the backtest? Feel free to share your findings and opinions here in the discussion.

Still, have no trading account yet? Open an account at one of my trusted brokers suitable for algorithmic trading completely for free and start testing today!

This post contains affiliate links. If you use these links to register at one of the trusted brokers, I may earn a commission. This helps me to create more free content for you. Thanks!