I'm running into a suspicious case with the strategy analyzer. For context: I have a strategy which is set to calculate on price change. The strategy enters with two entry orders at the same time (in code one line after the other). Each has its profit target (T1 and T2) and a common stop loss. Now, when T1 is hit, the stoploss gets updated to the breakeven/entry price of both positions. In the code, this happens in OnOrderUpdate. Usually, this works as intended. However, on rare occasions, when T1 is hit, the exit for the respective entry order gets executed correctly, but the other entry order hits the initial stop loss, not on the breakeven level.
I assume that is expected to happen when prices move quick enough, i.e. quicker than the strategy updates the stop loss. The reason I'm opening this post however is that while I was inspecting the executions, I found that in such cases the execution order looks strange. In the attached image, take a look at the bottom executions. What I would expect to happen is to see Entry 5S, Entry 10 ... like with the other executions. But what seems to happen is that the first entry is processed, hits its profit target, then the second entry is processed but hits the initial stop loss.
Is it possible to clarify that what I'm seeing here is indeed the result of rapid price movement, or has it something to do with the strategy analyzer itself?
Further, should I expect such cases to see in live trading as well or not?
For more context: The strategy analyzer runs with tick replay enabled. With it disabled such cases don't seem to happen, which I would say is to be expected.
Also, why do all executions happen on the first second of each minute? And not like in between? The timeframe is 1min., but I would expect executions to happen throughout the minute if tick replay is enabled and the strategy updates more frequent than on bar close. This is something which I've noticed in general, not just this specific case. I assume that this is just how the strategy analyzer displays the executions, but I'd like a confirmation for that if possible.

Comment