Peter the key in the info I think is "this fixed order:" To change this I believe you would have to re-write them into AFL, probably in a loop to ensure you can ignore any unnecessary trade signals
-- Cheers Graham AB-Write >< Professional AFL Writing Service Yes, I write AFL code to your requirements http://e-wire.net.au/~eb_kavan/ab_write.htm On 4/7/06, Peter <[EMAIL PROTECTED]> wrote: > > > > Graham > > Thanks. My question really is can the order be changed? > > In the example below the Profit target stop is the open and the back tester > should show that instead of a max stop loss if also true. > > So can you change the order? > > > Peter > > > > . > > > > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf > Of Graham > Sent: Friday, 7 April 2006 12:25 p.m. > To: [email protected] > Subject: Re: [amibroker] ApplyStop Exit Order?? > > > > Help files are really useful for finding information > "If two or more different stops are triggered on the VERY SAME bar > then they are evaluated in this fixed order: > > Fixed Ruin stop (loosing 99.96% of the starting capital) > Max. loss stop > Profit target stop > Trailing stop > N-bar stop" > > -- > Cheers > Graham > AB-Write >< Professional AFL Writing Service > Yes, I write AFL code to your requirements > http://e-wire.net.au/~eb_kavan/ab_write.htm > > > > On 4/7/06, Peter <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi > > > > With multiple ApplyStop exits how do you control the order they are > > executed? > > > > > > > > In the below code I want to exit first using this line > > > > ApplyStop( stopTypeProfit, stopModePoint, 0.00001, 0 ); > > > > > > > > But if the above is not true then exit using the line > > > > ApplyStop(stopTypeLoss, stopModePoint, 30, 1 ); > > > > > > > > I notice if both exits are true on the same bar then the exit defaults to > > the points stop loss. > > > > How do you code it so the stopTypeProfit exit is checked first and if true > > then the stopTypeLoss exit is ignored > > > > > > > > > > > > Buy = DayOfWeek() == 1; > > > > BuyPrice = Open; > > > > Sell = 0; > > > > > > > > /* --------------------- Exits > > ------------------------------*/ > > > > SellPrice = Open; > > > > ApplyStop( stopTypeProfit, stopModePoint, 0.00001, 0 ); // First > > Profitable Open Exit > > > > ApplyStop(stopTypeLoss, stopModePoint, 30, 1 ); // > > Points Exit > > > > > > > > Any help would be appreciated. > > > > Peter > > > > 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 other support material please check also: > > http://www.amibroker.com/support.html > > > > > > > > > > ________________________________ > > YAHOO! GROUPS LINKS > > > > Visit your group "amibroker" on the web. > > > > To unsubscribe from this group, send an email to: > > [EMAIL PROTECTED] > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > To unsubscribe from this group, send an email to: > > [EMAIL PROTECTED] > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > ________________________________ > > > > > > > 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 other support material please check also: > http://www.amibroker.com/support.html > > > > > ________________________________ > YAHOO! GROUPS LINKS > > Visit your group "amibroker" on the web. > > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > ________________________________ > 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 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/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
