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

Re[2]: Dreiss Chopiness Index?



PureBytes Links

Trading Reference Links

This one will verify. Make sure the Function's name and definition statement are
spelled the same. 

     {*****************************************************}
             
             {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 ChoppinessIndex  = 50 
             ELSE ChoppinessIndex=100*log_ratio/log_n



"The darkest hour in any man's life is when he sits down to plan
 how to get money without earning it"

Sentinel Trading
rjbiii@xxxxxxxxx
____________________Reply Separator____________________
Subject: Re: Dreiss Chopiness Index?
Author: Robert W Cummings
Date:  11/1/98 12:38 AM

Function doesn't verify

Robert

>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
>
>
>