Download Kaufman3 MT4 Indicator

kauf-0Kaufman3 indicator plots 2 lines on the chart. The pink line is the original Kaufman adaptive moving average (KAMA) line and the black one is EMA of KAMA. Generally adaptive moving averages change behavior based on the forex market conditions. They respond faster to the changes therefore they do not lag too much.

How to Trade With Kaufman 3:

Buy Signal:

-Wait for the black line to cross above the pink line,

-The price bar has to close above the black line.


Sell Signal:

-Wait for the black line to cross below the pink line,

-The price bar has to close below the black line.

Kaufman3 MT4 Indicator – Use two moving averages, I sagest you to use it on larger time frames such as 30min, H1 and H4. When candle close above two MAs it’s time to buy, opposite for sell.

periodAMA = 6; – length of time to compute signal-to-noise ratio
nfast = 2; – EMA length with high signal to noise
nslow = 60; – EMA length with lowest signal to noise
G = 2.5; – nonlinear squashing

//| Kaufman3.mq4 |
//| Copyright © 2004, by konKop & wellx |
//| Modified 2006, mbkennel |
//| |
#property copyright “Copyright © 2004, by konKop, GOODMAN, Mstera, af + wellx; 2006 mbkennel”
#property link “”

// This is a modification of the Kaufman AMA indicator to add
// an extra exponential moving average to the KAMA value.
// It may be interesting as a basis for a trend following indicator,
// as it may be whipped out of longer term trends more than conventional
// methods.
// Try on 1H or 4H charts, with various parameters.
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 White
#property indicator_color2 Magenta

//—- input parameters
extern int periodAMA=6; // length of time to compute signal-to-noise ratio
extern int nfast=2; // EMA length with high signal to noise
extern int nslow=60; // EMA length with lowest signal to noise
extern double G=2.5; // nonlinear squashing

extern double EMAofKaufPeriod=16.0; // for signal line, fixed EMA of kAMA
extern int offset=1; // offset this number of bars
//—- buffers
double kAMAbuffer[];
double kAMAfiltbuffer[];

int cbars=0;
double slowSC,fastSC;

//| Custom indicator initialization function |
int init()
//—- indicators



//| Custom indicator deinitialization function |
int deinit()
//| Custom indicator iteration function |
int start()
int i,pos=0;
double noise,noise0,AMA,AMA0,signal,ER;
double dSC,ERSC,wlxSSC;

//—- TODO: add your code here
slowSC=(2.0 /(nslow+1));
fastSC=(2.0 /(nfast+1));

if (Bars<=(periodAMA+2)) return(0);

//—- check for possible errors
if (cbars<0) return(-1);
//—- last counted bar will be recounted
if (cbars>0) cbars–;
//Print(“cbars1: “, cbars);
while (pos>=offset)
if(pos==Bars-periodAMA-2) AMA0=Close[pos+1];
ER =signal/noise;

Print(“dsC: “, dSC);
Print(“ERSC: “, ERSC);
Print(“slowSc: “, slowSC);
Print(“fastSc: “, fastSC);
Print(“signal: “, signal);
Print(“noise: “, noise);
Print(“SSC: “, wlxSSC);
Print(“AMA0: “, AMA0);
Print(“AMA: “, AMA);
Print(“MathPow: “, MathPow(wlxSSC,G));
Print(“pos: “, pos);
Print(“close[pos]: “, Close[pos]);
Print(“———————— “, 0);
//Print(“cbars2: “, cbars);


EMAOnArray(pos-1, 2.0/(EMAofKaufPeriod+1.0), kAMAbuffer,kAMAfiltbuffer,offset);

void EMAOnArray(int N, double p, double input[], double& output[], int offset) {
// Perform an “EMA” on array input[] with mixing parameter ‘p’
// 0 < p < 1.
// p, conventionally is 2.0/(L+1.0) where L is the ‘length’ parameter.
// In an EMA, the length and thus ‘p’ need not be integers.
// initial value is input[N-1], and will set output[N-1] down to output[0].

double omp = 1.0-p;
double ema = input[N-1];
for (int i=N-1; i>=offset; i–) {
double v = input[i];
ema = p*v + omp*ema;
output[i-offset] = ema;

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 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.