You are on page 1of 15

Developer: Gerald Appel. Source: Appel, G. (2005). Technical Analysis.

NJ: Pearson Education, Inc;
Star, B., PhD (2016). Zero In On The MACD. Stocks & Commodities, May 2016. Concept: Trend
following trading strategy based on the MACD (Moving Average Convergence Divergence) line.
Research Goal: Performance verification of momentum signals. Trade Setup: Long Setup: MACD[i −
1] > 0. Short Setup: MACD[i − 1] < 0. Index: i ~ Current Bar. Trade Entry: Long Trade Entry: A buy at
the open is placed after a long setup. Short Trade Entry: A sell at the open is placed after a short
setup. Portfolio: 42 futures markets from four major market sectors (commodities, currencies,
interest rates, and equity indexes). Data: Since 1980. Testing Platform: MATLAB®.
Exponential Moving Average #1 (EMA#1):
Alpha#1 = 2 / (EMA#1_Look_Back + 1);
EMA#1[i] = Alpha#1 × Close[i] + (1 − Alpha#1) × EMA#1[i − 1];
Index: i ~ Current Bar.

Exponential Moving Average #2 (EMA#2):
Alpha#2 = 2 / (EMA#2_Look_Back + 1);
EMA#2[i] = Alpha#2 × Close[i] + (1 − Alpha#2) × EMA#2[i − 1];
Index: i ~ Current Bar.

MACD:
MACD[i] = EMA#1[i] − EMA#2[i]
Index: i ~ Current Bar.
Long Trades:
MACD[i-1] > 0
Index: i ~ Current Bar.

Short Trades:
MACD[i-1] < 0
Index: i ~ Current Bar.
Entry: Long Trades: A buy at the open is placed after a bullish Setup. Short Trades: A sell at the open
is placed after a bearish Setup.

Stop Loss Exit: ATR(ATR_Length) is the Average True Range over a period of ATR_Length. ATR_Stop is
a multiple of ATR(ATR_Length). Long Trades: A sell stop is placed at [Entry − ATR(ATR_Length) *
ATR_Stop]. Short Trades: A buy stop is placed at [Entry + ATR(ATR_Length) * ATR_Stop]. Stop Loss
Exit is used to normalize risk via position sizing.
Test Setup: https://oxfordstrat.com/trading-strategies/macd-part-1/
Test Setup: https://oxfordstrat.com/trading-strategies/macd-part-1/
Test Setup: https://oxfordstrat.com/trading-strategies/macd-part-1/
Test Setup: https://oxfordstrat.com/trading-strategies/macd-part-1/
Test Setup: https://oxfordstrat.com/trading-strategies/macd-part-1/
Test Setup: https://oxfordstrat.com/trading-strategies/macd-part-1/
Test Setup: https://oxfordstrat.com/trading-strategies/macd-part-1/
Test Setup: https://oxfordstrat.com/trading-strategies/macd-part-1/
• A trading strategy based on the MACD line crossing its zero line is an average momentum model.
• The default parameters for the MACD should be avoided (i.e. EMA#1_Look_Back = 12
and EMA#2_Look_Back = 26).
Oxford Capital Strategies Ltd.
30 Bankside Court
Stationfields
Kidlington
Oxford, OX5 1JE
United Kingdom

info@oxfordstrat.com
T: + 44 (0)1865.589.111