Comments that do not relate to the "Close all position function", have been moved into this topic.
- Close all position function
- Get in touch with developers using Service Desk!
- The Efficiency of MQL5 Indicators
Hi, sorry for my ignorance.
I'm using MetaTrader 5 and of course its Editor to write a simple EA.
If I have this order running:
mrequest.action = TRADE_ACTION_DEAL; // immediate order execution mrequest.price = NormalizeDouble(latest_price.ask,_Digits); // latest ask price mrequest.sl = NormalizeDouble(latest_price.ask - STP*_Point,_Digits); // Stop Loss //mrequest.tp = NormalizeDouble(latest_price.ask + 0*_Point,_Digits); // Take Profit mrequest.symbol = _Symbol; // currency pair mrequest.volume = Lot; // number of lots to trade mrequest.magic = EA_Magic; // Order Magic Number mrequest.type = ORDER_TYPE_BUY; // Buy Order mrequest.type_filling = ORDER_FILLING_FOK; // Order execution type mrequest.deviation=100; // Deviation from current price //--- send order OrderSend(mrequest,mresult);
Ho can I close it? There is not OpenClose() or similar function in the Editor. I get the error message saying that the "function is not defined". Any help will be appreciated.
Thx

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