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

RE: [amibroker] need some help on user-definable functions



PureBytes Links

Trading Reference Links

I am trying to do something in 'Explore' where I need a buy or sell 
signal for every day. That is why I used the '>' rather than 'cross'.
Now I want a 1 day delay between the signal and buy.
I found the last two lines in a AFL someone else had written. He said 
this would give the  'buy' 1 day after the signal. I can't get it to 
work!
Could someone tell me how to write this so when I do an 'Explore' it 
gives me the 1 day delay.
Thanks, Joe


Buy = (MA(C,10)>MA(C,20));
Sell = (MA(C,20)>MA(C,10));
BuyPrice = ValueWhen(Ref(Buy,-1),Open,0);
SellPrice = ValueWhen(Ref(Sell,-1),Open,0);




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