PineScript-Draw Box

Viewed 661

I don't have any experience with Pine Script. My question is, is it possible to draw a box under a current bar, with possibility to define the height in ticks, and the price for the top or bottom of it?

Thank you very much

1 Answers

Yes you can create boxes I pine script and define height, width, location, color and more. pine script boxes

Here is the script:

//@version=5
indicator("", "", true)
box.new(bar_index, high, bar_index + 1, low, border_color = color.gray, bgcolor = color.new(color.silver, 60))

Here you can find the manual. Scroll down on the page to boxes. box and lines manual

Related