Hi, I have the same problem with FX-PRO when I try to close a long position.
MqlTradeRequest request;
ZeroMemory(request);
request.type = ORDER_TYPE_SELL;
request.price = SymbolInfoDouble(Symbol(),SYMBOL_BID);
request.action = TRADE_ACTION_DEAL; // assigns the action type that will be executed by OrderSend
request.position = ticket; // assigns the position ticket
request.symbol = _Symbol; // assigns the name of the asset where the order will be sent to
request.volume = PositionGetDouble(POSITION_VOLUME); // assign the operation volume in lots
request.type_filling = 2 ;// assigns the execution typeMqlTradeResult result;
ZeroMemory(result);
bool res =OrderSend(request,result);
I saw filling mode for EURUSD is 2, but it doesn't work.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Or better yet..
Hi, I have the same problem with FX-PRO when I try to close a long position.
I saw filling mode for EURUSD is 2, but it doesn't work.
Could you help me?
Thank you!
Well I spoke directly to FX PRO and the say that it's not possible to totally or partially close a position in strategy tester.
I seem quite strange.
Anyone having the same experience?
Trying to manually manage an order I see the Fill polic is "Immediate or Cancel".
So I'm using this option in my experts and I seem it's works weel.