Download MetaTrader 5
To add comments, please log in or register
MQL5 language supports OpenCL. Try it!
dralialadin
147
dralialadin 2013.07.17 05:37 

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

Simon Gniadkowski
Moderator
17962
Simon Gniadkowski 2013.07.17 06:25  
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.mql5.com/go?link=https://ta.mql4.com/indicators/bills/market_facilitation_index

and

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

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

dralialadin
147
dralialadin 2013.07.17 12:35  

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.

whroeder1
13596
whroeder1 2013.07.17 12:45  
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

Simon Gniadkowski
Moderator
17962
Simon Gniadkowski 2013.07.17 12:55  
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 . . .
Matthew Schmieder
130
Matthew Schmieder 2014.06.21 23:57  

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>

ilmel
5
ilmel 2016.10.07 15:50  
zschmied:

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

<LINK REMOVED BY MODERATOR>

You are a genius ! Thank you !!!
/
To add comments, please log in or register