PINE LIBRARY
Cập nhật DisplayUtilities

Library "DisplayUtilities"
Display utilities for color management and visual presentation
get_direction_color(direction, up_excessive, up_normal, neutral, down_normal, down_excessive)
Get candle color based on direction and color scheme
Parameters:
direction (int): Direction value (-2, -1, 0, 1, 2)
up_excessive (color): Color for +2 direction
up_normal (color): Color for +1 direction
neutral (color): Color for 0 direction
down_normal (color): Color for -1 direction
down_excessive (color): Color for -2 direction
Returns: Appropriate color for the direction
get_candle_paint_directions(paint_opt, body_dir, bar_dir, breakout_dir, combined_dir)
Get candle directions for different painting algorithms
Parameters:
paint_opt (string): Painting option algorithm
body_dir (int): Body direction
bar_dir (int): Bar direction
breakout_dir (int): Breakout direction
combined_dir (int): Combined direction
Returns: [body_paint_dir, border_paint_dir, wick_paint_dir, unified_dir]
get_bias_paint_directions(paint_bias, unified_dir)
Get paint directions based on bias filter
Parameters:
paint_bias (string): Paint bias option ("All", "Bull Bias", "Bear Bias")
unified_dir (int): Unified direction
Returns: [bias_dir_a, bias_dir_b] Directions for two plotcandle series
get_transparency_levels(sf_filtered, fade_option, fade_opacity)
Calculate transparency levels for strength factor filtering
Parameters:
sf_filtered (bool): Is strength factor filtered
fade_option (string): Fade option ("Disabled", "Fade Candle", "Do Not Fade Wick", "Do Not Fade Wick and Border")
fade_opacity (int): Fade opacity percentage
Returns: [body_transparency, border_transparency, wick_transparency]
get_strength_factor_filter(filter_option, individual_filters)
Generate strength factor filter conditions
Parameters:
filter_option (string): Filter option string
individual_filters (map<string, bool>): Map of individual filter conditions
Returns: Boolean filter result
get_signal_bar_condition(signal_option, individual_filters)
Generate signal bar conditions (inverted filters)
Parameters:
signal_option (string): Signal bar option string
individual_filters (map<string, bool>): Map of individual filter conditions
Returns: Boolean signal bar result
get_zscore_signal_condition(z_signal_option, z_filters)
Get Z-score signal bar conditions
Parameters:
z_signal_option (string): Z-score signal option
z_filters (map<string, bool>): Map of Z-score filters
Returns: Boolean Z-score signal condition
get_standard_colors()
Create a standard color scheme for directions
Returns: [up_excessive, up_normal, neutral, down_normal, down_excessive] Standard color set
apply_zscore_modification(original_dir, z_filtered)
Modify directions for Z-score excess display
Parameters:
original_dir (int): Original direction
z_filtered (bool): Is Z-score filtered (shows excess)
Returns: Modified direction (doubled if excess detected)
get_default_fade_colors()
Get default fade colors for strength factor overlay
Returns: [bullish_fade_color, bearish_fade_color] Default colors for TV overlay
should_paint_candles(paint_algo)
Check if paint algorithm should show candles
Parameters:
paint_algo (string): Paint algorithm option
Returns: True if algorithm should display candles
get_signal_bar_char(signal_type, is_bullish)
Get signal bar character based on signal type
Parameters:
signal_type (string): Signal type ("strength_factor" or "zscore")
is_bullish (bool): Direction is bullish
Returns: [character, location] Character and location for plotchar
get_signal_bar_color(signal_type, is_bullish)
Get signal bar colors
Parameters:
signal_type (string): Signal type ("strength_factor" or "zscore")
is_bullish (bool): Direction is bullish
Returns: Signal bar color
Display utilities for color management and visual presentation
get_direction_color(direction, up_excessive, up_normal, neutral, down_normal, down_excessive)
Get candle color based on direction and color scheme
Parameters:
direction (int): Direction value (-2, -1, 0, 1, 2)
up_excessive (color): Color for +2 direction
up_normal (color): Color for +1 direction
neutral (color): Color for 0 direction
down_normal (color): Color for -1 direction
down_excessive (color): Color for -2 direction
Returns: Appropriate color for the direction
get_candle_paint_directions(paint_opt, body_dir, bar_dir, breakout_dir, combined_dir)
Get candle directions for different painting algorithms
Parameters:
paint_opt (string): Painting option algorithm
body_dir (int): Body direction
bar_dir (int): Bar direction
breakout_dir (int): Breakout direction
combined_dir (int): Combined direction
Returns: [body_paint_dir, border_paint_dir, wick_paint_dir, unified_dir]
get_bias_paint_directions(paint_bias, unified_dir)
Get paint directions based on bias filter
Parameters:
paint_bias (string): Paint bias option ("All", "Bull Bias", "Bear Bias")
unified_dir (int): Unified direction
Returns: [bias_dir_a, bias_dir_b] Directions for two plotcandle series
get_transparency_levels(sf_filtered, fade_option, fade_opacity)
Calculate transparency levels for strength factor filtering
Parameters:
sf_filtered (bool): Is strength factor filtered
fade_option (string): Fade option ("Disabled", "Fade Candle", "Do Not Fade Wick", "Do Not Fade Wick and Border")
fade_opacity (int): Fade opacity percentage
Returns: [body_transparency, border_transparency, wick_transparency]
get_strength_factor_filter(filter_option, individual_filters)
Generate strength factor filter conditions
Parameters:
filter_option (string): Filter option string
individual_filters (map<string, bool>): Map of individual filter conditions
Returns: Boolean filter result
get_signal_bar_condition(signal_option, individual_filters)
Generate signal bar conditions (inverted filters)
Parameters:
signal_option (string): Signal bar option string
individual_filters (map<string, bool>): Map of individual filter conditions
Returns: Boolean signal bar result
get_zscore_signal_condition(z_signal_option, z_filters)
Get Z-score signal bar conditions
Parameters:
z_signal_option (string): Z-score signal option
z_filters (map<string, bool>): Map of Z-score filters
Returns: Boolean Z-score signal condition
get_standard_colors()
Create a standard color scheme for directions
Returns: [up_excessive, up_normal, neutral, down_normal, down_excessive] Standard color set
apply_zscore_modification(original_dir, z_filtered)
Modify directions for Z-score excess display
Parameters:
original_dir (int): Original direction
z_filtered (bool): Is Z-score filtered (shows excess)
Returns: Modified direction (doubled if excess detected)
get_default_fade_colors()
Get default fade colors for strength factor overlay
Returns: [bullish_fade_color, bearish_fade_color] Default colors for TV overlay
should_paint_candles(paint_algo)
Check if paint algorithm should show candles
Parameters:
paint_algo (string): Paint algorithm option
Returns: True if algorithm should display candles
get_signal_bar_char(signal_type, is_bullish)
Get signal bar character based on signal type
Parameters:
signal_type (string): Signal type ("strength_factor" or "zscore")
is_bullish (bool): Direction is bullish
Returns: [character, location] Character and location for plotchar
get_signal_bar_color(signal_type, is_bullish)
Get signal bar colors
Parameters:
signal_type (string): Signal type ("strength_factor" or "zscore")
is_bullish (bool): Direction is bullish
Returns: Signal bar color
Phát hành các Ghi chú
v2Phát hành các Ghi chú
v3Thư viện Pine
Theo đúng tinh thần TradingView, tác giả đã công bố mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác trong cộng đồng có thể tái sử dụng. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này cho mục đích cá nhân hoặc trong các ấn phẩm mã nguồn mở khác, nhưng việc tái sử dụng mã này trong các ấn phẩm phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Thư viện Pine
Theo đúng tinh thần TradingView, tác giả đã công bố mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác trong cộng đồng có thể tái sử dụng. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này cho mục đích cá nhân hoặc trong các ấn phẩm mã nguồn mở khác, nhưng việc tái sử dụng mã này trong các ấn phẩm phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.