[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dreiss Chopiness Index?



PureBytes Links

Trading Reference Links

Frank wrote:
>Anybody know how to calculate this?  Anybody use this?

I have this version of the Choppiness Index which I believe I 
coded in from a TASC article a couple of years ago. I can't recall the
authors name right now - might have been Dreiss?

It has some interesting properties, mainly in identifying "flat" spots
in a market that can precede breakouts. I haven't used it in any
real-time trading however.


{*****************************************************}
{
Function: ChoppinessIndex
}
Input: Length(NumericSimple);
Var: n(0), true_high(0), true_low(0), tr_rang(0), sum(0), n_high(0),
n_low(0), n_range(0), ratio(0), log_ratio(0), log_n(0);

if currentbar = 1 then begin
	n = length;
end;
true_high = @Maxlist(high, close[1]);
true_low = @MinList(low, close[1]);
tr_rang = true_high - true_low;
sum = @summation(tr_rang, n);
n_high = @highest(true_high, n);
n_low = @Lowest(true_low, n);
n_range = n_high - n_low;
ratio = sum/n_range;
log_ratio = Log(ratio);
log_n = Log(n);

IF CurrentBar <= length then ChopinessIndex  = 50 
ELSE ChopinessIndex=100*log_ratio/log_n

{*****************************************************}

{
Indicator: Choppiness Index
}

Input: Ndays(9), avgLen(6);
IF Currentbar>=1 then begin
	Plot1(ChopinessIndex(NDays),"Plot1");
	Plot2(50,"Plot2");
	Plot3(xaverage(chopinessINdex(nDays), avgLen),"Plot3");
end ;

{*****************************************************}

Good trading.

Dave DeLuca