Making The Most Of A Trend With The Disparity Index
In his article “Making The Most Of A Trend With The Disparity Index”, Dan Valcu has analyzed volatile markets where the formation of peaks and troughs is difficult to forecast. The disparity index is an indicator that should help to squeeze the best out of a trend whether you are trading equities, futures, or Forex.
Using Function Builder, one needs to create the Disparity function:
Disparity function:
function (Price:Numeric=Close, N:Numeric=10,
Method:Numeric = E):Numeric;
Var
Disparity:=0;
End_var
Disparity:= 100*(Price - MOV(Price,N,Method))/Price;
return Disparity;
Also, one needs to create the Disparity indicator using Tradecision’s Indicator Builder:
Disparity indicator:
input
Price:"Enter the price:", Close;
Length:"Enter the Length:", 20;
Method:"Enter the Moving Average Method:", E;
end_input
return Disparity(Price,Length,Method);
In NeatScan market scanner, one needs to create the DIX scan with the following code:
return true;
Then one needs to add three custom columns to the scan to display the indicator reading for three different average smoothing lengths:
Column DIX(20):
var
nper1 := 20;
dix20:= 0;
End_var
dix20:=100*(C-EMA(C,nper1))/C;
return dix20;
Column DIX(50):
var
nper1 := 50;
dix50:= 0;
End_var
dix50:=100*(C-EMA(C,nper1))/C;
return dix50;
Column DIX(200):
var
nper1 := 200;
dix200:= 0;
End_var
dix200:=100*(C-EMA(C,nper1))/C;
return dix200;
|