Pine Script plots last day of the month in next month’s first day – How to solve this?

  Kiến thức lập trình

I am just trying to plot a Monthly price range.

M1 = request.security (syminfo.tickerid, ‘M’, (high[0]-low[0]))
plot(M1, color = color.green)

When I plot this in Daily timeframe, it calculates the range (High-Low) properly and plots the straight line under each month’s candles. But the last day of the month gets plotted in the next month’s line.

For Eg, If Aug Range is 450 and Sep range is 500. The line is getting plotted correctly on 450 and 500 but for Aug from Aug1st to Aug30th a line gets plotted in 450 and from Aug31st to Sep29 a line gets plotted in 500. All last day gets plotted in next month.

Can someone tell me why this is happening ?

Was trying to plot the monthly range. But this last day gets plotted into next month.

1

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website Kho Theme wordpress Kho Theme WP Theme WP

LEAVE A COMMENT