Backtester not trigerring correct trade

46%20AM 28%20AM 15%20AM 35%20AM
code is trigering trade in Debug, trigering trade in scan, trigering trade in explorer but when i see trade list in backtester this trade is not present. how is this possible ?

Your Scan shows a Buy signal on 1/19/2010 at 9:24:59am. When you use the backtest mode backtestRegular (the default if you don't specify otherwise), AmiBroker will remove excess signals in a manner similar to what happens with:

Buy = ExRem(Buy,Sell);

Please see this page for details: https://www.amibroker.com/guide/afl/setbacktestmode.html

It appears to me that the Buy signal at 1:29:59pm has been removed due to the backtest mode you're using.

Yes I also though so, but this is not the case. Excess signal should be removed if there is any existing trade as explained in https://www.amibroker.com/guide/afl/setbacktestmode.html. But as you can see there was no open trade and funds available. there is no reason this signal should have been removed.

@mradtke is correct. @Samrat - You need to carefully study the manual http://www.amibroker.com/guide/h_portfolio.html (scroll down to the picture and study it)

1 Like

I think I got the problem. There is buy signal generated at 9:24AM due to sigScaleOut but it was not executed as trade because there was no pen position. due to this next buy ( real buy) generated at 1:29:59 PM is ignored. I change it to raw mode and it makes trade at 1:29:59. Thanks mradtke and Tomasz for help.