Hi guys. This is my code but looks like trading is not possible for my symbol. Thoughts ?
ZeroMemory(mrequest);
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 + TKP*_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);
The error message looks like this:
[Unsupported filing mode] -error: 4756
Now I've also experimented with
mrequest.type_filling = ORDER_FILLING_IOC;
and
mrequest.type_filling = ORDER_FILLING_RETURN;
The problem persists.
Also, I added the following:
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));
It prints out:
Filling Mode: 0
Symbol: EUR/USD
Account Company: AMP Global Clearing LLC
Account Server: AMPGlobalClearing-Demo-CQG