Sometimes ApplyStop(profit) generates a profit that exceeds the specified stop value. This can happen when price gaps up in subsequent bars. In live trading, however, the exit order will be a resting limit order where price improvement might not actually happen. I will like to examine the results when the profit never exceeds the stop amount. How can I design a backtest without the price improvement?
This can happen only when there is a gap on open (between previous bar close and current bar open). In such case you would get exit at open of given bar. Generally trades are happening inside H-L range of the bar. If you for some reason want to trade outside H-L range, you have to turn off price checking via SetOption http://www.amibroker.com/f?setoption and in case of stops you need to write your own that exits outside H-L range.
@Tomasz Understood, thank you for the prompt reply.
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.