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

RE: [amibroker] ApplyStop Exit Order??



PureBytes Links

Trading Reference Links

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: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Graham
Sent: Friday, 7 April 2006 12:25 p.m.
To: amibroker@xxxxxxxxxxxxxxx
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 <aretep@xxxxxxxxxx> 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:
>  amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>  To unsubscribe from this group, send an email to:
>  amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
>  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