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

Re: [Metastockusers] Re: Carlos



PureBytes Links

Trading Reference Links

Hi Kevin,

I searched in the e-mails in this group and found one
of yours and taken to write the following:

You said:
In the book, the formula reads as follows: 

CTI = ln(c/c[L])/(stdev(ln(c/c[1]),L) * sqrt(L)) 

where: 

ln = natural logarithm 
stdev = standard deviation 
c[1] = yesterday's close 
c[L] = close L days ago 
sqrt = square root 

According to the article below, there is an implied 21
day lookback period used in the book as an example.

Regards, 
Kevin

This is my interpretation:

Here is the code I could write based on the above
formula. It has a lookback period variable from 1 and
up to 54 days. The trouble I see in your formula is
that the stdev can’t be of the L, it needs to be a
number, so I left the period. I do not know what it
should look like the indicator once is plotted. Have a
look at this one, and give me your feedback. I am also
interested if you do have more info about this trend
index.

Pd:=Input("Lookback Period",1,54,21);
CTI:=(Log(C/Ref(C,-Pd))/Stdev(Log((C/Ref(C,-1))),Pd))*Sqrt(L);
CTI

I haven't check your code yet. I'll have a look then
and also search as you said, but when I said translate
this page, the formula did not come up. I'll try
again.

Cheers,

Carlos
=

- Kevin <kevin_barry@xxxxxxxxxxxxxx> wrote:
> Hello Carlos,
> 
> If you go to Google and search for "Chande Trend
> Index" then click on 
> 'translate this page' on the very first hit, you
> will find a formula there.
> 
> Here is my effort at creating the Metastock code
> from the formula on that page:
> 
> Lookback:= Input("Lookback",1,100,21);
> LL:= Log(C/(Ref(C,-1)));
> XX:= LL / Lookback;
> SD:= Stdev((((LL-XX)*(LL-XX))/Lookback),Lookback);
> Log(C/Ref(C,-Lookback)) / (SD*Sqr(Lookback))
> 
> Needless to say, the plot bears no relation to the
> illustration on the site.
> 
> Good luck!
> 
> Regards,
> Kevin
> 
> At 16:25 04/11/2003 -0800, you wrote:
> >
> >Hi Kevin,
> >
> >If you send me the CTI formula I may give it a go
> and
> >help you with the MetaStock code.
> >
> >I had been looking with a Goggle search, but
> >couldn't't found any explanation really.
> >
> >Carlos.
> >=
> >
> >__________________________________
> >Do you Yahoo!?
> >Protect your identity with Yahoo! Mail AddressGuard
> >http://antispam.yahoo.com/whatsnewfree
> 
> 
> 


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/I3w.vC/hP.FAA/3jkFAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/