akiri
There are a couple of ways you can do that. One way is to set the conditions to evaluate if the MACD line is above or below the Signal line eg
The other is to evaluate if the MACD histogram is above or below 0 eg
The result will be the same with either solution.
Alex
There are a couple of ways you can do that. One way is to set the conditions to evaluate if the MACD line is above or below the Signal line eg
PHP Code:
if(vMACD.getValue(MACDStudy.MACD)>vMACD.getValue(MACDStudy.SIGNAL))
setBarFgColor(Color.blue,0);//assign the color to the first element of the return array
if(vMACD.getValue(MACDStudy.MACD)<vMACD.getValue(MACDStudy.SIGNAL))
setBarFgColor(Color.red,0);
}
PHP Code:
if(vMACD.getValue(MACDStudy.HIST)>0)
//as above
if(vMACD.getValue(MACDStudy.MACD)<0)
//as above
Alex
Comment