Discussion of article "Using limit orders instead of Take Profit without changing the EA's original code"
We should have overloaded PositionGetDouble.
OrdersTotal will see pseudo-TP. I.e. still impose certain restrictions on the use of this implementation.
How was the correctness of the solution checked?
Published article Implementation of Take Profit in the form of limit orders without changing the original code of the Expert Advisor:
Author: Dmitriy Gizlyk
I don't see the point in implementing this idea, as it will only result in additional expenses for the user in the form of commissions to the broker for opening a new position!
Why is there no doubt that one's point of view may be wrong?
Why is it not even questioned that one's own point of view can be wrong?
Unless I have missed something in the article, the option when a limit order may be partially executed (or not executed at all) and the price turns around has been left out of consideration.
While a market TP would work in full and with a guarantee of execution. This is a significant disadvantage of this methodology.
In general, it would be nice to add to MQL the setting of the SL/TP volume parameter and the possibility of several SL/TPs for one position (with different prices and volumes). This is a pipe dream.
Unless I missed something in the article, the option when a limit order may be partially executed (or not executed at all) and the price will reverse is left out of consideration.
While a market TP would work in full and with a guarantee of execution. This is a significant disadvantage of this methodology.
It happens everywhere where TP is a limit order. It cannot be a disadvantage.
Unless I missed something in the article, the option when a limit order may be partially executed (or not executed at all) and the price will reverse is left out of consideration.
While a market TP would work in full and with a guarantee of execution. This is a significant drawback of this methodology.
In general, it would be nice to add to MQL the setting of the SL/TP volume parameter and the possibility of several SL/TPs for one position (with different prices and volumes). This is a pipe dream.
1. If a limit order is not fully triggered, the rest of the order is left hanging waiting for the price.
2. As for the price turned around and left, it is possible even before reaching take profit. And the fact that the market order would have closed at a worse price, it is just a question of a philosophical approach to the strategy used: whether negative slippages are acceptable for you when executing take profit or not.
How was the correctness of the solution checked?
The correctness of the solution was checked in the tester and on a demo account. Testing was carried out both on a netting and hedge account.
Correctness of the solution was checked in the tester and on a demo account. Testing was carried out both on a netting and hedge account.
What was the test Expert Advisor?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Using limit orders instead of Take Profit without changing the EA's original code has been published:
Using limit orders instead of conventional take profits has long been a topic of discussions on the forum. What is the advantage of this approach and how can it be implemented in your trading? In this article, I want to offer you my vision of this topic.
In various forums, users criticize MetaTrader 5 for its market performance of take profit levels. Such posts can be found on this website forum as well. Users write about the negative impact of a slippage on the financial result during take profit execution. As an alternative, some propose using limit orders for replacing a standard take profit.
On the other hand, the use of limit orders, in contrast to the standard take profit, allows traders to build an algorithm for partial and stage-by-stage closing of positions, since in the limit order, you can specify a volume different from the position's one. In this article, I want to offer one of the possible options for implementing such a take profit substitution.
I believe, there is no point in arguing about what is better — the built-in take profit or limit orders replacing it. Every trader should solve this issue on the basis of their strategy principles and requirements. This article simply offers one of possible solutions.
Author: Dmitriy Gizlyk