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

RE: [amibroker] Digest Number 2246



PureBytes Links

Trading Reference Links



Well what a plesant surprise to see JOSE here in the AB forum Anyone for
Australia will be familiar with Jose and his generous support and help
on the Stockcentral forum.

A big welcome  

Regards David 


Message: 4
   Date: Wed, 11 Jun 2003 07:24:57 -0000
   From: "Jose" <josesilva22@xxxxxxxxx>
Subject: Breakout system code

I'm an old hand at MetaStock coding, and I thought it's time to give 
AFL a go.  I have to admit, AB leaves MetaStock for dead...

Anyway, here's my first AFL effort:

---8<----------------------

/* plots breakout signals */
/* josesilva22@xxxxxxxxx */
/* +1 signal=long, -1 signal=short */

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

---8<----------------------


Can anyone here help me with these Q's:

1) Can I control the Parameters (Ctrl-R) slider order?
2) Is the Parameters dialog box resizable?
3) Is there a way to input variable periods into EMA's?
4) Is there an equivalent to MetaStock's Prev() function?

I've got a million other questions, but I'm sure this will 
sufficiently annoy enough for now. :)

Thanks,
jose '-)

http://users.bigpond.com/prominex/pegasus.htm#metastock








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