Hi there, A bit of a strange one, I have.
My buy is on the open at the opening price. My sell is equivalent to a profit stop, selling when price exceeds a threshold price. In backtesting, when a trade exits as a result of price exceeding the threshold, if that bar also happens to be a candidate for a buy, the backtester will assume the first trade has exited, and will report another trade on that bar (at the open price) - which happens to exit on the same bar, since entry and exit criteria exist on the same bar. This is skewing my results fairly significantly. Has anyone had this issue, and is there a way around it? There are alot of valid trades that are only 1 bar long, so I can't simply uncheck "Allow same bar exit". I need to be able to tell the backtester that there if there is a trade that exists at the time of open, so ignore the trade for that bar, if that existing trade exits later in the bar.... That sounded horrible, but hopefully you will get my drift... Perhaps if I could find a way to determine if I was in a trade on the previous bar, I would be able to exclude any buys on the current bar? snip___________ Forget the above, I have worked it out. I thought I should still post so others might know how to do it, should they have the same problem. I added the 'flip' function so AB would know if I was in a trade on the previous bar: InTrade = Flip( Buy, Sell ); InTrades = Flip( Short, Cover ); Buy = Buy AND NOT Ref(intrade,-1); Short = Short AND NOT Ref(intrades,-1);
