RedToGreen
Active member
This will show a chart bubble at the week high but for every bar.
How do I make it so it only shows 1 bubble?
I've looked thru other threads but simple stuff seems to evade me
Thanks
How do I make it so it only shows 1 bubble?
I've looked thru other threads but simple stuff seems to evade me
Thanks
Code:
input aggregationPeriod = AggregationPeriod.WEEK;
input length = 1;
input displace = -1;
input showOnlyLastPeriod = no;
plot WeekH;
plot WeekL;
if showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1]) {
weekH = Double.NaN;
WeekL = Double.NaN;
} else {
WeekH = Highest(high(period = aggregationPeriod)[-displace], length);
WeekL = Lowest(low(period = aggregationPeriod)[-displace], length);
}
WeekH.SetDefaultColor(createColor(35,78,135));
WeekH.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
WeekL.SetDefaultColor(createColor(50,111,191));
WeekL.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
addchartBubble( weekh, Highest(high(period = aggregationPeriod)[-displace], length), "WK_H", color.BLUE);
Last edited by a moderator: