PINE LIBRARY
업데이트됨 VisualStructureTools

Library "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).
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).
릴리즈 노트
v2 UI Control Upgrade & Trend Vector SupportThis update focuses on better visual management of MTF objects and introduces diagonal trendline support.
Changes to existing functions:
setLine(): Updated is_extend to a string-based logic ("ext.both" or "no ext.") for better compatibility with complex MTF setups. Renamed labelPos to v_labelPos.
setBox(): Added l_pos parameter. You can now align box labels to "left", "center", or "right". This is crucial to prevent label stacking at the chart's edge during high-density price action.
New Features:
trendLine(): A new function to draw diagonal vectors using UNIX timestamps. Supports multiple extension modes ("ext.right", "ext.both", "no ext.") and includes synchronized labels at the endpoint.
Added:
trendLine(start_price, startTime, last_price, lastTime, labelText, labelPos, is_extend, l_width, l_col, l_style)
Draws a diagonal trendline (vector) between two specific points in time.
Parameters:
start_price (float): Price level at the starting point.
startTime (int): UNIX timestamp (ms) of the starting point.
last_price (float): Price level at the end point.
lastTime (int): UNIX timestamp (ms) of the end point.
labelText (string): Text to display on the label. Use "none" to hide.
labelPos (string): Vertical position of the label ('above', 'below', or 'none').
is_extend (string): Extension mode: "ext.right", "ext.both", or "no ext.".
l_width (int): Width of the line in pixels.
l_col (color): Color of the line and the label text.
l_style (string): Line style: "solid", "dashed", or "dotted".
Returns: The ID of the drawn line and label.
Updated:
setLine(price, startTime, labelText, v_labelPos, is_extend, l_width, l_col, l_style)
Draws a horizontal price level or a segment with an optional synchronized label.
Parameters:
price (float): The price level where the line will be drawn.
startTime (int): UNIX timestamp (ms) for the starting point of the line.
labelText (string): Text to be displayed on the label. Set to "none" to disable.
v_labelPos (string): Vertical position of the label relative to the price ('above', 'below', or 'none').
is_extend (string): Extension mode: "ext.both" for infinite extension, "no ext." to draw from startTime to current time.
l_width (int): Line thickness in pixels.
l_col (color): Color for both the line and the label text.
l_style (string): Visual style of the line: "solid", "dashed", or "dotted".
Returns: The ID of the updated line and label objects.
setBox(top, bottom, startTime, endTime, boxText, l_pos, b_col, b_width, b_style, b_transp)
Draws a filled box with a smart label to prevent visual clutter.
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.
l_pos (string): Label alignment: "left" (start of box), "right" (current time), or "center".
b_col (color): Border and fill color.
b_width (int): Border width in pixels.
b_style (string): Border style: "solid", "dashed", or "dotted".
b_transp (int): Background transparency (0-100).
Returns: The ID of the drawn box and label.
릴리즈 노트
v3Added:
colorsuite()
Provides a unified palette of cyberpunk, structural, and dashboard colors.
Returns: A tuple containing [bull_candle_color, bear_candle_color, deep_space_blue, obsidian_forest, silk_pearl, omsf_color, omsf_bulls_color, omsf_bears_color, hyper_green_hex, laser_crimson_hex]
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.