MetaEditor Compile Error Help

 
So I need help with certain errors showing up whenever I compile my code. I feel like i have done everything I could but now I need to reach out to some other experts.. 'iMA' - wrong parameters count built-in: int iMA(const string,ENUM_TIMEFRAMES,int,int,ENUM_MA_METHOD,int) scalptheyass.mq5 29 18 '{' - unbalanced parentheses scalptheyass.mq5 52 1 AND ')' - unexpected end of program scalptheyass.mq5 74 1 PLEASE HELP IT IS MUCH APPRECIATED
 
completeprecision: So I need help with certain errors showing up whenever I compile my code. I feel like i have done everything I could but now I need to reach out to some other experts.. 'iMA' - wrong parameters count built-in: int iMA(const string,ENUM_TIMEFRAMES,int,int,ENUM_MA_METHOD,int) scalptheyass.mq5 29 18 '{' - unbalanced parentheses scalptheyass.mq5 52 1 AND ')' - unexpected end of program scalptheyass.mq5 74 1 PLEASE HELP IT IS MUCH APPRECIATED
  • unbalanced parentheses

Just as the error is reporting, you have unbalanced parentheses. Meaning that for every opening "{", you do not have a corresponding closing "}", and for every opening "(", the corresponding closing ")". They are unbalanced, so you have to correct them.

  • wrong parameters count
The function you are using does not have the correct number of parameters. Lookup the function in the documentation and verify that you are using the correct number of parameters.
In the case of iMA(), it has 6 parameters:
int  iMA(
   string               symbol,            // symbol name
   ENUM_TIMEFRAMES      period,            // period
   int                  ma_period,         // averaging period
   int                  ma_shift,          // horizontal shift
   ENUM_MA_METHOD       ma_method,         // smoothing type
   ENUM_APPLIED_PRICE   applied_price      // type of price or handle
   );
 
If you need further help, then attach your full code, using the button just below the posting box.
 
Fernando Carreiro #:
If you need further help, then attach your full code, using the button just below the posting box.


@Fernando Carreiro thank you! I'm just now seeing this. I've tried making a few EA's and I have one that I wanted to be a RVI cross and MA cross combined EA and it compiles but it doesn't do what I need it to do I feel like. The code its quite tricky as I am confused on how to get it to do exactly what I need it to do..I already have the code, let me attach it 

Fernando Carreiro
Fernando Carreiro
  • 2023.04.02
  • www.mql5.com
Trader's profile
 
completeprecision #: @Fernando Carreiro thank you! I'm just now seeing this. I've tried making a few EA's and I have one that I wanted to be a RVI cross and MA cross combined EA and it compiles but it doesn't do what I need it to do I feel like. The code its quite tricky as I am confused on how to get it to do exactly what I need it to do..I already have the code, let me attach it 
Improperly formatted code removed by moderator
 

completeprecision #
:


@Fernando Carreiro thank you! I'm just now seeing this. I've tried making a few EA's and I have one that I wanted to be a RVI cross and MA cross combined EA and it compiles but it doesn't do what I need it to do I feel like. The code its quite tricky as I am confused on how to get it to do exactly what I need it to do..I already have the code, let me attach it 

I need help fixing this code. It would be greatly appreciated. It won't compile correctly and I am fairly new to coding. 

<Moderator: You were requested to edit your previous post and format properly your code, no further help until it's done>

Files:
4bot.mq5  2 kb
 
completeprecision #: I need help fixing this code. It would be greatly appreciated. It won't compile correctly and I am fairly new to coding. 

You are using MQL4 code (mixed with MQL5) and expecting it to work on MQL5. That will not work. Either learn to convert it to proper MQL5 code or hire someone to do it for you.

Articles

Migrating from MQL4 to MQL5

Sergey Pavlov, 2010.05.17 13:32

This article is a quick guide to MQL4 language functions, it will help you to migrate your programs from MQL4 to MQL5. For each MQL4 function (except trading functions) the description and MQL5 implementation are presented, it allows you to reduce the conversion time significantly. For convenience, the MQL4 functions are divided into groups, similar to MQL4 Reference.
Also, please stop using ChatGPT to generate your code.
 
 
Comments that do not relate to this topic, have been moved to "Off-topic posts".
Reason: