Hi, is it possible to flash the red backround , if "mybgColor" is red?
Thanks
function preMain() {
setPriceStudy(true);
setStudyTitle("ATR");
}
function main() {
var myValue = ((1/atr(10)).toFixed(2))*100;
var myColor = Color.white;
var mybgColor = Color.green;
if (myValue<=700) myColor = Color.black;
if (myValue<=700) mybgColor = Color.red;
if (myValue>700 && myValue <= 1800) myColor = Color.black;
if (myValue>700 && myValue <= 1800) mybgColor = Color.lime;
if (myValue>1800) myColor = myColor = Color.white;
if (myValue>1800) mybgColor = Color.navy;
drawTextRelative( 0, AboveBar1, myValue , myColor, mybgColor, Text.PRESET | Text.BOLD, null, 24, "text" );
return;
Thanks
function preMain() {
setPriceStudy(true);
setStudyTitle("ATR");
}
function main() {
var myValue = ((1/atr(10)).toFixed(2))*100;
var myColor = Color.white;
var mybgColor = Color.green;
if (myValue<=700) myColor = Color.black;
if (myValue<=700) mybgColor = Color.red;
if (myValue>700 && myValue <= 1800) myColor = Color.black;
if (myValue>700 && myValue <= 1800) mybgColor = Color.lime;
if (myValue>1800) myColor = myColor = Color.white;
if (myValue>1800) mybgColor = Color.navy;
drawTextRelative( 0, AboveBar1, myValue , myColor, mybgColor, Text.PRESET | Text.BOLD, null, 24, "text" );
return;
Comment