Pine Script Plot Styles: Enhancing Your TradingView Charts
When working with Pine Script on TradingView, the plot
function is essential for visualizing data and indicators on your charts. Understanding the plot style options in Pine Script can significantly enhance how your data is represented, making your scripts more informative and visually appealing.
What Is Plot Style in Pine Script?
The plot()
function in Pine Script is used to display calculated data on charts. It supports various plot styles that change the appearance of the plotted data, such as lines, histograms, areas, columns, circles, and crosses. Each style serves different visualization needs, helping traders interpret data more effectively.

Common Plot Styles and Their Uses
Here are some popular plot styles you can use in Pine Script:
- Line (
plot.style_line
): The default style, drawing a continuous line representing your data series. - Step Line (
plot.style_stepline
): Creates a staircase effect, useful for stepwise data changes. - Area (
plot.style_area
): Fills the area between the line and a baseline, great for highlighting ranges. - Histogram (
plot.style_histogram
): Displays data as bars with customizable width, ideal for volume or change data. - Columns (
plot.style_columns
): Similar to histograms but with fixed column widths, often used for volume. - Circles and Crosses (
plot.style_circles
,plot.style_cross
): Plots shapes at data points, useful for marking specific events or signals.
Each style can be customized with parameters like color, line width, and transparency to match your chart's theme and improve readability.
How to Choose and Implement Plot Styles
Choosing the right plot style depends on the type of data and the message you want to convey:
- Use lines for continuous data like moving averages.
- Use histograms or columns for volume or frequency data.
- Use areas to emphasize ranges or bands.
- Use shapes to highlight specific signals or pivot points.
Example of setting a plot style in Pine Script:
plot(series=close, title="Close Price", color=color.blue, linewidth=2, style=plot.style_line)
You can also allow users to select the plot style dynamically via input options, enhancing script flexibility.
Enhancing Your Plots with Colors and Customization
Dynamic coloring based on conditions (e.g., bullish or bearish bars) can be applied using the color
parameter. Colors can be constants, user inputs, or calculated series that change with each bar, adding visual cues to your plots.