• Visão global
  • Comentários
  • Discussão (2)

Wavelet Trend Extractor MT5

Introduction to Wavelet Trend Extractor

This indicator uses Wavelet Technology to extract trend from Forex price series. The wavelet technology we uses for our indicator is identical to the wavelet function implemented in MatLab Wavelet Toolbox (http://www.mathworks.co.uk/products/wavelet/features.html#key-features). Our Wavelet decomposed signals matches as close as up to 6 decimal places of those decomposed signals from MatLab Wavelet Toolbox.

This wavelet technology is commonly used in Earth Quake engineering, Signal Processing, Time series analysis, etc. The steps involving our indicators include decomposing signals into many levels of wave signals and reconstruction of trend from the filtered wave cycles. In detail, once the price series is decomposed, then the noise part of wave cycles will be removed from the price signal and then the remaining wave cycle will be used to construct the trend.

For this particular task, we use Undecimated Harr Wavelet technique. The main focus of our Wavelet Trend Extractor is to deliver accurate Scientific Data Analysis tool to our customers. Of course, our Wavelet Trend Extractor focuses on Forex Trading and building Expert Advisor. We incorporated many other useful functions in our Wavelet Trend Extractor besides the original decomposition and reconstruction algorithm. Our Wavelet Trend Extractor can be used for both manual trading and your on going Expert advisor development.

Input Variables

  • Trend Mode: 0, 1 or 2 only. Mode 0 uses one fully constructed trend as an entry and exit signal. Mode 1 uses two full constructed trend as an entry and exit signal. Mode 2 uses individual Wave cycle as an entry and exit signal.
  • Wavelet Selection Level: your choice of Wave cycle. For Mode 0 and 1, Wavelet Selection Level indicates the filtering intensity for trend construction (higher value means higher the filtering intensity). For Mode 2, it is the choice of Wave Cycle. (Smaller value means higher frequency wave and higher value means lower frequency wave.)
  • Smoothing Period for signal line, the signal line is a simple moving average of Wave Histogram. Recommended setting is 6.
  • Bars to scan: recommend to use 400 as the default setting. There is no need to change this value.

How to use Wavelet Trend Extractor for your Manual Trading

For manual trading, we recommend to attach our Wavelet Trend Extractor to H1, H4 or Daily time frame. The usage of Wavelet Trend Extractor is very similar to MACD indicator. The recommended setting for our Wavelet Trend Extractor are:

  • Trend Mode 2 and Wavelet Selection Level 3 with Signal Period 6 : buy if histogram > signal and sell if histogram < signal
  • Trend Mode 2 and Wavelet Selection Level 2 with Signal Period 0 (No signal line.) : buy if histogram > 0 and sell if histogram < 0
  • Trend Mode 1 and Wavelet Selection Level 2 : buy if histogram > 0 and sell if histogram < 0

Depending on currency pairs, slightly different setting may perform better. Buy and sell signals are simply determined by the value of histogram in your chart.

How to use Wavelet Trend Extractor for your Trend following Expert Advisor

To call our Wavelet Trend Extractor from your Meta Trader 5 Expert Advisor, use following code lines or modify following code line for your own conditions. To go through all the combination of Trend Mode (3) and Wavelet Selection Level (6), you need to just go through 18 steps during optimization in Strategy Tester. This small combination is the advantage of this wavelet techniques over conventional technical indicators. For EA developer, we recommend to try all three different Trend Mode 0, 1 and 2 as we have very good results using all these three trend mode.

input int                 TrendMode            = 2;    //Trend Mode 0, 1 or 2 only
input int                 WaveLevelSelection   = 3;    //Wave Level Selection: must be smaller than Wave Resolution Level.
input int                 SignalPeriod         = 6;    //Smoothing Period for selected Wave cycle, Trend Mode 2 only.
input int                 BarsToScan           = 400;  //Bars to Scan: from 400 to 2000 only.
input bool                UseWhiteChart        = true; //Use chart with white background 
input bool                DisplayComment       = true; //Display Comment
int Handle = iCustom(Symbol(), Period(), "Market\\Wavelet Trend Extractor", TrendMode, WaveletSelectionLevel, SignalPeriod, 400, true, false);

double WaveletHistogram[3];
double WaveletSignal[3];

ArrayInitialize(WaveletHistogram,    0.0);
ArrayInitialize(WaveletSignal, 0.0);

CopyBuffer(Handle ,0, 0, 3,  WaveletHistogram); //Wavelet Histogram array now contains histogram from our Wavelet Trend Extractor.  
CopyBuffer(Handle, 2, 0, 3,  WaveletSignal);    //Wavelet Signal array now contains Signal, smoothed histogram from our Wavelet Trend Extractor. 
Sem comentários