Unexpected end of program and unbalanced parentheses. Can somone help. - page 2

1193ped  
William Roeder #:
  1. Luck is not involved. Fix the first error, compile, repeat.

  2. Read the documentation. OnTick is a void function.

  3. Where is the closing brace?

  4. Don't change the file extension. It is MQ5!

I looked over documentation. I am confused, 

I dont understand where t he closing bracket is to be place. Ive placed it removed it placed it again.

Each time generating more errors.. 

I dnt understand  how to use t he error to solved t he issue, ive even watch videos on youtube for insight

I did not change file extension, I dont  have an mq5 file.  i only know how to attach a text file. (solved)

i was told not to put large code in comment section.


can you assist me, where does it want the  bracket?

perhaps also, why does it create more errors 

Files:
Num_2.mq5  6 kb
Keith Watford  

The code that you have posted appears to be MQL4, yet the file you have attached is mq5!

What are you working with MQL4 or 5??

1193ped  
Keith Watford #:

The code that you have posted appears to be MQL4, yet the file you have attached is mq5!

What are you working with MQL4 or 5??

mql5 

Keith Watford  
Keith Watford #:

The code that you have posted appears to be MQL4, yet the file you have attached is mq5!

What are you working with MQL4 or 5??

1193ped #:

mql5 

That is why you cannot compile it, you are using MQL4 code in a MQL5 EA.

1193ped  
Keith Watford #:

That is why you cannot compile it, you are using MQL4 code in a MQL5 EA.

perhaps my first post was wrong, this is my code, I believe its mql5 code in an mql5 EA, I cant solve the errors. 

Files:
Keith Watford  
1193ped #:

perhaps my first post was wrong, this is my code, I believe its mql5 code in an mql5 EA, I cant solve the errors. 

Why do you think that it is MQL5 code? It is definitely MQL4!

Who coded this?

1193ped  
Keith Watford #:

Why do you think that it is MQL5 code? It is definitely MQL4!

Who coded this?

I prompted an AI to write. 

1193ped  
Fernando Carreiro #:

Irrespective of it being an AI or code generator or a human coder, the fact still remains that the code, especially the trade management functionality, is definitely for MQL4 and not MQL5.

It will not compile or run on MetaTrader 5. It will need to be converted.

danke