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
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 . . .
So what values correspond to the green bar?
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>
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 (-)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Bill Williams Market Facilitation Index is typically represented by colored bars:
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?