problem with EMPTY_VALUE

 

Hello everyone

I'm using  iCustom function to give the indicator's buffer, I added the code to prevent invalid data when indicator buffer is empty

if( Value != EMPTY_VALUE ){ Value = Lower[0];Print(Lower_Value); }

but when indicator has value , the toolbox prints the right value but even when the indicator hasn't any value the toolbox prints such this value  '1.7976931348623157e+308 '  !!!

Now I want to know if this unknown value has effect on my program or not and how can I  eliminate the problem? thanks

 
saeed Golshenas:

Hello everyone

I'm using  iCustom function to give the indicator's buffer, I added the code to prevent invalid data when indicator buffer is empty

but when indicator has value , the toolbox prints the right value but even when the indicator hasn't any value the toolbox prints such this value  '1.7976931348623157e+308 '  !!!

Now I want to know if this unknown value has effect on my program or not and how can I  eliminate the problem? thanks

that is the empty value,  if you want somethng else like 0 then set it explicitly

https://www.mql5.com/en/docs/constants/namedconstants/typeconstants

Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Numerical Type Constants
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Numerical Type Constants
  • www.mql5.com
Numerical Type Constants - Named Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Paul Anscombe #: that is the empty value,  

On MT5.

Reason: