I'm developing a strategy and take it slow, step by step so that wouldn't have any issues. But I'm having an issue at the very first step

The strategy uses additional series of 1 min candles and main series of Daily candles (built from those 1m Candles in the moment of importing data). The instrument is 6E - Euro FX futures on CME (or alternatively the same applies for EURUSD spot).
So I started with just the long signal (enterLongStop on the level of pattern breakout) and tried to close position at the end of the same daily candle (exactly for that I added 1 min candles, so that I could apply Exit on close = true when setting up backtesting in GUI; so there's no code in strategy (for now) that uses update of 1 min candles, all the code is under
if (BarsInProgress == 0){}.
So the issue is:
In many cases I have exit happened BEFORE entry.
Here's sample of executions tab from strategy:
One thing I noticed here is that IDs of orders look to be right (0 for entry, 1 for exit), but again you can still see that exit happened earlier.
And here's the chart where you can see the same issue:
I'm wondering if I'm doing something wrong, and how at all is that possible? Looks like some dangerous bug...
Thanks for your help beforehand.

Comment