andreythedon
New member
This script should add the text ATRX when the defined criteria (ATR average crosses above ATR). The column works. When the criteria is met the Text shows up. However when not met. It shows "LOADING".
How might I get rid of the "LOADING"? I've tried using if/then/else for the TEXT section of addlabel, also tried it for the VISIBLE section. Any other ideas?
Much Appreciated!!
How might I get rid of the "LOADING"? I've tried using if/then/else for the TEXT section of addlabel, also tried it for the VISIBLE section. Any other ideas?
Much Appreciated!!
def atrplot = Average(data = ATR(), length = 14);
def crossx= Crosses(data1 = atrplot, data2 = atr(), direction = CrossingDirection.ABOVE) within 5 bars;
AddLabel(visible = crossx, "ATRX", color = Color.DARK_RED);
AssignBackgroundColor(parameter0 = if crossx then color.lighT_RED else color.white );