It will exit at trade price as defined in preferences. If you set trade price 
to OPEN (in the settings) it will exit on OPEN.

The line should read:
ApplyStop(stopTypeNBar,stopModeBars,2, 0, False, 2);

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "holygrail168" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, October 16, 2007 2:21 PM
Subject: [amibroker] How do you change stopTypeNBar to exit at the open of the 
exit day?


> Hi,
> 
> I'm trying to get the stopTypeNBar to work such that on the 3rd day 
> (including trade day) after purchasing the share, it will exit on the 
> market when it opens.
> 
> At the moment, my historical backtest keeps showing an exit price which 
> is at the market's high and not the market opening.
> 
> This is the line of code which I'm using and I've read and re-read the 
> applystop AFL code description but I can't find anything which allows 
> me to control the level at which we exit the N-bar stop.
> 
> ApplyStop(stopTypeNBar,stopModeBars,2, 1, False, 2);
> 
> 
> 
> 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
> 
> 
> 
> 
>

Reply via email to