here is test script:
it works on ForexTime-ECN but fail on FxPro-ECN.
here is error log:
2015.05.08 22:08:39.046 Trades '5007498': failed market buy 0.01 AUDCAD [Unsupported filling mode]
anyone know what happen?
Really, an old member like you don't know that ?
You have to check the filling mode accepted by your symbol. See SYMBOL_FILLING_MODE.
- www.mql5.com
Really, an old member like you don't know that ?
You have to check the filling mode accepted by your symbol. See SYMBOL_FILLING_MODE.
Rather similar problem here (also on FxPro MT5):
I have a pending sell stop order with ticket number nTicket and open price fOpenPrice, now I try to push its take profit further away from open price by calling
CTrade::OrderModify( nTicket, fOpenPrice, 0, fTakeProfit, ORDER_TIME_GTC, 0 )
but it fails with error code 10030 (invalid fill). Journal message: "failed order #9 sell stop 0.01 at 128.47000 sl: 0.00000 tp: 128.28700 -> 128.47000, sl: 0.00000 tp: 127.78700 [Unsupported filliing mode]"
Of course I tried all possible settings for CTrade::SetTypeFilling(), but nothing helps. SymbolInfoInteger( _Symbol, SYMBOL_FILLING_MODE ) returns 2 (ORDER_FILLING_IOC = Immediate or Cancel).
Any advice warmly appreciated :-)
Hi
I have the same problem with FxPro.
First I used IronFX MT5 (demo) with no problems and later FXpro also with no problems but since a few weeks ago, I get the same "Unsupported filling mode" error.
This is my code for the buy trade.
// Define some MQL5 Structures we will use for our trade MqlTradeRequest mrequest; MqlTradeResult mresult; ZeroMemory(mrequest); ZeroMemory(mresult); // Alleen bij een correcte trade size mag het model de positie openen. if(dTradePosition_Size <= dDynamicPosition_Trading_Size && dTradePosition_Size > 0) { Alert("Het model gaat een KOOP order openen voor de: ", Symbol(), " met prijs: ", NormalizeDouble(Latest_Price.ask, Digits()), " en trade size: ", dTradePosition_Size); mrequest.action = TRADE_ACTION_DEAL; // immediate order execution stoploss en takeprofit worden aangepast mrequest.price = NormalizeDouble(Latest_Price.ask, Digits()); // latest ask price mrequest.symbol = Symbol(); // currency pair mrequest.volume = dTradePosition_Size; // number of lots to trade mrequest.magic = EA_Magic_Number; // Order Magic Number mrequest.type = ORDER_TYPE_BUY; // Buy Order mrequest.type_filling = ORDER_FILLING_RETURN; // Order execution type mrequest.deviation = 1000; // Max prijs afwijking if(OrderSend(mrequest,mresult) == true) {Alert("De order is met prijs: ", Latest_Price.ask, " naar de markt gestuurd!");} Sleep(375); // 0.375 seconden vertraging om de order te verwerken. Alert("Antwoordcode van trade server = ", mresult.retcode); if(mresult.retcode == 10008 || mresult.retcode == 10009) //Request is completed { nTradeCounter++; // Check de model versie voor het afspelen van geluid. if(EA_Magic_Number == 100 || EA_Magic_Number == 102) { PlaySound("OpenTrade"); // Geluid afspelen. } // Melding van het scenario type weergeven nadat de trade is geopend. Alert("Een Koop order voor scenario type: ", nOpenTrade_ScenarioType, " is succesvol uitgevoerd! Trade volume: ", dTradePosition_Size); } else { Alert("The Buy order request could not be completed -error:",GetLastError()); ResetLastError(); return; } } else // Het trade volume is niet goed berekend. { Alert("Het berekende volume is onjuist!!! ", dTradePosition_Size); }
here is test script:
it works on ForexTime-ECN but fail on FxPro-ECN.
here is error log:
2015.05.08 22:08:39.046 Trades '5007498': failed market buy 0.01 AUDCAD [Unsupported filling mode]
anyone know what happen?
Uh-oh, this is quite interesting, because different Brokers deliver different SYMBOL_FILLING_MODEs on the same symbol. Just try this
void OnTick() { int FillingMode=(int)SymbolInfoInteger(_Symbol,SYMBOL_FILLING_MODE); Comment ( "Filling Mode: ",FillingMode, "\nSymbol : ", SymbolInfoString(_Symbol, SYMBOL_DESCRIPTION), "\nAccount Company: ", AccountInfoString(ACCOUNT_COMPANY), "\nAccount Server : ", AccountInfoString(ACCOUNT_SERVER)); }
...and wonder, why they have different results for SYMBOL_FILLING_MODE on the same _Symbol. IMHO, this looks frightening to me... Who is right? And Filling Mode 3 is ORDER_FILLING_FOK, what - again imho should work on all orders...
I am new to FX EA programming, so, sorry the stupid question: Is it OK, that different Broker have different Filling Modes?
Best regards, Roland
Is it OK, that different Broker have different Filling Modes?
Yes.
Yes.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
here is test script:
it works on ForexTime-ECN but fail on FxPro-ECN.
here is error log:
2015.05.08 22:08:39.046 Trades '5007498': failed market buy 0.01 AUDCAD [Unsupported filling mode]
anyone know what happen?