PureBytes Links
Trading Reference Links
|
Anthony,
The original code was posted at
http://groups.yahoo.com/group/amibroker/message/38370, Apr20, 2003
and used DEMA smoothing.
Many replies followed the original message and one of them used
JurikJMA, a commercial smoothing product.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Anthony Gutierrez" <ospreyag@xxxx>
wrote:
> THe following was posted some time ago:
>
> /*TREND DETECTOR WITH VARIABLE PERIOD, by D. Tsokakis, Apr2003*/
> t=20;// the initial fast period
> x=JurikJMA(StochD(40),t);
> Plot(x,"",1,8);// fast trend detector
> tA=50;// slow period
> xA=JurikJMA(StochD(40),tA);
> Plot(xA,"",7,8);// slow trend detector
> Cond1=Ref(x,-1)==LLV(x,3);
> Plot(50*Cond1,"",5,2);// the start of the fast uptrend
> Cond2=Ref(x,-1)==HHV(x,3);
> Plot(50*Cond2,"",4,2);// the end of the fast uptrend
> k1=BarsSince(Cond1);// uptrend bar counter
> k2=BarsSince(Cond2);// downtrend bar counter
> Plot((k2>k1)*10,"",5,2);
> Plot((k2<k1)*10,"",4,2);
> t1=IIf(k2>k1,t+k1,t+k2);// the variable period
> x1=DEMA(StochD(40),t1);// the variable trend detector
> Plot(x1,"",(x1>Ref(x1,-1))*5+(x1<Ref(x1,-1))*4,8);
> GraphXSpace=1;
>
> When I ran the above code, I get an error message at x=JurikJMA(
> I do not think there is a "JurikJMA" function built into Amibroker
> and JurikJMA is not defined. Do I need to download it somewhere or
> do I missed part of the code. Any feedback is greatly appreciated.
>
> Anthony
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|