Hello everybody,
First, thanks to all contributors, you've been helping me for years!
I'm migrating my bots from MT4 to MT5, and all have been fine until now. But I have a question, and I'm sure the answer is simple, but I can't get it...
Here is the problem :
- On MT4, to know all the open positions with the EA, I justed counted the OP_BUY positions with the same Magic and on the same symbol.
- On MT5, I open new positions, but when I want to check those positions, using the PositionsTotal(), I only get 1!
If it can helps, here is the code for the exemple :
With this, PositionsTotal() only returns 1. But when I look the volume of the position, it goes up.
And if I look to the backtest, I have 1 trade, but 1225 operations.
So I I understand well, I'm not opening a new position but I'm working only with one position which is going up and up?
Is it possible to make independent positions? In my case, I'd need to get the infos of each position (for the TP, SL, etc.).
Thanks for your help!
Hello Dominik,
Thanks for your fast answer! I spent hours trying to understand!
Have a nice day 😊

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everybody,
First, thanks to all contributors, you've been helping me for years!
I'm migrating my bots from MT4 to MT5, and all have been fine until now. But I have a question, and I'm sure the answer is simple, but I can't get it...
Here is the problem :
- On MT4, to know all the open positions with the EA, I justed counted the OP_BUY positions with the same Magic and on the same symbol.
- On MT5, I open new positions, but when I want to check those positions, using the PositionsTotal(), I only get 1!
If it can helps, here is the code for the exemple :
With this, PositionsTotal() only returns 1. But when I look the volume of the position, it goes up.
And if I look to the backtest, I have 1 trade, but 1225 operations.
So I I understand well, I'm not opening a new position but I'm working only with one position which is going up and up?
Is it possible to make independent positions? In my case, I'd need to get the infos of each position (for the TP, SL, etc.).
Thanks for your help!