How to use #Property Strict

 

Hello coders,


Can anyone help me how to use the #property strict function while writing a code.



Much appreciated,

 

Just add it at the beginning of your ".mq4" source code file and recompile. Example ...

#property copyright "Copyright 2021, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict

However, you may get several new errors and warnings which you will need to fix. Make it a habit to always fix the warnings too. Don't ignore them.

 
Boga Chander: Can anyone help me how to use the #property strict function while writing a code.
  1. Help you with what? You just insert it at the top of your code.

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