Indicator · Pine Script v4 · Own pane

Fancy Shapes

by everget

This script plots multiple shapes using the plotshape function in Pine Script v4.

View on GitHub

GitHub stars948on the repository
Pine versionv4older, still runs
Lines of code67
Settings0inputs
LicenceGPL-3.0
Last update10 days ago18 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

67 lines of Pine Script v4 from research/fancy_shapes.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.

fancy_shapes.pine
//@version=4
// Copyright (c) 2019-present, Alex Orekhov (everget)
// Fancy Shapes script may be freely distributed under the terms of the GPL-3.0 license.
study("Fancy Shapes")

y0 = 0
offset0 = 0

y1 = 0
offset1 = -20

y2 = 0
offset2 = -40

y3 = 0
offset3 = -60

y4 = 0
offset4 = -80

y5 = 0
offset5 = -100

y6 = 0
offset6 = -120

plotshape(y0, location=location.absolute, style=shape.flag, size=size.huge, color=color.blue, transp=80, show_last=1, offset=offset0)
plotshape(y0, location=location.absolute, style=shape.flag, size=size.large, color=color.blue, transp=80, show_last=1, offset=offset0)
plotshape(y0, location=location.absolute, style=shape.flag, size=size.normal, color=color.blue, transp=80, show_last=1, offset=offset0)
plotshape(y0, location=location.absolute, style=shape.flag, size=size.small, color=color.blue, transp=80, show_last=1, offset=offset0)
plotshape(y0, location=location.absolute, style=shape.flag, size=size.tiny, color=color.blue, transp=80, show_last=1, offset=offset0)

plotshape(y1, location=location.absolute, style=shape.square, size=size.huge, color=color.blue, transp=80, show_last=1, offset=offset1)
plotshape(y1, location=location.absolute, style=shape.square, size=size.large, color=color.blue, transp=80, show_last=1, offset=offset1)
plotshape(y1, location=location.absolute, style=shape.square, size=size.normal, color=color.blue, transp=80, show_last=1, offset=offset1)
plotshape(y1, location=location.absolute, style=shape.square, size=size.small, color=color.blue, transp=80, show_last=1, offset=offset1)
plotshape(y1, location=location.absolute, style=shape.square, size=size.tiny, color=color.blue, transp=80, show_last=1, offset=offset1)

plotshape(y2, location=location.absolute, style=shape.diamond, size=size.huge, color=color.blue, transp=80, show_last=1, offset=offset2)
plotshape(y2, location=location.absolute, style=shape.diamond, size=size.large, color=color.blue, transp=80, show_last=1, offset=offset2)
plotshape(y2, location=location.absolute, style=shape.diamond, size=size.normal, color=color.blue, transp=80, show_last=1, offset=offset2)
plotshape(y2, location=location.absolute, style=shape.diamond, size=size.small, color=color.blue, transp=80, show_last=1, offset=offset2)
plotshape(y2, location=location.absolute, style=shape.diamond, size=size.tiny, color=color.blue, transp=80, show_last=1, offset=offset2)

plotshape(y3, location=location.absolute, style=shape.triangleup, size=size.huge, color=color.blue, transp=80, show_last=1, offset=offset3)
plotshape(y3, location=location.absolute, style=shape.triangleup, size=size.large, color=color.blue, transp=80, show_last=1, offset=offset3)
plotshape(y3, location=location.absolute, style=shape.triangleup, size=size.normal, color=color.blue, transp=80, show_last=1, offset=offset3)
plotshape(y3, location=location.absolute, style=shape.triangleup, size=size.small, color=color.blue, transp=80, show_last=1, offset=offset3)
plotshape(y3, location=location.absolute, style=shape.triangleup, size=size.tiny, color=color.blue, transp=80, show_last=1, offset=offset3)

plotshape(y4, location=location.absolute, style=shape.circle, size=size.huge, color=color.blue, transp=80, show_last=1, offset=offset4)
plotshape(y4, location=location.absolute, style=shape.circle, size=size.large, color=color.blue, transp=80, show_last=1, offset=offset4)
plotshape(y4, location=location.absolute, style=shape.circle, size=size.normal, color=color.blue, transp=80, show_last=1, offset=offset4)
plotshape(y4, location=location.absolute, style=shape.circle, size=size.small, color=color.blue, transp=80, show_last=1, offset=offset4)
plotshape(y4, location=location.absolute, style=shape.circle, size=size.tiny, color=color.blue, transp=80, show_last=1, offset=offset4)

plotshape(y5, location=location.absolute, style=shape.labelup, size=size.huge, color=color.blue, transp=80, show_last=1, offset=offset5)
plotshape(y5, location=location.absolute, style=shape.labelup, size=size.large, color=color.blue, transp=80, show_last=1, offset=offset5)
plotshape(y5, location=location.absolute, style=shape.labelup, size=size.normal, color=color.blue, transp=80, show_last=1, offset=offset5)
plotshape(y5, location=location.absolute, style=shape.labelup, size=size.small, color=color.blue, transp=80, show_last=1, offset=offset5)
plotshape(y5, location=location.absolute, style=shape.labelup, size=size.tiny, color=color.blue, transp=80, show_last=1, offset=offset5)

plotshape(y6, location=location.absolute, style=shape.labeldown, size=size.huge, color=color.blue, transp=80, show_last=1, offset=offset6)
plotshape(y6, location=location.absolute, style=shape.labeldown, size=size.large, color=color.blue, transp=80, show_last=1, offset=offset6)
plotshape(y6, location=location.absolute, style=shape.labeldown, size=size.normal, color=color.blue, transp=80, show_last=1, offset=offset6)
plotshape(y6, location=location.absolute, style=shape.labeldown, size=size.small, color=color.blue, transp=80, show_last=1, offset=offset6)
plotshape(y6, location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.blue, transp=80, show_last=1, offset=offset6)

Overview

Fancy Shapes defines fixed y offsets at intervals of 20 and renders flags, squares, diamonds, triangles up, and circles in sizes from tiny to huge. All shapes appear at absolute locations in a separate pane with blue color and 80% transparency. No inputs control the plot and no signals or calculations are performed. It acts as a utility example for testing shape drawing on the chart.

Details

Published by

everget on GitHub

Type

Indicator, Pine Script v4

Draws

Separate pane below the chart

Category

Support & resistance

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

pinepinescripttechnical-indicatorsindicatorsoscillatorbandsaveragetradingviewindicatormoving-average

Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Color Triangular Gradient

by ricardosantos79
261 stars

This script defines a helper function to generate colors via triangular interpolation using TradingView's color.from_gradient. The function blends between minimum, mid, and maximum color points based on an input value. It applies the function to the RSI indica

Indicator v5 Support & resistance
Updated 4 years ago · None stated GitHub repository of Color Triangular Gradient
114 stars

This indicator combines a scaled Forecast Oscillator with a Point of Force state detector. The Forecast Oscillator calculates the percentage deviation of price from its linear regression curve and normalizes the output between 0 and 1, plotting a line in a sep

Indicator v4 Oscillators & momentumSupport & resistance Repaints

Rolling Minimum Index

by mihakralj
99 stars

Rolling Minimum Index calculates and plots the bar offset to the lowest closing price over a user-defined lookback window using Pine Script's built-in lowestbars function. Plotted in a separate indicator pane, it outputs a negative integer representing how man

Indicator v5 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of Rolling Minimum Index

CCI DC

by be-thomas
65 stars

This indicator plots the Commodity Channel Index in a separate pane and surrounds it with a Donchian channel whose lookback length changes with volatility. It measures volatility as a ratio of short and long ATR values, then ranks that ratio and shortens or le

Indicator v5 Oscillators & momentumVolatility & bands
Updated 4 days ago · GPL-3.0 GitHub repository of CCI DC

BTC Multiples

by readysetcryptocodes
43 stars

BTC Multiples calculates and displays Bitcoin macro valuation metrics in a separate pane, including the Mayer Multiple, Stock-to-Flow Multiple, Difficulty Multiple, and Puell Multiple. Each valuation multiple features configurable overvalued and undervalued th

Indicator v4 Moving averagesSupport & resistance
Updated 2 years ago · None stated GitHub repository of BTC Multiples

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers