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

Re: [amibroker] ApplyStop Exit Order??



PureBytes Links

Trading Reference Links

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

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