Highlight previous 15 mins candle OHLC

Lees

New member
I have code to highlight previous day Open High Low Close. I need a help to draw horizontal line or highlight previous 15 mins candle open high low close. Is there any code snippet available for that?

Thanks,
Syed
 

Pensar

Active member
VIP
@Lees See if this works.

Code:
#Fifteen Minute OHLC

plot o = open(period = aggregationperiod.FIFTEEN_MIN)[1];
     o.setpaintingstrategy(paintingstrategy.horizontal);
     o.setdefaultcolor(color.orange);
plot h = high(period = aggregationperiod.FIFTEEN_MIN)[1];
     h.setpaintingstrategy(paintingstrategy.horizontal);
     h.setdefaultcolor(color.green);
plot l = low(period = aggregationperiod.FIFTEEN_MIN)[1];
     l.setpaintingstrategy(paintingstrategy.horizontal);
     l.setdefaultcolor(color.red);
plot c = close(period = aggregationperiod.FIFTEEN_MIN)[1];
     c.setpaintingstrategy(paintingstrategy.horizontal);
     c.setdefaultcolor(color.yellow);
 

Lees

New member
Thanks for the repsponse @Pensar. I am seeing horizontal lines on all 15 mins candles. I want horizontal line only on Previous 15 min candle OHCL when current 15 mins candle is developing. Once current 15 mins completes horizontal line has to be moved here while new 15 mins candle developing.
 

Similar threads

Top