Drew Clayman:
https://docs.mql4.com/trading/ordersend
I'm trying to work with MqlTradeRequest to make a simple script that just opens an order. I simply copied and pasted the script from the mql documentation, but it's not working for me. The MqlTradeRequest and MqlTradeResult don't highlight pink when I type them. I'm getting lots of errors, I imagine most of which have to do with it not recognizing the MqlTradeResult ('MqlTradeRequest' - undeclared identifier). This wouldn't have anything to do with a difference with mql4 and mql5 would it? What would the problem be?
It seems to highlight pink when I post here, but not on my MetaEditor. If its a problem with the version, how would I do this in mql4?
OrderSend - Trade Functions - MQL4 Reference
- docs.mql4.com
Returns number of the ticket assigned to the order by the trade server or -1 if it fails. To get additional error information, one has to call the GetLastError() function. At opening of a market order (OP_SELL or OP_BUY), only the latest prices of Bid (for selling) or Ask (for buying) can be used as open price. If operation is performed with a...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm trying to work with MqlTradeRequest to make a simple script that just opens an order. I simply copied and pasted the script from the mql documentation, but it's not working for me. The MqlTradeRequest and MqlTradeResult don't highlight pink when I type them. I'm getting lots of errors, I imagine most of which have to do with it not recognizing the MqlTradeResult ('MqlTradeRequest' - undeclared identifier). This wouldn't have anything to do with a difference with mql4 and mql5 would it? What would the problem be?
It seems to highlight pink when I post here, but not on my MetaEditor. If its a problem with the version, how would I do this in mql4?