Compiler Errors - Basic MQL5 Functions (SeriesBars, TimeHour) Undeclared After Update/Reinstall (Build 5120)

 

What I Have Tried So Far (Without Success):

  1. Multiple Clean Re-installations of MetaTrader 5: I have uninstalled MT5, manually deleted the installation folder (e.g., C:\Program Files\MetaTrader 5 ) and the data folder ( C:\Users\[YourUsername]\AppData\Roaming\MetaQuotes\Terminal\[InstanceID] ), restarted my PC, and then re-installed the latest stable build from [আপনার ব্রোকারের নাম বা MetaQuotes ওয়েবসাইট এর নাম] website. The problem persists.
  2. Testing with a "Hello World" EA: An extremely basic EA with only OnInit() and Print("Hello") compiles fine (0 errors, 0 warnings). However, as soon as I add any of the standard functions mentioned above, the "undeclared identifier" errors reappear.
  3. Checking File Start: Ensured that #property strict is at the beginning of the file and there are no leading characters.
  4. Suspected Update Issue: I recall there was an automatic update of MetaTrader 5 a few days ago, and these problems seem to have started around that time.

Previous Experience: I have successfully developed and compiled EAs on this same system before without these issues. This problem is recent.

Attached Screenshot: (এখানে আপনার একটি পূর্ণাঙ্গ কোডের (যেমন USD_ST_FreshTry.mq5) কম্পাইলেশন ত্রুটির একটি পরিষ্কার স্ক্রিনশট যোগ করুন, যেখানে "undeclared identifier" এবং অন্যান্য সিনট্যাক্স ত্রুটি দেখা যায়)

I am at a loss as to what to do next. The compiler seems unable to recognize its own standard library functions. This makes any MQL5 development impossible.

Could this be a known issue with Build [আপনার MT5 বিল্ড নম্বর]? Is there any specific file corruption I should look for, or any other troubleshooting steps I can take? Any help or guidance from the community or MetaQuotes support would be greatly appreciated.

Thank you.

 
Hello!

Instead of opening your file directly, try going through MetaTrader's navigation tab and pressing "Edit" on your indicator / ea / script.

Sometimes, it seems there are multiple MetaEditors and only by opening through MetaTrader do you get the correct one.  
 
sulaiman dipu:

I am at a loss as to what to do next. The compiler seems unable to recognize its own standard library functions. This makes any MQL5 development impossible.

Could this be a known issue with Build [আপনার MT5 বিল্ড নম্বর]? Is there any specific file corruption I should look for, or any other troubleshooting steps I can take? Any help or guidance from the community or MetaQuotes support would be greatly appreciated.

Please, attach a test file to reproduce the problem. Your screenshots show errors in your code, not in the standard library.

 
I don't see anything "Urgent" here, so I edited your topic title.
 
It is obvious that this "report" was generated by an AI as a result of unsuccessful attempts to fix the generated code. And it is obvious that OP is unlikely to show any more activity here. This is not the first such thread and it will not be the last. Usually such threads are deleted by someone.
 
Vladislav Boyko #:
It is obvious that this "report" was generated by an AI as a result of unsuccessful attempts to fix the generated code. And it is obvious that OP is unlikely to show any more activity here. This is not the first such thread and it will not be the last. Usually such threads are deleted by someone.

why

 
Lorentzos Roussos #:

why

The way it's written, any techie can recognise such as Build [version in Bangla Language]

Bold font
Using icons
Using "" 

Usually a normal person on forum will not write like this so techies can easily detect if its AI written or written by human

Or if someone is oversmart he will prompt AI to write in human style langugae so it's undectable. xD
 
Lorentzos Roussos #:

why

If you mean "why does someone delete such threads", then I don't know, it's not me who does it😁. But honestly, I think it's right. There is absolutely no useful information in such threads, just AI hallucinations that are presented as a bug report. After the thread is created, the OP usually does not participate in it.

[edit]

Rajesh Kumar Nait #:
Or if someone is oversmart he will prompt AI to write in human style langugae so it's undectable. xD

I don't think this will work. The following looks like a human text, but it is obvious that the text was written by an AI. I have already seen the exact same sentence in other similar threads.

Forum on trading, automated trading systems and testing trading strategies

Compiler Errors - Basic MQL5 Functions (SeriesBars, TimeHour) Undeclared After Update/Reinstall (Build 5120)

sulaiman dipu, 2025.06.15 15:39

I am at a loss as to what to do next. The compiler seems unable to recognize its own standard library functions. This makes any MQL5 development impossible.

 
Rajesh Kumar Nait #:
The way it's written, any techie can recognise such as Build [version in Bangla Language]

Bold font
Using icons
Using "" 

Usually a normal person on forum will not write like this so techies can easily detect if its AI written or written by human

Or if someone is oversmart he will prompt AI to write in human style langugae so it's undectable. xD

thanks , i meant why post this , what is the play for the OP?

Vladislav Boyko #:

If you mean "why does someone delete such threads", then I don't know, it's not me who does it😁. But honestly, I think it's right. There is absolutely no useful information in such threads, just AI hallucinations that are presented as a bug report. After the thread is created, the OP usually does not participate in it.

i mean why does the OP do it ? what is the benefit 

is there a trojan in the screenshots or smth ?
 

It was the correct reply to OP - 

Forum on trading, automated trading systems and testing trading strategies

Compiler Errors - Basic MQL5 Functions (SeriesBars, TimeHour) Undeclared After Update/Reinstall (Build 5120)

Stanislav Korotky, 2025.06.15 16:17

Please, attach a test file to reproduce the problem. Your screenshots show errors in your code, not in the standard library.


If no any file to analyze so I agree - this thread is useless.
 
Lorentzos Roussos #:

thanks , i meant why post this , what is the play for the OP?

i mean why does the OP do it ? what is the benefit 

is there a trojan in the screenshots or smth ?
Maybe they are too much addicted with AI and treat them as their personal assistent like hey chatgpt draft a forum post for solving my blah blah problem.. AI usually enhance the op's issues in a detailed post with heading, using inverted commas, using icons etc. 

Trojan possiblility can not be denied if mql does not scan files before upload using clamav or similar anti virus.