I am using the Advanced GET oscillator in a study, but getting funny bar colors. When I load the study, all bars are painted correctly. Any subsequent bars after the study is loaded are painted blue. Here are some relevant sections of the EFS code. Any ideas what is going on or what I can do to fix this?
if (sMom == "GET Osc") {
var momStudy1 = new GetOscStudy(5,35,100);
Mom = momStudy1.getValue(0);
Mom1 = xMom;
xMom = Mom;
var returnMom = Mom
}
.
.
.
// added shading on Momentum histogram
if (Mom > 0 && Mom > Mom1) {
setBarFgColor(Color.lime);
}
if (Mom > 0 && Mom < Mom1) {
setBarFgColor(Color.RGB(0,128,0));
}
if (Mom < 0 && Mom < Mom1) {
setBarFgColor(Color.red);
}
else if (Mom < 0 && Mom > Mom1) {
setBarFgColor(Color.RGB(128,0,0));
}
return (returnMom);
Thanks,
Greg
if (sMom == "GET Osc") {
var momStudy1 = new GetOscStudy(5,35,100);
Mom = momStudy1.getValue(0);
Mom1 = xMom;
xMom = Mom;
var returnMom = Mom
}
.
.
.
// added shading on Momentum histogram
if (Mom > 0 && Mom > Mom1) {
setBarFgColor(Color.lime);
}
if (Mom > 0 && Mom < Mom1) {
setBarFgColor(Color.RGB(0,128,0));
}
if (Mom < 0 && Mom < Mom1) {
setBarFgColor(Color.red);
}
else if (Mom < 0 && Mom > Mom1) {
setBarFgColor(Color.RGB(128,0,0));
}
return (returnMom);
Thanks,
Greg
Comment