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

[amibroker] Buy price



PureBytes Links

Trading Reference Links

I am really new at this and I am not a mathematician so I really hope 
somebody out there can give me a clue on this.
I am trying to assemble some simple system based on MACD crossings, 
meaning that I want to buy into a stock next day after the MACD 
crosses the 0 line from below. 
So far, I was only able to come up with the following:

Buy=((BarsSince(Cross(MACD(),Signal()))==1 AND Signal()>0)
OR (BarsSince(Cross(MACD(),0))==1 AND MACD()>Signal()));

after which I got stuck.

I will name the day of the crossing "Day0" and the day of the 
potential buy "Day1".
The trick here is that I want to trigger the buy only if the High in 
day one goes over a certain limit, calculated as 
Day1Open+ATR()*0.5

I have gone a little through the AB manual and I think that I should 
make use of the BuyPrice and BuyStop functions but I couldn't find 
any example on how to use them.

Thank you very much to whoever can give me some help,
Cristian


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