Yes sir, Pine Script provides several built-in functions for drawing objects and visual markers directly on the chart.
-Line:
line.new() is used to draw trend lines or connect two price points.
-Box:
box.new() is useful for creating rectangular zones such as support, resistance, supply, or demand areas.
-Label:
label.new() allows you to display text or custom markers at a specific price and bar.
-Plotshape:
plotshape() is useful for showing simple Buy/Sell arrows, triangles, or other predefined shapes when a condition is true.
-Horizontal Line:
hline() is used to draw a fixed horizontal level, such as an RSI level at 70 or 30.
For example:
If you need dynamic drawings that are created and positioned using specific bar and price coordinates, functions like line.new(), box.new(), and label.new() are more suitable.
For simple signal markers, plotshape() is usually easier.
For fixed horizontal levels, hline() is the appropriate choice.
So in simple terms:
-> line.new() → Dynamic lines and trend lines
-> box.new() → Rectangular zones
-> label.new() → Text and custom markers
-> plotshape() → Signal shapes
-> hline() → Fixed horizontal levels
These functions allow you to turn a basic Pine Script indicator into a much more visual and informative chart.