PINE LIBRARY
已更新 fsl_helpers

Library "fsl_helpers"
A library with function helpers for FSL script family, including functions for plotting, formatting, etc.
version=6
plot_width_get()
Returns the internal panel width used by the helper library.
Returns: int Width of the custom plot panel.
plot_x_axis(x, inc, theme)
Draws a vertical tick and label on the custom X-axis of the panel.
Parameters:
x (int): X-axis coordinate in panel space.
inc (float): Label value displayed below the tick.
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
plot_y_axis(yy, min, max, theme, plot_mult)
Draws a horizontal Y-axis guide line and corresponding price label.
Converts the normalized panel coordinate to the actual price level.
Parameters:
yy (float): Normalized Y coordinate in panel space.
min (float): Minimum value of the plotted price range.
max (float): Maximum value of the plotted price range.
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
plot_mult (int): Horizontal spacing multiplier used by the panel.
Returns: void
plot_scale(y, min, max)
Converts a price value into the normalized panel scale [-1, 1] used
by the forward-curve plotting area.
Parameters:
y (float): Price value to scale.
min (float): Minimum value of the plotted price range.
max (float): Maximum value of the plotted price range.
Returns: float Normalized Y coordinate for plotting.
plot_scatter(x, y, max, min, col, s, tiptool, theme, plot_mult)
Draws a scatter-point marker in the forward-curve panel.
Optionally attaches a tooltip containing symbol, time, and price.
Parameters:
x (int): X index position within the curve.
y (float): Price value of the point.
max (float): Maximum value of the plotted price range.
min (float): Minimum value of the plotted price range.
col (color): Marker color.
s (string): Marker size.
tiptool (string): Text shown in the tooltip.
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
plot_mult (int): Horizontal spacing multiplier used by the panel.
Returns: void
plot_line(x, y, max, min, x1, y1, col, w, sty, plot_mult)
Draws a line segment between two curve points in the panel.
Used to connect consecutive futures contracts in the forward curve.
Parameters:
x (int): X position of the ending point.
y (float): Price value of the ending point.
max (float): Maximum value of the plotted price range.
min (float): Minimum value of the plotted price range.
x1 (int): X position of the starting point.
y1 (float): Price value of the starting point.
col (color): Line color.
w (int): Line width.
sty (string): Line style.
plot_mult (int): Horizontal spacing multiplier used by the panel.
Returns: void
plot_legend(y, col, sty, txt, theme, plot_mult)
Draws a legend entry composed of a marker, line sample, and label.
Parameters:
y (float): Y position of the legend row.
col (color): Legend color.
sty (string): Line style used for the sample segment.
txt (string): Legend label text.
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
plot_mult (int): Horizontal spacing multiplier used by the panel.
Returns: void
plot_remove_all_boxes()
Deletes all boxes currently drawn by the script.
Useful before redrawing the custom panel.
Returns: void
plot_remove_all_labels()
Deletes all labels currently drawn by the script.
Useful before redrawing the custom panel.
Returns: void
plot_remove_all_lines()
Deletes all lines currently drawn by the script.
Useful before redrawing the custom panel.
Returns: void
plot_main_boxes(main_title, theme, plot_mult)
Draws the main panel boxes for the forward-curve display, including
frame, title area, legend area, and timeframe header.
Parameters:
main_title (string): Main title for the plot
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
plot_mult (int): Horizontal spacing multiplier used by the panel.
Returns: void
A library with function helpers for FSL script family, including functions for plotting, formatting, etc.
version=6
plot_width_get()
Returns the internal panel width used by the helper library.
Returns: int Width of the custom plot panel.
plot_x_axis(x, inc, theme)
Draws a vertical tick and label on the custom X-axis of the panel.
Parameters:
x (int): X-axis coordinate in panel space.
inc (float): Label value displayed below the tick.
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
plot_y_axis(yy, min, max, theme, plot_mult)
Draws a horizontal Y-axis guide line and corresponding price label.
Converts the normalized panel coordinate to the actual price level.
Parameters:
yy (float): Normalized Y coordinate in panel space.
min (float): Minimum value of the plotted price range.
max (float): Maximum value of the plotted price range.
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
plot_mult (int): Horizontal spacing multiplier used by the panel.
Returns: void
plot_scale(y, min, max)
Converts a price value into the normalized panel scale [-1, 1] used
by the forward-curve plotting area.
Parameters:
y (float): Price value to scale.
min (float): Minimum value of the plotted price range.
max (float): Maximum value of the plotted price range.
Returns: float Normalized Y coordinate for plotting.
plot_scatter(x, y, max, min, col, s, tiptool, theme, plot_mult)
Draws a scatter-point marker in the forward-curve panel.
Optionally attaches a tooltip containing symbol, time, and price.
Parameters:
x (int): X index position within the curve.
y (float): Price value of the point.
max (float): Maximum value of the plotted price range.
min (float): Minimum value of the plotted price range.
col (color): Marker color.
s (string): Marker size.
tiptool (string): Text shown in the tooltip.
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
plot_mult (int): Horizontal spacing multiplier used by the panel.
Returns: void
plot_line(x, y, max, min, x1, y1, col, w, sty, plot_mult)
Draws a line segment between two curve points in the panel.
Used to connect consecutive futures contracts in the forward curve.
Parameters:
x (int): X position of the ending point.
y (float): Price value of the ending point.
max (float): Maximum value of the plotted price range.
min (float): Minimum value of the plotted price range.
x1 (int): X position of the starting point.
y1 (float): Price value of the starting point.
col (color): Line color.
w (int): Line width.
sty (string): Line style.
plot_mult (int): Horizontal spacing multiplier used by the panel.
Returns: void
plot_legend(y, col, sty, txt, theme, plot_mult)
Draws a legend entry composed of a marker, line sample, and label.
Parameters:
y (float): Y position of the legend row.
col (color): Legend color.
sty (string): Line style used for the sample segment.
txt (string): Legend label text.
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
plot_mult (int): Horizontal spacing multiplier used by the panel.
Returns: void
plot_remove_all_boxes()
Deletes all boxes currently drawn by the script.
Useful before redrawing the custom panel.
Returns: void
plot_remove_all_labels()
Deletes all labels currently drawn by the script.
Useful before redrawing the custom panel.
Returns: void
plot_remove_all_lines()
Deletes all lines currently drawn by the script.
Useful before redrawing the custom panel.
Returns: void
plot_main_boxes(main_title, theme, plot_mult)
Draws the main panel boxes for the forward-curve display, including
frame, title area, legend area, and timeframe header.
Parameters:
main_title (string): Main title for the plot
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
plot_mult (int): Horizontal spacing multiplier used by the panel.
Returns: void
版本注释
v2Updated:
plot_x_axis(x, axis_text, theme)
Draws a vertical tick and label on the custom X-axis of the panel.
Parameters:
x (int): X-axis coordinate in panel space.
axis_text (string)
theme (Theme type from QuantNomad/fsl_theme/3): Theme used for the chart
Pine脚本库
秉承TradingView的精神,作者已将此Pine代码作为开源库发布,以便我们社区的其他Pine程序员可以重用它。向作者致敬!您可以私下或在其他开源出版物中使用此库,但在出版物中重用此代码须遵守网站规则。
Quant Developer | Pine Script v6 | Python & R
12+ yrs system. trading, hedge fund experience
Indicators, strategies & screeners
Futures & options
💼 Hire/Consulting:
qntly.com/hire
🎓 Pine Code With AI:
qntly.com/pineai
12+ yrs system. trading, hedge fund experience
Indicators, strategies & screeners
Futures & options
💼 Hire/Consulting:
qntly.com/hire
🎓 Pine Code With AI:
qntly.com/pineai
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
Pine脚本库
秉承TradingView的精神,作者已将此Pine代码作为开源库发布,以便我们社区的其他Pine程序员可以重用它。向作者致敬!您可以私下或在其他开源出版物中使用此库,但在出版物中重用此代码须遵守网站规则。
Quant Developer | Pine Script v6 | Python & R
12+ yrs system. trading, hedge fund experience
Indicators, strategies & screeners
Futures & options
💼 Hire/Consulting:
qntly.com/hire
🎓 Pine Code With AI:
qntly.com/pineai
12+ yrs system. trading, hedge fund experience
Indicators, strategies & screeners
Futures & options
💼 Hire/Consulting:
qntly.com/hire
🎓 Pine Code With AI:
qntly.com/pineai
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。