Indicator returning 0 as value

 

I can't seem to distinguish between red or green bars that this indicator displays.

MFIGreen = iCustom(NULL, 15, "__MFI Meter", 0, 1);

MFIRed = iCustom(NULL, 15, "__MFI Meter", 1, 1); 


Both these just return 0 when Printing them to journal. Any idea how I can return something to distinguish between green and red?

Files:
__mficmeter.ex4  19 kb
 

As there seem to be 100 buffers in the indicator, it is difficult to work out what is going on.


   for (int x=0;x<100;x++)
   {
   double MFIGreen = iCustom(NULL, 15, "__mficmeter", x, 1);
   if(MFIGreen>0)
      Print("Indicator=",MFIGreen," Buffer=",x);
   }

Try this for different bars and you may be able to work out what is going on

 
GumRai:

As there seem to be 100 buffers in the indicator, it is difficult to work out what is going on.


Try this for different bars and you may be able to work out what is going on

2016.03.25 21:01:05.654    2016.01.04 05:32  EA USDCAD,H4: Indicator=1 Buffer=91

2016.03.25 21:01:05.389    2016.01.04 03:50  EA USDCAD,H4: Indicator=1 Buffer=41


Hmm it just returns either buffer 91 or 41

Reason: