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.
Hello, sorry to annoy you with beginner questions, but believe me when I say I've tried for 2 days straight using google...
I've switched from MQL4 to MQL5, and I'm surprised how hard it is to even have my EA make a trade. Can somebody tell me what I'm doing wrong here:
I filled out my " MqlTradeRequest request;" in the following way (I print out these values each tick):
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) comment: stuff
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) type_filling: 0
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) type: 0
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) deviation: 0
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) tp: 1.12029
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) sl: 1.11929
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) price: 1.11979
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) volume: 0.1
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) symbol: EURUSD
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) magic: 9996
2015.02.26 23:19:27.015 FirstOne (EURUSD,M1) action: 1
When I send these into the ordersend(request,result); I get result.comment: "Invalid request".
I question the "action" and the "type_filling"
I declared them like this:
request.action=TRADE_ACTION_DEAL;
request.type_filling=ORDER_FILLING_FOK;
Help is appreciated! =)