#property strict errors

 

Hi.

I have an indicator based on supply and demand zones that I try to upload to indicator marketplace

The indicator is compiled with no errors, but as to be able to upload it on MQL5 marketplace, I need to add "property strict" function.

After I add it, the file gives multiple errors.

Can anyone help me fix it ?

This is without property strict

The picture above is the version with no "property strict" - as you can see it has no errors on it.


Errors


Now, after I add the #property strict rule it gives me 7 errors and 89 warnings.

Can anyone help me fix it ? 

Thanks

 

Please don't post randomly in any section. Your question is not related to the section you posted.

MT4/mql4 has it's own section on the forum.

I have moved your topic to the correct section later.

 

The "#property strict" imposes to updated and more "strict" rules of MQL4+ which are similar to MQL5 language rules, instead of the old MQL4.

You can read more about the updates of the updated MQL4 here ... Updated MQL4 - Language Basics - MQL4 Reference

EDIT: You should always fix "warnings", or you run the risk of skipping over a real bug disguised as a warning.

Updated MQL4 - Language Basics - MQL4 Reference
Updated MQL4 - Language Basics - MQL4 Reference
  • docs.mql4.com
Updated MQL4 - Language Basics - MQL4 Reference
 
Can anyone help me fix the code ? I can send you the source file in private
 
Bogdan Ion Puscasu #: Can anyone help me fix the code ? I can send you the source file in private

If you are trying to publish it as a Market product, then are you not the coder for this product as per Market rules?

You show your copyright on the code's screenshot?

 
Bogdan Ion Puscasu #: Can anyone help me fix the code ? I can send you the source file in private
Given that it is for a Market product, then you should have the original author fix it or hire someone else to fix it for you given that you do not know how to do it yourself.
 

Always use strict. Fixing the warnings will save you hours of debugging, but you must understand the differences.