iCustom returning no value

 

Essentially what I'm struggling with is creating a boolean to find when my custom indicator isn't returning a value.

To provide context, I'm using a Hull EMA indicator that has 2 modes (Up and Down).

when the line is up, there is a HMA up value, and the HMA down is blank, and vice versa. (image attached of what it looks like in data window).


What I'm trying to do is create an if statement so where if HMA up > 1 and HMA down is NULL to buy etc, but I can't figure out what to use for NULL.

I have tried 

iCustom(NULL,0,IndicatorName, 84, true, true, true,1, 0) == NULL
iCustom(NULL,0,IndicatorName, 84, true, true, true,1, 0) == ""

and neither of them work so my if statement is never executed.


Please Help!!

 
Most indicators use EMPTY_VALUE when they are not displayed for that bar.
 
Harry Ward: To provide context, I'm using a Hull EMA indicator
  1. What context? Do you expect us to know which indicator, which variant, and from where? Do you expect us to go searching and guessing? Post the indicator, or at least a link.
         How To Ask Questions The Smart Way. 2004
              Be precise and informative about your problem

  2. Harry Ward: Essentially what I'm stru I have tried 

    iCustom(NULL,0,IndicatorName, 84, true, true, true,1, 0) == NULL
    iCustom(NULL,0,IndicatorName, 84, true, true, true,1, 0) == ""

    Icustom returns a double in MT4. Neither of those are doubles so both comparisons are false. Check against EMPTY_VALUE.

 

Try it with EMPTY_VALUE like so:

iCustom(NULL,0,IndicatorName, 84, true, true, true,1, 0) == EMPTY_VALUE

And check also with ResetLastError/GetLastError if the custom indicator loaded properly.

Reason: