hello,
great text, tyvm.
I have found 1 small bug:
in the box under TRADE_ACTION_SLTP you have written twice request.sl, the second one should be request.tp, as indicated in the comment at the end of the line.
Best Regards,
Gunther

- www.mql5.com
hello,
great text, tyvm.
I have found 1 small bug:
in the box under TRADE_ACTION_SLTP you have written twice request.sl, the second one should be request.tp, as indicated in the comment at the end of the line.
Best Regards,
Gunther
Hello,
Thanks for your kind comment. You are correct, it is a mistake and it will be considered.
Regards,
Hello Abdel Maaboud,
thank you for your kindness wrote this tutorial.
This tutorial only give order placement. Is there any code for close position (take profit or cut loss) in your article ?
Best Regards,
Ahmad Juniar


- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Check out the new article: Understanding order placement in MQL5.
When creating any trading system, there is a task we need to deal with effectively. This task is order placement or to let the created trading system deal with orders automatically because it is crucial in any trading system. So, you will find in this article most of the topics that you need to understand about this task to create your trading system in terms of order placement effectively.
Order: is a request received by the trading server to open a buy or sell trade with a specific lot or volume at a specific price. There are two types of orders, the market order and the pending order.
These pending orders can be one of the following:
Once the order placed, regardless of whether it is a market or pending order, it can be found in the Trade tab of the Toolbox in the MetaTrader 5. The following is an example:
When the order is closed or canceled without execution, we can find them in the History tab of the Toolbox.
When we want to modify a current position by MQL5, we need to deal with these orders the same as we will see later when handling order modifying.
Author: Mohamed Abdelmaaboud