Download LeMan Variation MT4 Indicator

var-0LeMan indicator tries to identify the trend direction by measuring the price acceleration. You can adjust the parameter to modify the indicator according to currency pair and time frame of your choice to get best results.

How to Trade With Leman Variation:

Buy Signal:

-Wait for LeMan Variation indicator to break above the zero line.

Sell Signal:

-Wait for LeMan Variation indicator to break below the zero line.

LeMan Variation MT4 Indicator – When indicator cross the zero line, indicator will show you trend direction. Very simple!

 

[php]</pre>
//+——————————————————————+
//| variation.mq4 |
//| Copyright © 2010, LeMan. |
//| [email protected] |
//+——————————————————————+
#property copyright “Copyright © 2010, LeMan.”
#property link “[email protected]

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Red
//—- input parameters
extern int N=20;
//—- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
string short_name;
IndicatorDigits(Digits+2);
IndicatorBuffers(2);
//—- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexBuffer(1,ExtMapBuffer2);
//—-
if (N <= 0) N = 20;
//—-
SetIndexDrawBegin(0, N*2);
//—-
short_name = “Variation (” + N + “)”;
IndicatorShortName(short_name);
SetIndexLabel(0, short_name);
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator deinitialization function |
//+——————————————————————+
int deinit()
{
//—-

//—-
return(0);
}
//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int start()
{
//—-
int limit = Bars-N-1;
for (int i = limit; i >= 0; i–) {
double ma = iMA(NULL,0,N,0,MODE_SMA,PRICE_CLOSE,i);
ExtMapBuffer2[i] = Close[i]-ma;
}
//—-
i = Bars-N*2-1;
while (i >= 0) {
double vr = iMAOnArray(ExtMapBuffer2,Bars,N,0,MODE_SMA,i);
double mov = iMA(NULL,0,N,0,MODE_SMA,PRICE_CLOSE,i);
ExtMapBuffer1[i] = Close[i] – (mov + vr);
i–;
}
//—-
return(0);
}
//+——————————————————————+
<pre>[/php]

Click Here to Download

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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