You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to build my own trading algorithm with R, I'm having a demo account from GKFX broker, using the MT5. I downloaded the MT5R package, also set up everything in MT5 and connected R to MT5 (if I use MT5.ping() I receive a TRUE).
But I cannot place an order. If I want to create a single order with the following code
MT5.SingleOrder("EURUSD",0, fVol=0.01)
It always returns a FALSE and the Expert tab in MT5 tells me
When placing manually an order in MT5, I see the filling type is "IOC-Order" so I tried
MT5.SingleOrder("EURUSD",0, fVol=0.01, iFillType = 2)
But I received the same error messages
FYI - I applied the expoert to the specific chart and allowed algo trading, I also did a test by creating an order manually in MT5 and closing this order via R command (MT5.ClosePosition()) and this worked.
So I really don't know why I cannot create an order. Do you know what could be the issue?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I wanted to build my own trading algorithm with R, I'm having a demo account from GKFX broker, using the MT5. I downloaded the MT5R package, also set up everything in MT5 and connected R to MT5 (if I use MT5.ping() I receive a TRUE).
But I cannot place an order. If I want to create a single order with the following code
MT5.SingleOrder("EURUSD",0, fVol=0.01)
It always returns a FALSE and the Expert tab in MT5 tells me
2021.10.05 13:39:28.116 mt5R v0_1_5 (EURUSD,M1) OrderSend error 4756
and if I further check in the journal tab I receive following message.
2021.10.05 13:39:28.116 Trades '17588': failed market sell 0.01 EURUSD [Unsupported filling mode]
When placing manually an order in MT5, I see the filling type is "IOC-Order" so I tried
MT5.SingleOrder("EURUSD",0, fVol=0.01, iFillType = 2)
But I received the same error messages
FYI - I applied the expoert to the specific chart and allowed algo trading, I also did a test by creating an order manually in MT5 and closing this order via R command (MT5.ClosePosition()) and this worked.
So I really don't know why I cannot create an order. Do you know what could be the issue?
Thanks and best
Beta Was this translation helpful? Give feedback.
All reactions