📚 Indicator Library

10 Pine Script Indicators — TradingView Ready 2026

By Dan Machado · 12 min read · Copy-paste library

This is the IA Trader Pro core library: 10 production-tested Pine Script v5 indicators, all free, all tested on V75 and forex. Copy-paste each into TradingView Pine Editor, save, add to chart. Free tier allows 3 indicators per chart — combine wisely.

⚡ How to Use

1. Open TradingView Pine Editor (free)
2. Copy any indicator below
3. Paste into editor
4. Save (Ctrl+S, name it)
5. Click “Add to Chart”
6. Done — indicator works on any asset and timeframe.

01RSI Smart Alerts

Classic RSI with background colouring when overbought/oversold + alerts on crossings.

▸ Pine v5 · RSI Smart Alerts
//@version=5
indicator("RSI Smart Alerts", overlay=false)
len = input.int(14, "RSI Length")
ob = input.int(70, "Overbought")
os = input.int(30, "Oversold")
r = ta.rsi(close, len)
plot(r, "RSI", color=#E040FB, linewidth=2)
hline(ob, "OB", color=color.new(#FF5252, 50))
hline(os, "OS", color=color.new(#00E676, 50))
bgcolor(r > ob ? color.new(#FF5252, 90) : na)
bgcolor(r < os ? color.new(#00E676, 90) : na)
alertcondition(ta.crossunder(r, os), "Bull", "RSI bullish on {{ticker}}")
alertcondition(ta.crossover(r, ob), "Bear", "RSI bearish on {{ticker}}")

02EMA Crossover 9/21/50

Triple EMA with golden cross / death cross detection.

▸ Pine v5 · Triple EMA Crossover
//@version=5
indicator("EMA Cross 9/21/50", overlay=true)
e9 = ta.ema(close, 9)
e21 = ta.ema(close, 21)
e50 = ta.ema(close, 50)
plot(e9, "EMA 9", color=#00E676, linewidth=2)
plot(e21, "EMA 21", color=#FFC107, linewidth=2)
plot(e50, "EMA 50", color=#FF5252, linewidth=2)
golden = ta.crossover(e9, e50)
death = ta.crossunder(e9, e50)
plotshape(golden, "Golden", location.belowbar, color=#00E676,
  style=shape.triangleup, size=size.small)
plotshape(death, "Death", location.abovebar, color=#FF5252,
  style=shape.triangledown, size=size.small)
alertcondition(golden, "Golden Cross", "EMA Golden cross on {{ticker}}")
alertcondition(death, "Death Cross", "EMA Death cross on {{ticker}}")

03Bollinger Bands Squeeze

BB with squeeze detection (low volatility before breakout).

▸ Pine v5 · BB Squeeze
//@version=5
indicator("Bollinger Squeeze", overlay=true)
[bbU, bbM, bbL] = ta.bb(close, 20, 2)
width = bbU - bbL
avgWidth = ta.sma(width, 20)
squeeze = width < avgWidth * 0.8
plot(bbU, "Upper", color=#FF5252)
plot(bbM, "Mid", color=color.gray, style=plot.style_circles)
plot(bbL, "Lower", color=#00E676)
bgcolor(squeeze ? color.new(#FFC107, 85) : na, title="Squeeze")
alertcondition(squeeze, "Squeeze Active", "BB squeeze on {{ticker}}")

04ATR Channel Bands

Dynamic support/resistance based on Average True Range.

▸ Pine v5 · ATR Channels
//@version=5
indicator("ATR Channels", overlay=true)
len = input.int(14, "ATR Length")
mult = input.float(2.0, "Multiplier")
basis = ta.sma(close, len)
atr = ta.atr(len)
upper = basis + atr * mult
lower = basis - atr * mult
plot(basis, "Mid", color=color.gray)
plot(upper, "Upper", color=#FF5252, linewidth=2)
plot(lower, "Lower", color=#00E676, linewidth=2)
fill(plot(upper), plot(lower), color=color.new(color.purple, 95))

05Stochastic RSI Smooth

StochRSI for cleaner momentum signals.

▸ Pine v5 · Stoch RSI
//@version=5
indicator("Stoch RSI Smooth", overlay=false)
r = ta.rsi(close, 14)
k = ta.sma(ta.stoch(r, r, r, 14), 3)
d = ta.sma(k, 3)
plot(k, "%K", color=#00E676, linewidth=2)
plot(d, "%D", color=#FF5252, linewidth=2)
hline(80, "OB", color=color.new(#FF5252, 50))
hline(20, "OS", color=color.new(#00E676, 50))
alertcondition(ta.crossover(k, d) and k < 20, "BUY",
  "Stoch RSI bullish cross in oversold")
alertcondition(ta.crossunder(k, d) and k > 80, "SELL",
  "Stoch RSI bearish cross in overbought")

06Auto Pivot Points

Daily pivots automatically drawn (R1/R2/R3, S1/S2/S3).

▸ Pine v5 · Auto Pivots
//@version=5
indicator("Auto Pivots", overlay=true)
pivot_pp = request.security(syminfo.tickerid, "D",
  (high[1] + low[1] + close[1]) / 3)
range_ = request.security(syminfo.tickerid, "D", high[1] - low[1])
r1 = pivot_pp * 2 - request.security(syminfo.tickerid, "D", low[1])
s1 = pivot_pp * 2 - request.security(syminfo.tickerid, "D", high[1])
r2 = pivot_pp + range_
s2 = pivot_pp - range_
plot(pivot_pp, "PP", color=color.yellow, linewidth=2)
plot(r1, "R1", color=#FF5252)
plot(s1, "S1", color=#00E676)
plot(r2, "R2", color=#FF5252, style=plot.style_circles)
plot(s2, "S2", color=#00E676, style=plot.style_circles)

07Heikin Ashi Overlay

Smoothed candle overlay on regular chart.

▸ Pine v5 · Heikin Ashi
//@version=5
indicator("Heikin Ashi Overlay", overlay=true)
haC = (open + high + low + close) / 4
var float haO = open
haO := na(haO[1]) ? (open + close) / 2 : (haO[1] + haC[1]) / 2
haH = math.max(high, math.max(haO, haC))
haL = math.min(low, math.min(haO, haC))
col = haC > haO ? #00E676 : #FF5252
plotcandle(haO, haH, haL, haC, "HA", color=col, wickcolor=col,
  bordercolor=col)

08Volume Spike Detector

Highlights bars with 2x+ average volume.

▸ Pine v5 · Volume Spike
//@version=5
indicator("Volume Spike", overlay=false)
avgVol = ta.sma(volume, 20)
spike = volume > avgVol * 2
col = spike ? (close > open ? #00E676 : #FF5252) : color.gray
plot(volume, "Volume", color=col, style=plot.style_columns)
plot(avgVol, "Avg", color=color.yellow, linewidth=2)
alertcondition(spike, "Volume Spike",
  "Volume 2x average on {{ticker}}")

09VWAP + Deviation Bands

Volume-Weighted Average Price with std-dev bands.

▸ Pine v5 · VWAP Bands
//@version=5
indicator("VWAP Bands", overlay=true)
v = ta.vwap(hlc3)
diff = close - v
stdev = ta.stdev(diff, 20)
upper = v + stdev * 2
lower = v - stdev * 2
plot(v, "VWAP", color=#FFC107, linewidth=2)
plot(upper, "Upper", color=#FF5252)
plot(lower, "Lower", color=#00E676)
fill(plot(upper), plot(lower), color=color.new(color.yellow, 95))

10MTF RSI Dashboard

RSI on 5min, 15min, 1H, 4H, 1D simultaneously — confluence finder.

▸ Pine v5 · MTF RSI Dashboard
//@version=5
indicator("MTF RSI Dashboard", overlay=true)
rsi5 = request.security(syminfo.tickerid, "5", ta.rsi(close, 14))
rsi15 = request.security(syminfo.tickerid, "15", ta.rsi(close, 14))
rsi60 = request.security(syminfo.tickerid, "60", ta.rsi(close, 14))
rsi240 = request.security(syminfo.tickerid, "240", ta.rsi(close, 14))
rsi1D = request.security(syminfo.tickerid, "D", ta.rsi(close, 14))
var table dash = table.new(position.top_right, 2, 6,
  bgcolor=color.new(color.black, 20), border_width=1)
if barstate.islast
    label_col(v) => v > 70 ? #FF5252 : v < 30 ? #00E676 : #FFC107
    table.cell(dash, 0, 0, "TF", text_color=color.white, text_size=size.tiny)
    table.cell(dash, 1, 0, "RSI", text_color=color.white, text_size=size.tiny)
    table.cell(dash, 0, 1, "5m", text_color=color.white, text_size=size.tiny)
    table.cell(dash, 1, 1, str.tostring(rsi5, "#.0"),
      text_color=label_col(rsi5), text_size=size.tiny)
    table.cell(dash, 0, 2, "15m", text_color=color.white, text_size=size.tiny)
    table.cell(dash, 1, 2, str.tostring(rsi15, "#.0"),
      text_color=label_col(rsi15), text_size=size.tiny)
    table.cell(dash, 0, 3, "1h", text_color=color.white, text_size=size.tiny)
    table.cell(dash, 1, 3, str.tostring(rsi60, "#.0"),
      text_color=label_col(rsi60), text_size=size.tiny)
    table.cell(dash, 0, 4, "4h", text_color=color.white, text_size=size.tiny)
    table.cell(dash, 1, 4, str.tostring(rsi240, "#.0"),
      text_color=label_col(rsi240), text_size=size.tiny)
    table.cell(dash, 0, 5, "1D", text_color=color.white, text_size=size.tiny)
    table.cell(dash, 1, 5, str.tostring(rsi1D, "#.0"),
      text_color=label_col(rsi1D), text_size=size.tiny)

Best Combinations

  • Mean reversion (V75): #01 RSI + #03 BB Squeeze + #08 Volume Spike
  • Trend following (forex): #02 EMA Cross + #04 ATR Channels + #07 Heikin Ashi
  • Breakout strategy: #03 BB Squeeze + #04 ATR + #08 Volume Spike
  • MTF confluence: #10 MTF RSI + #07 Heikin Ashi + #06 Auto Pivots
  • Day trading scalp: #09 VWAP + #05 Stoch RSI + #08 Volume Spike

Modify with AI

Any indicator can be customised with prompts like:

  • “Add 4-hour RSI to indicator #01 — show H4 line on M5 chart”
  • “Convert indicator #02 to strategy with 2% sizing and 1:2 RR”
  • “Combine indicators #01 and #04 — only signal when RSI oversold AND price below ATR lower band”

See 5 AI Prompts for more.

🚀 Use these indicators on Deriv (FSCA, free demo $10K):

Open Free Demo Account →

Related Reading

DM

Dan Machado

Founder IA Trader Pro · 100+ indicators tested

⚠️ Disclaimer: Indicators are tools, not predictions. Always backtest and demo-test. Deriv is FSCA-authorised (FSP 50885). Full disclaimer.