PINE LIBRARY
Updated 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
Release Notes
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 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.
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
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.
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
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.