Simple script that works, but the title and a color doesn't change:
function perMain(){
setStudyTitle("Price percentage above or below a SMA");
setDefaultBarFgColor(Color.black);
}
function main(){
return ((close(0) - sma(200))/ sma(200)) * 100;
}
I removed and reapplied the study, like the documenation suggests, but nothing in perMain seems to work.
function perMain(){
setStudyTitle("Price percentage above or below a SMA");
setDefaultBarFgColor(Color.black);
}
function main(){
return ((close(0) - sma(200))/ sma(200)) * 100;
}
I removed and reapplied the study, like the documenation suggests, but nothing in perMain seems to work.
Comment