Brilliant, that fixed it.kmarryat wrote: ↑Thu Feb 18, 2021 11:35 pm@Fxxtrader - the time variable is based on the bar open time. try changing the source of the dayofmonth function to time_close.
Code: Select all
FirstBarOfMonth = dayofmonth(time_close) < dayofmonth(time_close)[1] if FirstBarOfMonth LabelText = tostring(month(time_close),"1st Bar\nMonth ") LabelAbove = label.new(x=bar_index, y=na, text=LabelText, yloc=yloc.abovebar, color=color.green, textcolor=color.white, style=label.style_label_down, size=size.small)
Thanks a lot.