PureBytes Links
Trading Reference Links
|
In the example below, I buy 3 stocks in a watch list based on the Buy condition. Let's say stock 1 stopped out, so the next day the system buys a new stock, stock 1A, to replace it and again holds 3 stocks. But, I want to only buy and replace stock 1 after stock 1 has met the sell condition, which could be several days later. Thus the system would only hold 2 stocks for a period of time until the sell condition is met. Is there a way to do this?
SetTradeDelays(1,1,1,1);
PositionSize = -100/3;
Buy = Cross(C,MA(C,200));
Sell = Cross(MA(C,50),C);
ApplyStop(stopTypeLoss, stopModePercent, 5);
Thanks in advance
Larry
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|