Free TradingView Indicators | Ready-to-Use Pine Script v5 Codes

Free TradingView Indicators & Pine Script v5 Codes

Ready-to-use Pine Script v5 codes to optimize your technical analysis

How to Install Pine Script Code on TradingView

  1. Choose your preferred tool below and click the "Copy" button.
  2. Open any chart on the TradingView website.
  3. Click on the "Pine Editor" tab at the bottom bar.
  4. Clear the default text inside the editor and paste the copied code.
  5. Click "Save", then click "Add to chart".

1. Smart Multi-EMA Crossover Pine v5

This moving average indicator combines 20-period and 50-period Exponential Moving Averages (EMA). The chart background turns green during a BUY signal and shifts to red on a SELL signal.

//@version=5
indicator("Smart Multi-EMA Crossover", overlay=true)
fastLength = input.int(20, title="Fast EMA Length")
slowLength = input.int(50, title="Slow EMA Length")
fastEMA = ta.ema(close, fastLength)
slowEMA = ta.ema(close, slowLength)
plot(fastEMA, color=color.blue, title="Fast EMA", linewidth=2)
plot(slowEMA, color=color.orange, title="Slow EMA", linewidth=2)
bullishBuy = ta.crossover(fastEMA, slowEMA)
bearishSell = ta.crossunder(fastEMA, slowEMA)
bgcolor(fastEMA > slowEMA ? color.new(color.green, 90) : color.new(color.red, 90))
plotshape(bullishBuy, title="Buy Signal", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(bearishSell, title="Sell Signal", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)

2. RSI Zones with Alerts Pine v5

A standard RSI indicator built with an intuitive visual layout. This script highlights overbought zones (above 70) and oversold zones (below 30) with dynamic background colors.

//@version=5
indicator("RSI Zones with Alerts", overlay=false)
rsiLength = input.int(14, title="RSI Length")
overbought = input.int(70, title="Overbought Level")
oversold = input.int(30, title="Oversold Level")
rsiValue = ta.rsi(close, rsiLength)
rsiPlot = plot(rsiValue, color=color.purple, title="RSI")
h1 = hline(overbought, "Overbought", color=color.red)
h2 = hline(oversold, "Oversold", color=color.green)
hline(50, "Middle Line", color=color.gray, linestyle=hline.style_dashed)
fill(h1, rsiPlot, rsiValue > overbought ? color.new(color.red, 80) : na, title="Overbought Fill")
fill(h2, rsiPlot, rsiValue < oversold ? color.new(color.green, 80) : na, title="Oversold Fill")

3. ATR Volatility Stop-Loss Guide Pine v5

Utilizes the Average True Range (ATR) algorithm to measure market volatility. It plots dynamic boundary lines above and below price bars to serve as automated Stop-Loss markers.

//@version=5
indicator("ATR Volatility Stop-Loss Guide", overlay=true)
atrLength = input.int(14, title="ATR Length")
multiplier = input.float(2.0, title="ATR Multiplier")
atr = ta.atr(atrLength)
longStop = close - (atr * multiplier)
shortStop = close + (atr * multiplier)
plot(longStop, title="Long Stop Guide", color=color.new(color.green, 30), style=plot.style_linebr)
plot(shortStop, title="Short Stop Guide", color=color.new(color.red, 30), style=plot.style_linebr)