Hello, can any one add clouds like this on TOS i have the script for it (inside bars, and outside bars) i just can seem to figure it out.
here's the script for TOS
plot Data = close;
plot one = if low >= low[1]
and high <= high[1]
then 1 else Double.NaN;
one.SetDefaultColor(Color.WHITE);
one.SetPaintingStrategy(PaintingStrategy.valueS_BELOW);
plot two = if high > high[1]
and low >= low[1]
or high <= high[1]
and low < low[1]
then 2 else Double.NaN;
two.SetDefaultColor(Color.WHITE);
two.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
plot three = if high > high[1]
and low < low[1]
then 3 else Double.NaN;
three.SetDefaultColor(Color.WHITE);
three.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
AssignPriceColor(if one then Color.BLUE else Color.CURRENT);
AssignPriceColor(if three then Color.PLUM else Color.CURRENT);
def lastbar = !isnan(close[0]) and isnan(close[-1]);
def src = close;
input length = 20;
input mult = 2.0;
def mult2 = if mult > 50 then 50 else if mult < 0.001 then 0.001 else mult;
#
https://tlc.thinkorswim.com/center/reference/thinkScript/Constants/AverageType
# EXPONENTIAL, HULL, SIMPLE, WEIGHTED, WILDERS
input avg1_type = AverageType.simple;
def basis = MovingAverage(avg1_type, src, length);
def dev = mult2 * StDev( src , length );
def upper = basis + dev;
def lower = basis - dev;
# horz lines
plot basisLine = highestAll(if isNaN(close[-1]) then basis else Double.NaN);
basisline.SetDefaultColor(Color.red);
basisline.SetStyle(Curve.SHORT_DASH);
plot upperLine = highestAll(if isNaN(close[-1]) then upper else Double.NaN);
upperline.SetDefaultColor(Color.magenta);
plot lowerLine = highestAll(if isNaN(close[-1]) then lower else Double.NaN);
lowerline.SetDefaultColor(Color.magenta);
# inside and outside bars
def inBar = low > low[1] and high < high[1];
def outBar = low < low[1] and high > high[1];
def holyGrail = low[1] < low[2] and high[1] > high[2] and low > low[1] and high < high[1];
input bubble_ht_offset = 0.0006;
addchartbubble(inbar, (high * (1 + bubble_ht_offset)), "IB", color.yellow, yes);
addchartbubble(outbar, (low * (1 - bubble_ht_offset)), "OB", color.blue, no);
def off = 1;
addchartbubble(lastbar[off] and holyGrail[off] and inbar[off], close, "Holy Grail" + "\nInbar", color.yellow, yes);
addchartbubble(lastbar[off] and holyGrail[off] and outbar[off], close, "Holy Grail" + "\nOutbar", color.yellow, yes);
plot hg2 = holygrail;
hg2.SetPaintingStrategy(PaintingStrategy.squaRED_HISTOGRAM);
hg2.SetDefaultColor(Color.white);
hg2.setlineweight(3);