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

RE: [amibroker] same problem



PureBytes Links

Trading Reference Links

Don't know if you need all the Equity(0)s...

-----Original Message-----
From: Adrian Zaremba [mailto:headcutter@xxxxxxxx]
Sent: Thursday, August 28, 2003 10:57 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] same problem


sell = Cross(X, X);
buy = Cross(X, X);
Short = Sell;
Cover = Buy;
ApplyStop( 1, 1, Optimize( "Profit Target", X, X, X,X ), False,
False ); /* Profit Target */
Short = Sell == 3;
Equity(0);
ShortPrice = SellPrice;
Equity(0);

Buy = Cover == 3;
Equity(0);
BuyPrice = CoverPrice;
Equity(0);

OK I asked this question earlier but it still isnt working properly.
This code only generates Long signals(it is either Out or Long), if
I do not use the last 4 lines it generates long and short(it works
correctly) but it doesnt work in such a manner that when the profit
target is hit I trade in the opposite direction(and that is what I
want). Any ideas? Thanks



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/



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