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

RE: [amibroker] Sell only if Gain > Target Gain.



PureBytes Links

Trading Reference Links

You can set the buy price in the AA settings, or define it in the AFL with 
BuyPrice = Valuewhen(buy, C+0.01 );//example only



Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia
-----Original Message-----
From: Michael.S.G. [mailto:OzFalcon@xxxxxxxx] 
Sent: Saturday, 11 October 2003 6:04 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Sell only if Gain > Target Gain.


How does one reference the Opening position price for a long trade?

I wish to make a sell condition based on the current gain.
ie
Buy=Cross(MA(C,2),MA(C,24));
cond1 = Cross(MA(C,24), MA(C,2));
cond2 = (BuyPrice / Close)*100 > 104;
Sell = cond1 AND cond2;

Im not sure if this code is actuualy working correctly. (ie buyprice).
Is it ok to use BuyPrice in this manner?

MSG.


  
Yahoo! Groups Sponsor
ADVERTISEMENT
 



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 the Yahoo! Terms of Service. 


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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/