PINE LIBRARY
מעודכן 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
הערות שחרור
v2הערות שחרור
v3ספריית Pine
ברוח TradingView אמיתית, המחבר פרסם את קוד Pine זה כספריית קוד פתוח כך שמתכנתי Pine אחרים מהקהילה שלנו יוכלו לעשות בו שימוש חוזר. כל הכבוד למחבר! אתה יכול להשתמש בספרייה זו באופן פרטי או בפרסומי קוד פתוח אחרים, אך השימוש החוזר בקוד זה בפרסומים כפוף לכללי הבית.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
ספריית Pine
ברוח TradingView אמיתית, המחבר פרסם את קוד Pine זה כספריית קוד פתוח כך שמתכנתי Pine אחרים מהקהילה שלנו יוכלו לעשות בו שימוש חוזר. כל הכבוד למחבר! אתה יכול להשתמש בספרייה זו באופן פרטי או בפרסומי קוד פתוח אחרים, אך השימוש החוזר בקוד זה בפרסומים כפוף לכללי הבית.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.