Cwparker23
Member
ATR_Close_AVG
Code:
################################
# Original script by Cwparker23#
################################
#-----------------
#DISCLAIMER
#-----------------
#I am not a certified financial advisor. The content of this page/site and tools are for informational purposes only and does not constitute financial or legal advice. Under no circumstances will the author be responsible for errors or use of this tool and site. User assumes all risks.
input length = 20;
input averageType = AverageType.SIMPLE;
def H = high[1];
def C = close[1];
def L = low[1];
def O = open[1];
input price = open;
input ATR_Labels = yes;
input TargetMultiple_1 = 1;
input TargetMultiple_2 = 2;
def ATR = MovingAverage(averageType, TrueRange(h, c, l), length);
AddLabel(ATR_Labels, "ATR: $" + round (atr,2) , Color.white);
AddLabel(ATR_Labels, "ATR2: $" + round (atr*TargetMultiple_2,2) , Color.Yellow);
plot priceAVG = MovingAverage(averageType, price, length);
priceAVG.SetDefaultColor(Color.cyan);
plot ATR1UP = priceAVG + atr*TargetMultiple_1;
plot ATR1DN = priceAVG - atr*TargetMultiple_1;
ATR1UP.SetStyle(Curve.SHORT_DASH);
ATR1UP.SetDefaultColor(Color.GRAY);
ATR1DN.SetStyle(Curve.SHORT_DASH);
ATR1DN.SetDefaultColor(Color.GRAY);
plot ATR2UP = priceAVG + atr*TargetMultiple_2;
ATR2UP.SetDefaultColor(Color.yELLOW);
plot ATR2DN = priceAVG - atr*TargetMultiple_2;
ATR2DN.SetDefaultColor(Color.yELLOW);
ATR_Rate_of_CHG
Code:
################################
# Original script by Cwparker23#
################################
#-----------------
#DISCLAIMER
#-----------------
#I am not a certified financial advisor. The content of this page/site and tools are for informational purposes only and does not constitute financial or legal advice. Under no circumstances will the author be responsible for errors or use of this tool and site. User assumes all risks.
declare lower;
input length = 12;
input averageType = AverageType.sIMPLE;
input colorNormLengthPercentChg = .25;
def ATR2 = MovingAverage(averageType, TrueRange(high, close, low), length);
plot TrueRange = TrueRange(high, close, low);
TrueRange.AssignValueColor(
if TrueRange > ATR2 then Color.cyan else
if TrueRange < ATR2 then Color.blue else
Color.GRAY);
TrueRange.SetPaintingStrategy(PaintingStrategy.lINE_VS_POINTS);
plot ATR = MovingAverage(averageType, TrueRange(high, close, low), length);
ATR.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
ATR.DefineColor("Highest", Color.YELLOW);
ATR.DefineColor("Lowest", Color.RED);
ATR.AssignNormGradientColor(Length*colorNormLengthPercentChg, ATR.color("Lowest"), ATR.color("Highest"));
Volume_AVG_Rate_of_CHG
Code:
################################
# Original script by Cwparker23#
################################
#-----------------
#DISCLAIMER
#-----------------
#I am not a certified financial advisor. The content of this page/site and tools are for informational purposes only and does not constitute financial or legal advice. Under no circumstances will the author be responsible for errors or use of this tool and site. User assumes all risks.
declare lower;
input length = 12;
input averageType = AverageType.sIMPLE;
input colorNormLengthPercentChg = .25;
def volume2 = MovingAverage(averageType, volume, length);
plot Truevolume = volume;
Truevolume.AssignValueColor(
if Truevolume > volume2 then Color.cyan else
if Truevolume < volume2 then Color.blue else
Color.GRAY);
Truevolume.SetPaintingStrategy(PaintingStrategy.lINE_VS_POINTS);
plot volumeavg = MovingAverage(averageType, volume, length);
volumeavg.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
volumeavg.DefineColor("Highest", Color.YELLOW);
volumeavg.DefineColor("Lowest", Color.RED);
volumeavg.AssignNormGradientColor(Length*colorNormLengthPercentChg, volumeavg.color("Lowest"),volumeavg.color("Highest"));