I have colored candles chart based on TTM-Squeeze but I want the Stop/entry bars under each candle colored instead and the candles have the traditional Green/Red colors. Can someone please help me making this change to my chart?
I have the existing colored candle script here:
input price = CLOSE;
input length = 20;
input nK = 1.5;
input nBB = 2.0;
input alertLine = 1.0;
def squeezeHistogram = TTM_Squeeze(price, length, nK, nBB, alertLine).Histogram;
plot hist = if squeezeHistogram >= 0 then
if squeezeHistogram > squeezeHistogram[1] then 2 else 1
else if squeezeHistogram < squeezeHistogram[1] then -2 else -1;
AssignPriceColor(if squeezeHistogram >= 0 then
if squeezeHistogram > squeezeHistogram[1] then Color.CYAN else Color.BLUE
else if squeezeHistogram < squeezeHistogram[1] then Color.RED else Color.YELLOW);
hist.AssignValueColor(if squeezeHistogram >= 0 then
if squeezeHistogram > squeezeHistogram[1] then Color.CYAN else Color.BLUE
else if squeezeHistogram < squeezeHistogram[1] then Color.RED else Color.YELLOW);
And the Stop/Entry bars script here:
plot x = Lowest(low, 5);
plot y = Lowest(high, 5);
I don't have the skills to stir them together to get what I want
Thanks all
I have the existing colored candle script here:
input price = CLOSE;
input length = 20;
input nK = 1.5;
input nBB = 2.0;
input alertLine = 1.0;
def squeezeHistogram = TTM_Squeeze(price, length, nK, nBB, alertLine).Histogram;
plot hist = if squeezeHistogram >= 0 then
if squeezeHistogram > squeezeHistogram[1] then 2 else 1
else if squeezeHistogram < squeezeHistogram[1] then -2 else -1;
AssignPriceColor(if squeezeHistogram >= 0 then
if squeezeHistogram > squeezeHistogram[1] then Color.CYAN else Color.BLUE
else if squeezeHistogram < squeezeHistogram[1] then Color.RED else Color.YELLOW);
hist.AssignValueColor(if squeezeHistogram >= 0 then
if squeezeHistogram > squeezeHistogram[1] then Color.CYAN else Color.BLUE
else if squeezeHistogram < squeezeHistogram[1] then Color.RED else Color.YELLOW);
And the Stop/Entry bars script here:
plot x = Lowest(low, 5);
plot y = Lowest(high, 5);
I don't have the skills to stir them together to get what I want
Thanks all