Indicator returning 0 as value

Back to topics list To post a new topic, please log in or register
avatar
26
kinitex 2016.03.26 00:35
 

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?

Attached files:
  __mficmeter.ex4  (18.17 KB)
avatar
Moderator
3404
GumRai 2016.03.26 01:27 #
 

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

avatar
26
kinitex 2016.03.26 02:04 #
 
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



Back to topics list  

To add comments, please log in or register