Thank you
@SleepyZ.
I made a minor change to the cloud for this code where it is displayed from the low to high of the timeframe....whereas the original code uses open-close for the cloud.
I like to have the low-high lines to show me the bottom-top of the cloud/timeframe, but I would like the cloud COLOR to be based on whether the closed below the open (bearish/red) or closed above the open (bullish/green).
The problem that I have having is that while I use the low-high for the cloud, I would like the cloud to be colored using the open-close logic. This tells me if the timeframe was bearish or bullish...which the low-high cloud COLOR is misleading in this.
Can you please help with me with this part of the code?
I used the original code, here it is...with the original cloud color code commented out and mine added as the last two lines.
Thank you in advance!!!
# Multi-Time-Frame Candle Overlay version 2.4
# 2020 Paul Townsend
# with code from UseThinkScript.com
# 01.25.2020 - BLT - Modified Addcloud to match horizontal lines
input agg = AggregationPeriod.fifteen_min;
input OpenCloseLines = yes;
input HighLowLines = yes;
input HighLowGray = no;
input LineWeight =2;
#addlabel(yes,"[" + agg/60000 + "]",color.white);
plot o = open(period = agg);
plot c = close(period = agg);
plot h = high(period = agg);
plot l = low(period = agg);
o.sethiding(!OpenCloseLines);
c.sethiding(!OpenCloseLines);
h.sethiding(!HighLowLines);
l.sethiding(!HighLowLines);
o.setLineWeight(lineweight);
c.setLineWeight(lineweight);
h.setLineWeight(lineweight);
l.setLineWeight(lineweight);
o.AssignValueColor(if o==c then color.white else if o > c then Color.red else Color.green);
c.AssignValueColor(if o==c then color.white else if o > c then Color.red else Color.green);
h.AssignValueColor(if highlowgray then color.gray else if o==c then color.white else if o > c then Color.red else Color.green);
l.AssignValueColor(if highlowgray then color.gray else if o==c then color.white else if o > c then Color.red else Color.green);
input addcloud =yes;
def side = if side[1] == 1 then 2 else 1; plot sider = side; sider.hide();
#AddCloud( if sider==2 then c else double.nan, o, Color.green, Color.red);
#AddCloud( if sider==1 then c else double.nan, o, color.green, Color.red);
o.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
c.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
h.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
l.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
AddCloud( if sider==2 then h else double.nan, l, Color.light_green, Color.red);
AddCloud( if sider==1 then h else double.nan, l, Color.light_green, Color.red);
# end