'SELECT_BY_POS' - undeclared identifier TradingRobot_010 (9).mq5 133 24
The code is for MT4, and you are trying to compile it with the MT5 terminal editor.
Use MT4 and its editor for that code.
The code is for MT4, and you are trying to compile it with the MT5 terminal editor.
Use MT4 and its editor for that code.
Thank you very much Vladislav .
You're right . I have only 5 errors with MT4
But is there again a problem between MT4 and MT5?
OrderCalcMargin and CopyBuffer are not part of MQL4; they belong to MQL5.
....
can't open "C:\users\chris\AppData\Roaming\MetaQuotes\Terminal\29FF6A555EE0C1299CC74E9104F718AF\MQL4\Include\TradeFunctions.mqh" include file TradingRobot_010 (9).mq4 5 11
'iATR' - wrong parameters count TradingRobot_010 (9).mq4 59 30
possible loss of data due to type conversion TradingRobot_010 (9).mq4 59 29
'iMA' - wrong parameters count TradingRobot_010 (9).mq4 60 32
possible loss of data due to type conversion TradingRobot_010 (9).mq4 60 31
'OrderCalcMargin' - function not defined TradingRobot_010 (9).mq4 575 8
'CopyBuffer' - function not defined TradingRobot_010 (9).mq4 584 15
5 errors, 2 warnings 6 3
;
OrderCalcMargin and CopyBuffer are not part of MQL4; they belong to MQL5.
Judging by the file name, I can assume that this is version 10. Perhaps you previously added MQL5 code to the existing MQL4 code.
I compiled it: 0 errors. The robot worked normally.
Take the code that previously worked fine and compile it for MT4
The problem with TradingRobot_010 is that it is a mix of MQL4 and MQL5 code. A mix of MQL4 and MQL5 code cannot be compiled without errors anywhere.
Judging by the file name, I can assume that this is version 10. Perhaps you previously added MQL5 code to the existing MQL4 code.
Take the code that previously worked fine and compile it for MT4
The problem with TradingRobot_010 is that it is a mix of MQL4 and MQL5 code. A mix of MQL4 and MQL5 code cannot be compiled without errors anywhere.
Thank you for your response.
What surprises me is that when I initially compiled the mq5 source code, I got 0 errors. This is why I wonder if the new errors are due to the robot or MetaEditor. I mean, maybe it's the latest updates to MetaEditor that are causing these errors

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Message for the developers
Hi,
I’m having trouble solving a problem, and I can't figure out the reason (I'm not a coder).
I had a trading robot developed on this site.
I compiled it: 0 errors. The robot worked normally.
But, to my surprise, some time later, the robot showed 103 errors after compilation!
I thought it might be due to using an outdated version of MetaEditor. I downloaded the latest version and updated my MetaEditor.
But the problem remained the same: 103 errors.
So, where could the errors be coming from?
I’m providing an excerpt of these errors below.
THANK YOU IN ADVANCE FOR YOUR RESPONSES!!