PureBytes Links
Trading Reference Links
|
This gives signals that almost match MACD 12,26,9
Rik Rasmussen
Stock Analyzer mailing list moderator
http://groups.yahoo.com/group/stockanalyzer/
> -----Original Message-----
> From: Jose [mailto:josesilva22@xxxxxxxxx]
> Sent: Wednesday, June 11, 2003 4:27 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Breakout system code - all of it
>
>
> I don't know what happened with the previous code posting - here it is
> again:
>
> ---8<-------------------------
>
> /* plots breakout signals */
> /* josesilva22@xxxxxxxxx */
> /* +1 signal=buy, -1 signal=sell */
> /* use Ctrl-R to adjust parameters */
>
> Title = "Breakout system";
> GraphXSpace = 10;
>
> pds1 = Param("HHV breakout periods",10,1,252,1);
> pds2 = Param("LLV breakout periods",10,1,252,1);
> x = Param("Op=1 Hi=2 Lo=3 Cl=4 Vol=5",4,1,5,1);
> delay = Param("Entry and Exit delay",0,0,3,1);
> display = Param("signals=1 binary=2",1,1,2,1);
>
> x = IIf(x==1,O,IIf(x==2,H,IIf(x==3,L,IIf(x==5,V,C))));
> In = x>Ref(HHV(x,pds1),-1);
> Out = x<Ref(LLV(x,pds2),-1);
>
> Init = Cum(In+Out>-1)==1;
> InInit = Cum(In)==1;
> Flag = BarsSince(Init OR In)<BarsSince(Init OR Out)+InInit;
> In = (InInit AND Ref(InInit,1)==0) OR (Flag AND Ref(Flag,-1)==0);
> Out = (Flag==0 AND Ref(Flag,-1)==1)*-1;
>
> Plot(Ref(IIf(display==1,In+Out,Flag),-delay),
> "breakout system",colorRed,styleLine);
>
> ---8<-------------------------
>
>
>
> 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
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/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
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|