I'm fairly new to mt5,
But I calculate my TP levels based on the deals i made (Not on the open position), I don't send a TP or SL order, I just send a trade request to close the deal when the TP or SL is is reached.
Still new to the 1 position only for each instrument.
So what I do:
- calculate your profits and losses based on deals made.
- when TP or SL is reached send trade request to close the deal
I find that doing it this way it's still the same as having x amount of open positions for in mt4 an up position cancels out a down position, it's all about the net worth result now.
If your having trouble knowing which deal to compensate, use magic numbers for each session/deal/signal depending on your trading style/ code writing
Hope this helps.

- www.mql5.com

- 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 all,
I have a problem with using hidden TP and SL in mql5. How to write it ?
Many thank for your help.