PureBytes Links
Trading Reference Links
|
I am trying to apply a percentage stop loss based on closing price and
exit positon the next day. I am using end of the day stocks. The
following code does NOT give me a 1 bar delay (as the manual says it
should not). I need something like ExitAtStop = 2 but rather than
evalulating the loss based on H-L, I want it to evaluate loss based on
close. Any suggestions? TIA
SetTradeDelays( 1, 1, 1, 1);
SetOption("ActivateStopsImmediately",False);
Short = Cover =0;
Buy=1;
Sell=0;
SellPrice = IIf(High <Ref(Close,-1), Close,Max(Ref(Close, -1), Open));
ExitAtStop = 0; // Use closing price to calculate stop loss percentage
MaxLossPercentStop = 15 ;
ApplyStop(stopTypeLoss, stopModePercent, MaxLossPercentStop,
ExitAtStop, False, 0);
------------------------------------
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
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/
|