PINE LIBRARY
VSAwithPA

Library "VSAwithPA"
getVsaSignal(vol_ma_len, avgs, ma_type, red_thresh, orange_thresh, yellow_thresh, blue_thresh)
Calculates the core VSA signal.
Parameters:
vol_ma_len (simple int)
avgs (int)
ma_type (string)
red_thresh (float)
orange_thresh (float)
yellow_thresh (float)
blue_thresh (float)
Returns: A tuple: [color, string, float].
format_vertical(_text)
Formats a string to be displayed vertically.
Parameters:
_text (string)
plotVsaLabel(show_labels, labelText, use_vertical_labels, label_size_option, label_pos_option, y_level_for_line, candleColor)
Plots a VSA label on the chart.
Parameters:
show_labels (bool)
labelText (string)
use_vertical_labels (bool)
label_size_option (string)
label_pos_option (string)
y_level_for_line (float)
candleColor (color)
drawVsaLine(show_lines, show_signal_line, delete_prev_lines, prev_line, y_level, line_color, line_width, line_style_option, line_extend_option)
Draws a horizontal line for a VSA signal.
Parameters:
show_lines (bool)
show_signal_line (bool)
delete_prev_lines (bool)
prev_line (line)
y_level (float)
line_color (color)
line_width (int)
line_style_option (string)
line_extend_option (string)
Returns: (line) The ID of the newly created line.
getWcma(show, len)
CORRECTED: Calculates a Weighted Close Moving Average and returns the value.
Parameters:
show (bool)
len (int)
Returns: (series float) The calculated WCMA value, or na.
getVsaSignal(vol_ma_len, avgs, ma_type, red_thresh, orange_thresh, yellow_thresh, blue_thresh)
Calculates the core VSA signal.
Parameters:
vol_ma_len (simple int)
avgs (int)
ma_type (string)
red_thresh (float)
orange_thresh (float)
yellow_thresh (float)
blue_thresh (float)
Returns: A tuple: [color, string, float].
format_vertical(_text)
Formats a string to be displayed vertically.
Parameters:
_text (string)
plotVsaLabel(show_labels, labelText, use_vertical_labels, label_size_option, label_pos_option, y_level_for_line, candleColor)
Plots a VSA label on the chart.
Parameters:
show_labels (bool)
labelText (string)
use_vertical_labels (bool)
label_size_option (string)
label_pos_option (string)
y_level_for_line (float)
candleColor (color)
drawVsaLine(show_lines, show_signal_line, delete_prev_lines, prev_line, y_level, line_color, line_width, line_style_option, line_extend_option)
Draws a horizontal line for a VSA signal.
Parameters:
show_lines (bool)
show_signal_line (bool)
delete_prev_lines (bool)
prev_line (line)
y_level (float)
line_color (color)
line_width (int)
line_style_option (string)
line_extend_option (string)
Returns: (line) The ID of the newly created line.
getWcma(show, len)
CORRECTED: Calculates a Weighted Close Moving Average and returns the value.
Parameters:
show (bool)
len (int)
Returns: (series float) The calculated WCMA value, or na.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.