VisualStructureToolsLibrary "VisualStructureTools"
MTF-safe drawing library (Unix-Time). Designed for high visual discrimination and efficient debugging of complex logic without cluttering the main script.
Optimized for Pine Script® v6 to prevent runtime errors in multi-timeframe environments.
setLine(price, startTime, labelText, labelPos, is_extend, l_width, l_col, l_style)
Draws a horizontal level or a segment with an optional label.
Parameters:
price (float) : Price level for the line.
startTime (int) : UNIX timestamp (ms) for the starting point.
labelText (string) : Text to display on the label. Use "none" to hide.
labelPos (string) : Position of the label relative to the price ('above' or 'below', 'none').
is_extend (bool) : If true, the line extends infinitely (extend.both).
l_width (int) : Width of the line in pixels.
l_col (color) : Color for the line and label text.
l_style (string) : Style of the line ('solid', 'dashed', 'dotted').
setBox(top, bottom, startTime, endTime, boxText, b_col, b_width, b_style, b_transp)
Draws a filled box with an optional synchronized text label.
Parameters:
top (float) : Price of the upper boundary.
bottom (float) : Price of the lower boundary.
startTime (int) : UNIX timestamp (ms) for the left side of the box.
endTime (int) : UNIX timestamp (ms) for the right side (defaults to current 'time').
boxText (string) : Optional text label for the box. Use "" to hide.
b_col (color) : Border and fill color.
b_width (int) : Border width.
b_style (string) : Border style ('solid', 'dashed', 'dotted').
b_transp (int) : Transparency for the background fill (0-100).
Biblioteca Pine Script®






















