1Copy the scriptPress Copy script above, or the copy button on the code below.
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
173 lines of Pine Script v6 from indicators/fibonacci-retracement.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.
Utilizing a ZigZag library to identify major price swings, it draws horizontal levels corresponding to key ratios such as 0.236, 0.382, 0.5, 0.618, and 0.786. Inputs allow adjustments to swing deviation, depth, line extensions, level formatting, and visual styles. Because it relies on ZigZag calculations, level lines update dynamically as new price swings emerge.
Automatic swing detection via ZigZag library
Customizable Fibonacci retracement and extension levels
Flexible line extension and label positioning settings
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Deviation
float
3.0
deviationMultiplier
Depth
int
10
depth
Reverse
bool
false
reverse
Extend Left | Extend Right
bool
false
extendLeft
extendRight
bool
true
extendRight
Show Prices
bool
true
showPrices
Show Levels
bool
true
showLevels
levelsFormat
string
Values
levelsFormat
Labels Position
string
Left
labelsPosition
Background Transparency
int
85
backgroundTransparency
show0
bool
true
show0
value0
float
0.0
value0
Show all 40 settings
Setting
Type
Default
Variable
color0
color
#787b86
color0
show0236
bool
true
show0236
value0236
float
0.236
value0236
color0236
color
#f44336
color0236
show0382
bool
true
show0382
value0382
float
0.382
value0382
color0382
color
#81c784
color0382
show05
bool
true
show05
value05
float
0.5
value05
color05
color
#4caf50
color05
show0618
bool
true
show0618
value0618
float
0.618
value0618
color0618
color
#009688
color0618
show065
bool
false
show065
value065
float
0.65
value065
color065
color
#009688
color065
show0786
bool
true
show0786
value0786
float
0.786
value0786
color0786
color
#64b5f6
color0786
show1
bool
true
show1
value1
float
1.0
value1
color1
color
#787b86
color1
show1272
bool
false
show1272
value1272
float
1.272
value1272
color1272
color
#81c784
color1272
show1414
bool
false
show1414
value1414
float
1.414
value1414
color1414
color
#f44336
color1414
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.
Moving Average Channel plots separate simple moving averages for upper and lower bands on the price chart. It fills the space between bands with semi-transparent color and colors bars green above the upper band, red below the lower band, or gray in between. Us
This overlay indicator finds pivot highs and lows on the price chart and compares the last two highs and the last two lows. When the percentage difference between a pair is below the Equal HL threshold, it treats them as equal levels and draws a box. Left and
This indicator monitors multiple cryptocurrency symbols for trading signals. It calculates and plots entry prices, take profit, and stop loss levels for each symbol including BTCUSDT, ETHUSDT, BNBUSDT and others. Price crossovers trigger buy, sell or close ale
This overlay indicator draws a fixed-range volume profile on the price chart, splitting traded activity into up and down volume at each price level. It also plots a sentiment profile, a developing point of control, and value-area high and low around a configur
The BZ-tracker indicator marks ARK Invest buy and sell transactions on stock charts with labels. It plots green labels for purchases and red labels for sales, each annotated with a multiplier such as X1 or X2 to show the number of ARK ETFs trading the stock on
This indicator fits a linear regression through stored pivot highs and lows and draws the resulting channel on the price chart. A function returns predicted values, maximum and minimum deviations, and the average absolute deviation. Confirmed two-bar pivots up