PureBytes Links
Trading Reference Links
|
I've been trying the whole day to write a code in afl, with no succes...
here is the code I wrote:
Cond1 = DayOfWeek () == 1 ;
Cond2 = DayOfWeek () == 2 ;
Cond3 = DayOfWeek () == 3 ;
Cond4 = DayOfWeek () == 4 ;
Cond5 = DayOfWeek () == 5 ;
Cond777 = Cond1 OR Cond2 OR Cond3 OR Cond4 OR Cond5;
SetOption("MaxOpenPositions", 5 );
//buy
Buy = Ref ( Close , -1 ) > Ref ( Open , -1)
AND Cond777;
Sell = DayOfWeek() == 5;
//short
Short = Ref ( Close , -1 ) < Ref ( Open , -1)
AND Cond777;
Cover = DayOfWeek() == 5;
I cannot get more then one open positions, i don't know why, and every
way i've been trying to write my ideas in afl, i get bizzare results.
my system is really simple: buy if the previous bar was up, short if
the previous bar was down, sell/cover at the Friday's close.
Can anyone help me?
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|