I made this efs in wizard and am trying to color bars. Green for higher rsi and red for lower rsi bar. I put it main function but it keeps oming up as error. Any help on where to put comand would be helpful .
Steven
if (vRSI == null) vRSI = new RSIStudy(RSILength, RSISource);
if (vMAofRSI == null) vMAofRSI = new MAStudy(MALength, 0, vRSI, MAStudy.MA, eval(MAType));
addBand( Upper, PS_SOLID, 1, Color.black,2);
addBand( Lower, PS_SOLID, 1, Color.black,3);
/******************************************
Insert your code following this text block
Use vRSI.getValue(RSIStudy.RSI) and
vMAofRSI.getValue(MAStudy.MA) for your code
*******************************************/
if(vRSI.getValue(RSIStudy.RSI)>vRSI.getValue(RSISt udy.RSI,-1))
setBarFgColor(Color.green);
if(vRSI.getValue(RSIStudy.RSI)<vRSI.getValue(RSISt udy.RSI,-1))
setBarFgColor(Color.red);
Steven
if (vRSI == null) vRSI = new RSIStudy(RSILength, RSISource);
if (vMAofRSI == null) vMAofRSI = new MAStudy(MALength, 0, vRSI, MAStudy.MA, eval(MAType));
addBand( Upper, PS_SOLID, 1, Color.black,2);
addBand( Lower, PS_SOLID, 1, Color.black,3);
/******************************************
Insert your code following this text block
Use vRSI.getValue(RSIStudy.RSI) and
vMAofRSI.getValue(MAStudy.MA) for your code
*******************************************/
if(vRSI.getValue(RSIStudy.RSI)>vRSI.getValue(RSISt udy.RSI,-1))
setBarFgColor(Color.green);
if(vRSI.getValue(RSIStudy.RSI)<vRSI.getValue(RSISt udy.RSI,-1))
setBarFgColor(Color.red);
Comment