1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
Gann Square of 9 support and resistance levels based on cardinal (90°, 180°, 270°, 360°) and ordinal (45°, 135°, 225°, 315°) polar angles. It anchors calculations to recent swing pivots, highs, lows, or a user-defined manual price. Users can adjust the number of upward and downward price revolutions, toggle line extensions, filter levels using an ATR proximity threshold, and customize an informational table positioned on the chart.
Gann Square of 9 polar angle calculations
Cardinal and ordinal support and resistance levels
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Øæá íææÊ (/ÑÇÓÊ)
int
5
i_pivotLen
ÊÚÏÇÏ íææÊåÇí äãÇíÔí
int
3
i_pivotCount
äÞØåí áäÑ ãÍÇÓÈå
string
ÂÎÑíä íææÊ
i_anchorMode
ÞíãÊ ÏÓÊí (ÇÑ ÍÇáÊ ÏÓÊí)
float
0.0
i_manualAnchor
äãÇíÔ Cardinal (90°,180°,270°,360°)
bool
true
i_showCardinal
äãÇíÔ Ordinal (45°,135°,225°,315°)
bool
true
i_showOrdinal
ÊÚÏÇÏ ÏæÑ Èå ÈÇáÇ (ãÞÇæãÊ)
int
2
i_revolutionUp
ÊÚÏÇÏ ÏæÑ Èå Çííä (ÍãÇíÊ)
int
2
i_revolutionDn
äãÇíÔ ÎØæØ Ñæí ÇÑÊ
bool
true
i_showLines
ÎØæØ ÇãÊÏÇÏÏÇÑ
bool
false
i_extendLines
Cardinal ãÞÇæãÊ
color
color.new(#FF4444, 0)
i_colCardR
Cardinal ÍãÇíÊ
color
color.new(#00E676, 0)
i_colCardS
Show all 18 settings
Setting
Type
Default
Variable
Ordinal ãÞÇæãÊ
color
color.new(#FF9800, 60)
i_colOrdR
Ordinal ÍãÇíÊ
color
color.new(#4CAF50, 60)
i_colOrdS
Ñä íææÊåÇ
color
color.new(#B0BEC5, 0)
i_colPivot
ãæÞÚíÊ ÌÏæá
string
Çííä ÑÇÓÊ
i_tablePos
Øæá ATR (ÊÔÎíÕ ÞÏÑÊ äÇÍíå)
int
14
i_atrLen
ÍÏÇÞá ÝÇÕáå ÇÒ ÞíãÊ (% ATR)
float
0.3
i_minDist
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.
This script plots multiple shapes using the plotshape function in Pine Script v4. It 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
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
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
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
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
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