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

[amibroker] AFL basic help needed please



PureBytes Links

Trading Reference Links

Hello, I've been trying for weeks now on this problem and would very 
much appreciate any guidance . How do I PROPERLY write AFL code for
the 
following:
 1st...the  closing price crosses over the 50day moving avg.,(I'm
using 
daily bar chart data ) 
 2nd... there is a higher high and higher low on the NEXT BAR ,after 
the 1st condition is met 
        If BOTH conditions are met, I then buy the OPEN , on the 
next bar or 3rd bar . 
 
 Here is the code I have written :

Crossover=Cross( Close, MA(Close,50) );
Higherhigh = H >Ref(H,-1);
Lowerlow=L > Ref(L,-1);
Buy= crossover AND Higherhigh AND Lowerlow ;
Sell=DayOfWeek()==5; 
 
  thank you very much for help here in advance , Phil 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

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