Download MetaTrader 5
To add comments, please log in or register
Log in to MQL5.community using OpenID. It is convenient!
Hknight
175
Hknight 2013.01.16 16:42 

  Bill Williams Market Facilitation Index is typically represented by colored bars:

  • Green bar (Green)
  • Blue bar - (Fade)
  • Pink bar - (Fake)
  • Brown bar - (Squat)

 The mq4 function iBWMFI() returns numbers.  What number ranges should be associated with what colors?  For example, what colored bar should correspond to a value of 0.12345?

Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2013.01.16 18:30  
hknight:

  Bill Williams Market Facilitation Index is typically represented by colored bars:

  • Green bar (Green)
  • Blue bar - (Fade)
  • Pink bar - (Fake)
  • Brown bar - (Squat)

 The mq4 function iBWMFI() returns numbers.  What number ranges should be associated with what colors?  For example, what colored bar should correspond to a value of 0.12345?


The code is here,  check for yourself:  https://www.mql5.com/en/code/7992
Hknight
175
Hknight 2013.01.16 18:37  
My question is about how to use this function:
https://docs.mql4.com/indicators/iBWMFI

RaptorUK, the code in your link does not use the native mq4 function iBWMFI().
That function returns numbers and I want to know how to interpret those numbers.
Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2013.01.16 18:53  
hknight:
My question is about how to use this function:
https://docs.mql4.com/indicators/iBWMFI

RaptorUK, the code in your link does not use the native mq4 function iBWMFI().
That function returns numbers and I want to know how to interpret those numbers.

If you loo at the code you will see this . . .

else ExtMFIBuffer[i]=(High[i]-Low[i])/(Volume[i]*Point);

 . . .  which happens to agree with this . . .  "The Market Facilitation Index [1] (MFI) is the creation of Dr. Bill Williams. The indicator endeavors to establish the effectiveness of price movement by computing the price movement per volume unit. This is accomplished by subtracting the days low from the high and dividing the result by the total volume. (See below)"  from here:  Wiki


I assume that this is what iBWMFI() returns . . . 

Hknight
175
Hknight 2013.01.16 21:40  
So what values correspond to the green bar?
Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2013.01.16 21:48  
hknight:
So what values correspond to the green bar?
Did you look at the code ?  did you look at the Wiki article ?  I guess not,  maybe you should.  There is no value that corresponds to any of the bars . . . .  I knew nothing about BWMFI until your post,  now I know what determines if a bar is green or not and it is not based on a single value.  Read the Wiki,   it is all explained there.
Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2013.01.16 21:50  
What you should be asking is this . . .  "Is the BWMFI even valid for MT4 as there is no volume available on MT4 ?"
Matthew Schmieder
130
Matthew Schmieder 2014.06.21 15:56  

You only need to rewrite the function, it's not that hard:

if( MyBWMFI(Symbol(),PERIOD_H4,1) == "green" )
{
  //do some shit here...
}

string MyBWMFI(string SYMBOL, int PERIOD, int SHIFT)
{
  double Candle_1 = iOpen(SYMBOL,PERIOD,SHIFT) - iClose(SYMBOL,PERIOD,SHIFT);
  double Candle_2 = iOpen(SYMBOL,PERIOD,SHIFT+1) - iClose(SYMBOL,PERIOD,SHIFT+1);
  if( Candle_1 < 0 ) Candle_1 = Candle_1 - Candle_1*2;
  if( Candle_2 < 0 ) Candle_2 = Candle_2 - Candle_2*2;
  if( Candle_1 >  Candle_2 && iVolume(SYMBOL,PERIOD,SHIFT+1) <  iVolume(SYMBOL,PERIOD,SHIFT) ) return("green");
  if( Candle_1 <= Candle_2 && iVolume(SYMBOL,PERIOD,SHIFT+1) >= iVolume(SYMBOL,PERIOD,SHIFT) ) return("brown");
  if( Candle_1 >  Candle_2 && iVolume(SYMBOL,PERIOD,SHIFT+1) >= iVolume(SYMBOL,PERIOD,SHIFT) ) return("blue");
  if( Candle_1 <= Candle_2 && iVolume(SYMBOL,PERIOD,SHIFT+1) <  iVolume(SYMBOL,PERIOD,SHIFT) ) return("pink");
  return(0);
}

<link removed by moderator>

buff_0
17
buff_0 2015.01.11 09:04  

I actually came across this problem myself.  I had no idea how to come up with the colors and after checking two sites I couldn't find the answer so I tried to do it the hard way by watching the bar and taking note of the time of the color change and calculating the value.  The key words that I was looking for as RaptorUK had stated was already posted on Wiki, (which was a site that I hadn't even see before), was:

 MFI and volume are compared to the previous candles MFI and volume

 OMG I feel like such a genius now.  I wasted two hours doing it the hard way.  I'm gonna post the actual values for those of us who were lazy to look for it.  

 Green = Volume(+) Index (+)

Blue    = Volume(-) Index (-)

Pink     = Volume(-) Index (+)

Brown  = Volume(+) Index (-) 

/
To add comments, please log in or register