I can't imagine how or why this is happening but it started after the TOS maintenance that occurred yesterday.
This is the indicator code:
What's particularly frustrating is that I'd combined this indicator into others that I've made and so a lot of my saved study and style layouts have been corrupted.
I tried removing from the code the option to allow negative values but it still gives the error. What is aggravating is that the study is loading properly and displaying properly on a chart, but it just somehow after yesterday is corrupting the study sets and styles if it's saved into any study set. The same problem is also occurring in some of my other indicators that incorporated the same logic for displaying different colors for different sigma thresholds of volume that are either up candles or down candles.
This is the indicator code:
Code:
#
# TD Ameritrade IP Company, Inc. (c) 2014-2021
#
declare lower;
declare zerobase;
input length = 60;
input numDev = 2.0;
input allowNegativeValues = yes;
def rawRelVol = (volume - Average(volume, length)) / StDev(volume, length);
plot RelVol = if allowNegativeValues then rawRelVol else Max(0, rawRelVol);
plot StDevLevel = if close>0 then numDev else double.nan;
RelVol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RelVol.SetLineWeight(3);
RelVol.DefineColor("UpCandleAbove", Color.Light_Green);
RelVol.DefineColor("DownCandleAbove", Color.Red);
RelVol.DefineColor("UpCandleBelow", Color.CYAN);
RelVol.DefineColor("DownCandleBelow", Color.DARK_ORANGE);
RelVol.DefineColor("DownCandleNegBelow", CreateColor(60,25,25));
RelVol.DefineColor("UpCandleNegBelow", CreateColor(25,60,25));
RelVol.AssignValueColor(if RelVol >= numDev and RelVol>0 and open<close then RelVol.Color("UpCandleAbove") else if RelVol < numDev and RelVol<0 and open>close then RelVol.Color("DownCandleNegBelow") else if RelVol < numDev and RelVol<0 and open<close then RelVol.Color("UpCandleNegBelow") else if RElVol>0 and open<close then RelVol.Color("UpCandleBelow") else if RelVol >= numDev and RelVol>0 and open>close then RelVol.Color("DownCandleAbove") else if RElVol>0 and open>close then RelVol.Color("DownCandleBelow") else Color.Gray);
StDevLevel.SetDefaultColor(GetColor(7));
StDevLevel.SetStyle(Curve.SHORT_DASH);
What's particularly frustrating is that I'd combined this indicator into others that I've made and so a lot of my saved study and style layouts have been corrupted.
I tried removing from the code the option to allow negative values but it still gives the error. What is aggravating is that the study is loading properly and displaying properly on a chart, but it just somehow after yesterday is corrupting the study sets and styles if it's saved into any study set. The same problem is also occurring in some of my other indicators that incorporated the same logic for displaying different colors for different sigma thresholds of volume that are either up candles or down candles.