I'm trying to test a system that trades both long and short. I don't want the system to enter a trade on the same bar it exits a trade on. I have my AFL set as follows:
SetTradeDelays( 1, 1, 1, 1 );
BuyPrice = O;
SellPrice = O;
ShortPrice = O;
CoverPrice = O;
Unfortunately, when I backtest, I often see a long exited and a short entered on the same bar.
I know there is a way to delay re-entry based on stops, but how do I prevent re-entry based on trades?
I want the system to wait until the next bar after a trade has been completed before entering another trade.
Thanks in advance for your help!