I am using daily Norgate data and converting the raw data into "as-traded" OHLC bars. I have a low level strategy loop that handles the entries and exits, and for each of the BuyPrice, SellPrice, ShortPrice, and CoverPrice I am using the "as-traded" calculated prices instead of the the raw prices. Because of this I have set the PriceBoundChecking option to false. Everything works fine for the long side, but for the short side it is exiting on the next bar, even though the strategy says to exit many bars later. And instead of using the "as-traded" price for the cover exit, it is using the raw prices. It is almost as though there is some hidden exit command that I am not seeing. It's very weird that the long side works fine, and just the short side is doing this. For debugging I have:
- commented out the PriceBoundChecking, and the issue goes away, but then it uses the unadjusting data instead of the "as-traded" data.
- If I comment out all of the exits in the low-level strategy loop it still takes one trade, and exits very next bar at the unadjusted price (same issue). Something external is making it exit, because all of mine are turned off.
Almost as if there is an exit like ApplyStop somewhere in the code, but there is not. The only place I have any exits are the low level loop.
Something else to note, the trades show fine on a chart. It is plotting up arrows and down arrows that I construct in the code at the right times and prices, for both long and short trades. This only happens in the Analysis backtester statistics.
Does anyone know what could be going on with this?