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

Re: Choppiness (Halloween one day early)



PureBytes Links

Trading Reference Links

I cc to myself and the attachment is there this time.

I did hold a big cross and wore garlic necklace when I
sent it.

Julian  



--- DayTrade R Us <daytraderus@xxxxxxxxx> wrote:
> I swear I had the atttachment both times.  The list
> may have a bug that rejects attachments.  Let me
> post
> the code AND do the attachment the third time as
> well.
> 
> Here is the function, followed by the indicator.
> 
> {
> 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 Choppy  = 50
> ELSE Choppy=100*log_ratio/log_n
> 
> 
> {Now the Indicator}
> 
> 
> {
> Indicator: Choppiness Index
> }
> 
> Input: Ndays(9), avgLen(6);
> IF Currentbar>=1 then begin
>         Plot1(Choppy(NDays),"Plot1");
>         Plot2(50,"Plot2");
>         Plot3(xaverage(choppy(nDays), 
> avgLen),"Plot3");
> end ;
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Messenger - Talk while you surf!  It's FREE.
> http://im.yahoo.com/

> ATTACHMENT part 2 application/octet-stream
name=Choppy.ela