Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennislwm/10f492868fb2c6d281e4155cc723a90c to your computer and use it in GitHub Desktop.
Save dennislwm/10f492868fb2c6d281e4155cc723a90c to your computer and use it in GitHub Desktop.
FX-Git Indicators in Metatrader 4 (MT4)

A Non-Lag Indicator using Digital Signal Processing in Metatrader 4 ["MT4"]

Introduction

What the heck is Digital Signal Processing ["DSP"]?

For those not familiar with DSP, it is an engineering tool used to filter noise from signal and it has many practical uses in different industries.

In 2011, when I started trading in the forex market, I purchased several books including a trading book, titled Cybernetic Analysis for Stocks and Futures by John F. Ehlers. This was my first encounter of DSP in trading.

One of the limitations of using any price-based indicator is that there is a significant lag, as it is derived from the price.

The result is that a trading "signal" usually comes late, when profits have already been taken off the table.

The DSP indicator, named Cumulant Ratio ["CR"], that I have written eliminates any lag, thus its signals are more responsive.


About Cumulant Ratio Indicator

The CR indicator has TWO (2) inputs:

  1. CrPeriod - the number of bars to be used
  2. CrAlpha - a multiplier used to increase the range (enhanced visual and significance of the two lines, but it does not affect the histogram)

Project Structure

 MQL4/                         <-- Root of your MQL4 folder
   +- Include/                 <-- Holds any MQH file
      |- PlusTurtle.mqh        <-- Broker functions
   +- Indicators/              <-- Holds any MQ4 Indicator file
      |- CumulantRatio.mq4     <-- CR indicator

Blog Article

This article A New DSP Indicator in MT4 explains how the CR indicator works on an MT4 account.


Example Usage

In your MT4 Client, Click on File-->Open Data Folder.

Download and copy the above files into the corresponding subfolders under your MQL4 root folder.

Restart the MT4 Client.

Attach the CR indicator to any chart and Click OK (to accept the default inputs).


Reach Out!

Please consider giving my repository dennislwm/FX-Git a star on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment