I'm developing trading program in MT5, when I tested the strategy, whatever strategy I developed, it always execute an other order after taking profit or stop loss. Anyone know why and how to stop it, thanks very much for your help!
- How to put stop loss and take profit instantly
- I can not place Stop Loss and not Take Profit to open an order.
- How to inform EA if an order is closed by hitting stop loss or take profit?
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
MQL5 forum: Expert Advisors and Automated Trading
- www.mql5.com
How to create an Expert Advisor (a trading robot) for Forex trading
nguyenhungmanh: I'm developing trading program in MT5, when I tested the strategy, whatever strategy I developed, it always execute an other order after taking profit or stop loss. Anyone know why and how to stop it, thanks very much for your help!
It is not "another" order and you can't prevent it. It is the order for the "out" deals to close the position. The same also happens on a live trading.
The orders for the "in" deals open the positions and the orders for the "out" deals close the positions.
MT5 works differently than MT4. Read the following ...
Orders, Positions and Deals in MetaTrader 5
MetaQuotes, 2011.02.01 16:13
Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from the trading server. To handle this data properly using the MQL5, it's necessary to have a good understanding of the interaction between the MQL5-program and the client terminal.
Fernando Carreiro #:
Thanks very much for explanation, I was so confused and didn't know what went wrong :-), now I understand
It is not "another" order and you can't prevent it. It is the order for the "out" deals to close the position. The same also happens on a live trading.
The orders for the "in" deals open the positions and the orders for the "out" deals close the positions.
MT5 works differently than MT4. Read the following ...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register