what i am trying to do is to get the lower indicator bg color change if price oscillator < price oscillator(-1). i understand there are various ways to do it. and below is the line i added to the copied customOsc.efs file. so far i have no clue why i couldn't get the bg color change. actually, how can i simply compare the two price oscillators
setDefaultBarBgColor(Color.while,0);
....
if (osc(Short,Long,eval(Type),close(),sym(vSymbol),in v(Interval)) < osc(Short,Long,eval(Type),close(-1),sym(vSymbol),inv(Interval))) setBarBgColor(Color.red,0);
or
if (osc(Short,Long,eval(Type),eval(Source)(sym(vSymbo l)),,,0) < osc(Short,Long,eval(Type),eval(Source)(sym(vSymbol )),,,-1)) setBarBgColor(Color.red,0);
setDefaultBarBgColor(Color.while,0);
....
if (osc(Short,Long,eval(Type),close(),sym(vSymbol),in v(Interval)) < osc(Short,Long,eval(Type),close(-1),sym(vSymbol),inv(Interval))) setBarBgColor(Color.red,0);
or
if (osc(Short,Long,eval(Type),eval(Source)(sym(vSymbo l)),,,0) < osc(Short,Long,eval(Type),eval(Source)(sym(vSymbol )),,,-1)) setBarBgColor(Color.red,0);
Comment