I am guessing here, but looking at the first 4 lines of the journal, they all occur at the same time (16:48:24)
- Order #33 appears to hit the tp: 1.13204 so it sells
- At the same time order #150 buys at at 1.13204
So it looks like these could be independent transactions, with the broker just matching buy and sell orders of the same volume - just so happens you are on both sides of the deal but at least they are kind enough to inform you.
The second set of journal lines seem to exhibit the same pattern - perhaps experimenting with differing order volumes, prices for buy/sell could rule this out and reveal if this is so, but I have not seen this in my journal logs.
Maybe keeping the "Depth of Market" window open could help you explore this pattern too.
https://www.metatrader5.com/en/terminal/help/trading/depth_of_market
![Depth of Market - Trading Operations - MetaTrader 5 Help Depth of Market - Trading Operations - MetaTrader 5 Help](https://c.mql5.com/36/57/depth-of-market-trading-operations.png)
- www.metatrader5.com
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am making an Expert Advisor and I've run into an issue. Some of the orders that are placed are immediately canceled by other orders stop loss and take profits.
For example In my journal it says that order #33's take profit was triggered by order #150's price:
2022.07.22 19:57:08.340 Core 01 2022.01.03 16:48:24 take profit triggered #33 sell 0.01 EURUSD 1.13259 sl: 1.13292 tp: 1.13204 [#150 buy 0.01 EURUSD at 1.13204]
2022.07.22 19:57:08.340 Core 01 2022.01.03 16:48:24 deal #150 buy 0.01 EURUSD at 1.13204 done (based on order #150)
2022.07.22 19:57:08.340 Core 01 2022.01.03 16:48:24 deal performed [#150 buy 0.01 EURUSD at 1.13204]
2022.07.22 19:57:08.340 Core 01 2022.01.03 16:48:24 order performed buy 0.01 at 1.13204 [#150 buy 0.01 EURUSD at 1.13204]
2022.07.22 19:57:08.340 Core 01 2022.01.03 16:48:25 take profit triggered #63 sell 0.01 EURUSD 1.13259 sl: 1.13281 tp: 1.13203 [#151 buy 0.01 EURUSD at 1.13203]
2022.07.22 19:57:08.340 Core 01 2022.01.03 16:48:25 deal #151 buy 0.01 EURUSD at 1.13203 done (based on order #151)
2022.07.22 19:57:08.340 Core 01 2022.01.03 16:48:25 deal performed [#151 buy 0.01 EURUSD at 1.13203]
2022.07.22 19:57:08.340 Core 01 2022.01.03 16:48:25 order performed buy 0.01 at 1.13203 [#151 buy 0.01 EURUSD at 1.13203]
Here is the code for my orders:
Buy
Sell