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

[amibroker] Re: code for trailing stop



PureBytes Links

Trading Reference Links

Well my code for this is for now:

X = Optimize( "Trailing Stop", 0.25, 0.1, 0.5, 0.05 ); 
Sell = Close *(1+X) < HighestSince(currentbar-positionentry,H); 
Buy = Close*(1-X) > LowestSince(currentbar-positionentry,L);
Short = Sell;
Cover = Buy;

Is there a way to program the positionentry so that Amibroker will 
know at what bar did I enter last trade?








------------------------ 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/l.m7sD/LIdGAA/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/