- Code shows error when trying to compile please help
- '}' - unexpected end of program test.mq5 164 1 and '{' - unbalanced parentheses test.mq5 41 1
- Unexpected end of program and unbalanced parentheses in my code
- 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 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
Forum on trading, automated trading systems and testing trading strategies
General rules and best practices of the Forum.
Alain Verleyen, 2018.08.03 23:01
When you post code please use the SRC button !
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>
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.
Also, please stop using ChatGPT to generate your code.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.
Stop using ChatGPT.
Help needed to debug and fix an AI EA - Trading Systems - MQL5 programming forum (2023)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use