Error compiling a sample EA

 

I tried compiling an EA which is posted below

https://www.mql5.com/en/articles/100

The code is giving compilation error at the following (as wrong parameters count)

adxHandle=iADX(NULL,0,ADX_Period);

I do not see any issue with the statement. How do I fix the error? Error list is attached.

Step-By-Step Guide to writing an Expert Advisor in MQL5 for Beginners
Step-By-Step Guide to writing an Expert Advisor in MQL5 for Beginners
  • 2010.06.09
  • //www.mql5.com/en/users/olowsam">
  • www.mql5.com
The Expert Advisors programming in MQL5 is simple, and you can learn it easy. In this step by step guide, you will see the basic steps required in writing a simple Expert Advisor based on a developed trading strategy. The structure of an Expert Advisor, the use of built-in technical indicators and trading functions, the details of the Debug mode and use of the Strategy Tester are presented.
Files:
Errors.JPG  58 kb
 

double  iADX(
   string       symbol,        // symbol
   int          timeframe,     // timeframe
   int          period,        // averaging period
   int          applied_price// applied price
   int          mode,          // line index
   int          shift          // shift
   );



The last 3 parameters are missing
 

Code from that page is for Metatrader 5.

You saved that code into a mq4 file so compiler uses MQL4 syntax. 

MQL5 and MQL4 are not 100% source code compatible. 

 
Drazen Penic:

Code from that page is for Metatrader 5.

You saved that code into a mq4 file so compiler uses MQL4 syntax. 

MQL5 and MQL4 are not 100% source code compatible. 

It is like ex4 rename to mq4 and you will get source code:)))))))))))
 
Fstrifoerr8:
It is like ex4 rename to mq4 and you will get source code:)))))))))))

Not quite! Let us not confuse the OP with such comments which he will misinterpret!

The OP has just begun learning and it is difficult enough for him to distinguish between MQL4 and MQL5. No need to mislead and confuse him even more!

 
Fernando Carreiro:

Not quite! Let us not confuse the OP with such comments which he will misinterpret!

The OP has just begun learning and it is difficult enough for him to distinguish between MQL4 and MQL5. No need to mislead and confuse him even more!

ok.

It was a joke. 

Reason: