How do i get BW MFI color.

 

Dear guys

is there any way to get which BW MFI color in current shift. I used iBWMFI but it return value but I want to get which color in current shift.

thanks is advanced

 
dralialadin :

Dear guys

is there any way to get which BW MFI color in current shift. I used iBWMFI but it return value but I want to get which color in current shift.

thanks is advanced

You need to learn how to do a little research . . .

https://www.metatrader5.com/en/terminal/help/indicators/bw_indicators/market_facilitation

and

https://en.wikipedia.org/wiki/Market_facilitation_index

BW MFI relys on Volume, MT4 does not have volume . . . it has tick count.

 

thanks RaptorUK. I know about BW MFI. when I attached this on my chart current bar color is Pink.

But when I call iBWMFI function is return value not color. how can I get programmatically iBWMFI color.

 
dralialadin : is there any way to get which BW MFI color in current shift. I used iBWMFI but it return value but I want to get which color in current shift.

No because all iBWMFI returns is a value.


Use the color indicator and iCustom

 
dralialadin :

thanks RaptorUK. I know about BW MFI. when I attached this on my chart current bar color is Pink.

But when I call iBWMFI function is return value not color. how can I get programmatically iBWMFI color.

So you didn't bother to use the links I provided and read what was written there ? it tells you exactly what you need to know . . .
 

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

if( MyBWMFI(Symbol(),PERIOD_H4,1) == "green" )
{
  //do something 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>

 
zschmied:

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

<LINK REMOVED BY MODERATOR>

You are a genius ! Thank you !!!