{"id":35,"date":"2006-09-29T06:48:44","date_gmt":"2006-09-29T11:48:44","guid":{"rendered":"http:\/\/www.amibroker.com\/kb\/2006\/09\/29\/stops-priority-in-the-default-backtest-procedure-in-amibroker\/"},"modified":"2014-12-04T15:56:12","modified_gmt":"2014-12-04T20:56:12","slug":"stops-priority-in-the-default-backtest-procedure-in-amibroker","status":"publish","type":"post","link":"https:\/\/www.amibroker.com\/wordpress\/kb\/2006\/09\/29\/stops-priority-in-the-default-backtest-procedure-in-amibroker\/","title":{"rendered":"Stops priority in the default backtest procedure in AmiBroker"},"content":{"rendered":"
The order stops are triggered in the backtest is the following:
\u00a0– Fixed Ruin stop (loosing 99.96% of the starting capital)
\u00a0– Max. loss stop
\u00a0– Profit target stop
\u00a0– Trailing stop
\u00a0– N-bar stop* (see below)<\/p>
In versions 4.61 and higher: you can decide if N-BAR stop has the lowest or the highest priority. <\/p>
ExitAtStop parameter in ApplyStop function is used for that purpose.
\u00a0– If ExitAtStop = 0 then N-bar stop has the lowest priority (so if for example profit target stop is hit on the same bar then profit target is evaluated first)
\u00a0– If ExitAtStop = 1 then N-bar stop has highest priority and it is evaluated before all other stops.<\/p>
The same effect is obtained by checking “Has priority” box in AA Settings window.<\/p>","protected":false},"excerpt":{"rendered":"
The order stops are triggered in the backtest is the following:\u00a0– Fixed Ruin stop (loosing 99.96% of the starting capital)\u00a0– Max. loss stop\u00a0– Profit target stop\u00a0– Trailing stop\u00a0– N-bar stop* (see below)In versions 4.61 and higher: you can decide if N-BAR stop has the lowest or the highest priority.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[40],"tags":[53,14,15],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/35"}],"collection":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/comments?post=35"}],"version-history":[{"count":1,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":840,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/35\/revisions\/840"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}