MACD Trading System

Introduction

An MACD trading system is developed by VidiForex to explore how a moving average convergence/divergence analysis can be used to build a stand alone trading system. The basic theory of this analysis has been published in the technical analysis reference of MACD. Based on the published theory, the trading system model developed here will produce a trading signal and its analysis on both historical and real time data.

Trading Rules

The trading system and analysis model will produce and compare 3 types of trading rules: MACD zero crossing as buy/sell trigger, MACD signal zero crossing as buy/sell trigger, and MACD – MACD signal lline crosover as buy sell trigger. The MetaTrader version of MACD will be used for computing the MACD (bar) and MACD signal line as the following:

  • MACD = EMA(CLOSE,12) – EMA(CLOSE,26)
  • MACD signal = SMA(MACD,9)

CLOSE is the daily closing price from the forex market data.

The first rule uses MACD zero crossing as the trading signal as the following:

  1. If there is no opened (floating) position then open buy if the MACD is above zero and open sell if the signal line is below zero.
  2. If the MACD crosses the zero from positive to negative then switch the floating position to sell (by closing the buy position and opening the sell position).
  3. If the MACD crosses the zero from negative to positive then switch the floating position to buy (by closing the sell position and opening the buy position).

The second rule will be using the MACD signal for triggering the buy/sell signal as the following:

  1. If there is no opened (floating) position then open buy if the MACD is above zero and open sell if the signal line is below zero.
  2. If the MACD crosses the zero from positive to negative then switch the floating position to sell (by closing the buy position and opening the sell position).
  3. If the MACD crosses the zero from negative to positive then switch the floating position to buy (by closing the sell position and opening the buy position).

The third rule will be using MACD – MACD signal crossover to prduce the buy/sell trading signal as the following:

  1. If there is no opened (floating) position then open buy if the MACD bar is above the signal line and open sell if the MACD bar line is below the signal line.
  2. If the MACD bar falls below the signal line then switch the floating position to sell (by closing the buy position and opening the sell position).
  3. If the signal line falls below the MACD bar then switch the floating position to buy (by closing the sell position and opening the buy position).

Comparison

The produced 3 types of trading signals will be compared with its simulated 260 days historical trading simulation. The computed key parameters and the simulated trading result will be presented in the analysis:

  • The produced trading signals
  • The capital gain of simulated trading result of each trading rules
  • The moving averages levels, the momentum, and the acceleration level of the price movement
  • Other analyzed parameters will be presented later as the development process is still in progress (will be update here)

The Implemented Models and The Results

The trading system model will be developed as several trading system modules (one independent module for each modeled currency pairs). The modules will be run inside our trading system modeler platform which handle the real-time analysis, simulation, and the optimization. The model is currently under development (in progress), and the link to the accessible results will be published here when it’s ready.

Leave a Reply

Your email address will not be published. Required fields are marked *