There is no OrderClose() anymore. You have to market an order of the same size, opposite direction.
Use predesigned library Trade.mqh for this purpose.
#include <Trade\Trade.mqh>
CTrade position;
More info can be found here: https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade
Documentation on MQL5: Standard Library / Trade Classes / CTrade
- www.mql5.com
Standard Library / Trade Classes / CTrade - Documentation on MQL5
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
Nice to meet every one.
What function can be used in MT5 to close a openned position trade?
OrderClose?
Thanks Very much.