🌟 Library Cluster

10 Pine Script Indicators TradingView Ready 2026

Bởi Dan Machado · 14 phút đọc · Tất cả ready copy-paste

Library 10 Pine Script v5 indicators essential, tất cả ready copy-paste vào TradingView. Từ momentum đến volatility, trend đến volume — bộ này cover hầu hết technical analysis needs. Mỗi indicator concise, optimized, và tested.

📋 Mục Lục

  1. 1 RSI Alerts — Momentum oversold/overbought
  2. 2 EMA Crossover 9/21/50 — Trend
  3. 3 Bollinger Bands Squeeze — Volatility
  4. 4 Volume Spike Detector — Volume
  5. 5 ATR Channel Bands — Volatility
  6. 6 Stochastic RSI Smooth — Momentum
  7. 7 Auto Pivot Points — Levels
  8. 8 Heikin Ashi Trend — Trend
  9. 9 VWAP + Bands — Volume/Levels
  10. 10 MTF RSI Dashboard — Multi-Timeframe
1

RSI Alerts

Momentum

RSI với background highlight và alerts khi oversold/overbought.

▸ Pine v5 · RSI Alerts COPY ↗
//@version=5
indicator("RSI Alerts — IA Trader Pro")
len = input.int(14, "RSI Length")
rsi = ta.rsi(close, len)
plot(rsi, "RSI", color=#FFC107, linewidth=2)
hline(70, "Overbought", color=color.new(#FF5252, 50))
hline(30, "Oversold", color=color.new(#00E676, 50))
hline(50, "Mid", color=color.new(color.gray, 70), linestyle=hline.style_dotted)
bgcolor(rsi > 70 ? color.new(#FF5252, 90) : rsi < 30 ? color.new(#00E676, 90) : na)
alertcondition(ta.crossunder(rsi, 30), "RSI Oversold", "RSI below 30")
alertcondition(ta.crossover(rsi, 70), "RSI Overbought", "RSI above 70")
2

EMA Crossover 9/21/50

Trend

Triple EMA với crossover signals và trend coloring.

▸ Pine v5 · EMA Crossover COPY ↗
//@version=5
indicator("EMA Crossover 9/21/50 — IA Trader Pro", overlay=true)
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
ema50 = ta.ema(close, 50)
plot(ema9, "EMA 9", color=#00E676, linewidth=1)
plot(ema21, "EMA 21", color=#FFC107, linewidth=2)
plot(ema50, "EMA 50", color=#FF5252, linewidth=2)
bullCross = ta.crossover(ema9, ema21)
bearCross = ta.crossunder(ema9, ema21)
plotshape(bullCross, "Bull Cross", location.belowbar, #00E676, shape.triangleup, size=size.small)
plotshape(bearCross, "Bear Cross", location.abovebar, #FF5252, shape.triangledown, size=size.small)
alertcondition(bullCross, "EMA Bull Cross", "EMA 9 crossed above EMA 21")
alertcondition(bearCross, "EMA Bear Cross", "EMA 9 crossed below EMA 21")
3

Bollinger Bands Squeeze

Volatility

Bollinger Bands với squeeze detection (low volatility = breakout coming).

▸ Pine v5 · BB Squeeze COPY ↗
//@version=5
indicator("Bollinger Bands Squeeze — IA Trader Pro", overlay=true)
len = input.int(20, "Length")
mult = input.float(2.0, "StdDev", step=0.1)
basis = ta.sma(close, len)
dev = mult * ta.stdev(close, len)
upper = basis + dev
lower = basis - dev
bandWidth = (upper - lower) / basis
avgWidth = ta.sma(bandWidth, 50)
squeeze = bandWidth < avgWidth * 0.7
p1 = plot(upper, "Upper", color=color.new(#FF5252, 40))
p2 = plot(lower, "Lower", color=color.new(#00E676, 40))
plot(basis, "Basis", color=color.new(#FFC107, 0))
fill(p1, p2, color=squeeze ? color.new(#E040FB, 85) : color.new(color.blue, 95))
bgcolor(squeeze ? color.new(#E040FB, 90) : na, title="Squeeze")
alertcondition(squeeze and not squeeze[1], "BB Squeeze", "Volatility squeeze — breakout likely")
4

Volume Spike Detector

Volume

Highlight volume spikes (volume > 2x average) — institutional activity.

▸ Pine v5 · Volume Spike COPY ↗
//@version=5
indicator("Volume Spike Detector — IA Trader Pro")
len = input.int(20, "Volume MA Length")
mult = input.float(2.0, "Spike Multiplier", step=0.1)
volMa = ta.sma(volume, len)
spike = volume > volMa * mult
volColor = spike ? (close > open ? #00E676 : #FF5252) : color.new(color.gray, 50)
plot(volume, "Volume", color=volColor, style=plot.style_columns)
plot(volMa, "Volume MA", color=#FFC107, linewidth=2)
plotshape(spike, "Spike", location.top, #E040FB, shape.diamond, size=size.tiny)
alertcondition(spike, "Volume Spike", "Volume spike detected — 2x average")
5

ATR Channel Bands

Volatility

Dynamic channel dựa trên ATR — adaptive support/resistance.

▸ Pine v5 · ATR Channel COPY ↗
//@version=5
indicator("ATR Channel Bands — IA Trader Pro", overlay=true)
atrLen = input.int(14, "ATR Length")
mult = input.float(2.0, "ATR Multiplier", step=0.1)
maLen = input.int(20, "MA Length")
basis = ta.ema(close, maLen)
atr = ta.atr(atrLen)
upper = basis + atr * mult
lower = basis - atr * mult
plot(basis, "Basis", color=#FFC107, linewidth=2)
p1 = plot(upper, "Upper", color=color.new(#FF5252, 30))
p2 = plot(lower, "Lower", color=color.new(#00E676, 30))
fill(p1, p2, color=color.new(color.blue, 95))
alertcondition(ta.crossover(close, upper), "Break Upper", "Price broke ATR upper band")
alertcondition(ta.crossunder(close, lower), "Break Lower", "Price broke ATR lower band")
6

Stochastic RSI Smooth

Momentum

Stochastic RSI smoothed — momentum oscillator combo.

▸ Pine v5 · Stoch RSI COPY ↗
//@version=5
indicator("Stochastic RSI Smooth — IA Trader Pro")
rsiLen = input.int(14, "RSI Length")
stochLen = input.int(14, "Stoch Length")
smoothK = input.int(3, "Smooth K")
smoothD = input.int(3, "Smooth D")
rsi = ta.rsi(close, rsiLen)
k = ta.sma(ta.stoch(rsi, rsi, rsi, stochLen), smoothK)
d = ta.sma(k, smoothD)
plot(k, "K", color=#00E676, linewidth=2)
plot(d, "D", color=#FF5252, linewidth=2)
hline(80, "Overbought", color=color.new(#FF5252, 50))
hline(20, "Oversold", color=color.new(#00E676, 50))
bgcolor(k > 80 ? color.new(#FF5252, 92) : k < 20 ? color.new(#00E676, 92) : na)
alertcondition(ta.crossover(k, d) and k < 20, "Stoch Buy", "Stoch RSI bullish cross in oversold")
alertcondition(ta.crossunder(k, d) and k > 80, "Stoch Sell", "Stoch RSI bearish cross in overbought")
7

Auto Pivot Points

Levels

Daily pivot points tự động với S1/S2/R1/R2 levels.

▸ Pine v5 · Auto Pivots COPY ↗
//@version=5
indicator("Auto Pivot Points — IA Trader Pro", overlay=true)
prevHigh = request.security(syminfo.tickerid, "D", high[1])
prevLow = request.security(syminfo.tickerid, "D", low[1])
prevClose = request.security(syminfo.tickerid, "D", close[1])
pivot = (prevHigh + prevLow + prevClose) / 3
r1 = 2 * pivot - prevLow
s1 = 2 * pivot - prevHigh
r2 = pivot + (prevHigh - prevLow)
s2 = pivot - (prevHigh - prevLow)
plot(pivot, "Pivot", color=#FFC107, linewidth=2, style=plot.style_stepline)
plot(r1, "R1", color=color.new(#FF5252, 30), style=plot.style_stepline)
plot(r2, "R2", color=color.new(#FF5252, 50), style=plot.style_stepline)
plot(s1, "S1", color=color.new(#00E676, 30), style=plot.style_stepline)
plot(s2, "S2", color=color.new(#00E676, 50), style=plot.style_stepline)
8

Heikin Ashi Trend

Trend

Heikin Ashi candles overlay — smoother trend visualization.

▸ Pine v5 · Heikin Ashi Trend COPY ↗
//@version=5
indicator("Heikin Ashi Trend — IA Trader Pro", overlay=true)
haClose = (open + high + low + close) / 4
var float haOpen = na
haOpen := na(haOpen[1]) ? (open + close) / 2 : (haOpen[1] + haClose[1]) / 2
haHigh = math.max(high, math.max(haOpen, haClose))
haLow = math.min(low, math.min(haOpen, haClose))
haColor = haClose > haOpen ? #00E676 : #FF5252
plotcandle(haOpen, haHigh, haLow, haClose, "Heikin Ashi", color=haColor, wickcolor=haColor)
trendUp = haClose > haOpen and haClose[1] > haOpen[1]
trendDown = haClose < haOpen and haClose[1] < haOpen[1]
bgcolor(trendUp ? color.new(#00E676, 93) : trendDown ? color.new(#FF5252, 93) : na)
9

VWAP + Bands

Volume/Levels

Volume Weighted Average Price với standard deviation bands.

▸ Pine v5 · VWAP + Bands COPY ↗
//@version=5
indicator("VWAP + Bands — IA Trader Pro", overlay=true)
mult = input.float(1.0, "Band Multiplier", step=0.1)
vwapValue = ta.vwap(hlc3)
diff = hlc3 - vwapValue
dev = math.sqrt(ta.sma(diff * diff, 20))
upper = vwapValue + dev * mult
lower = vwapValue - dev * mult
plot(vwapValue, "VWAP", color=#FFC107, linewidth=2)
p1 = plot(upper, "Upper Band", color=color.new(#FF5252, 40))
p2 = plot(lower, "Lower Band", color=color.new(#00E676, 40))
fill(p1, p2, color=color.new(color.blue, 95))
alertcondition(ta.crossover(close, vwapValue), "Cross Above VWAP", "Price above VWAP — bullish")
alertcondition(ta.crossunder(close, vwapValue), "Cross Below VWAP", "Price below VWAP — bearish")
10

MTF RSI Dashboard

Multi-Timeframe

RSI từ 5 timeframes trong 1 dashboard table — multi-timeframe confluence.

▸ Pine v5 · MTF RSI Dashboard COPY ↗
//@version=5
indicator("MTF RSI Dashboard — IA Trader Pro", overlay=true)
rsiLen = input.int(14, "RSI Length")
getRsi(tf) => request.security(syminfo.tickerid, tf, ta.rsi(close, rsiLen))
rsi_5  = getRsi("5")
rsi_15 = getRsi("15")
rsi_60 = getRsi("60")
rsi_240 = getRsi("240")
rsi_D = getRsi("D")
rsiCol(v) => v > 70 ? #FF5252 : v < 30 ? #00E676 : v > 50 ? #80E0A0 : #FFA080
rsiTxt(v) => v > 70 ? "OB" : v < 30 ? "OS" : v > 50 ? "Bull" : "Bear"
var table dash = table.new(position.top_right, 3, 6,
  bgcolor=color.new(color.black, 20), border_width=1, border_color=color.gray)
if barstate.islast
    table.cell(dash, 0, 0, "TF", text_color=color.white, text_size=size.tiny, bgcolor=color.new(#FFC107, 30))
    table.cell(dash, 1, 0, "RSI", text_color=color.white, text_size=size.tiny, bgcolor=color.new(#FFC107, 30))
    table.cell(dash, 2, 0, "STATUS", text_color=color.white, text_size=size.tiny, bgcolor=color.new(#FFC107, 30))
    tfs = array.from("5m", "15m", "1H", "4H", "1D")
    vals = array.from(rsi_5, rsi_15, rsi_60, rsi_240, rsi_D)
    for i = 0 to 4
        v = array.get(vals, i)
        table.cell(dash, 0, i + 1, array.get(tfs, i), text_color=color.white, text_size=size.tiny)
        table.cell(dash, 1, i + 1, str.tostring(v, "#"), text_color=rsiCol(v), text_size=size.tiny)
        table.cell(dash, 2, i + 1, rsiTxt(v), text_color=rsiCol(v), text_size=size.tiny)

Cách Sử Dụng Library

  1. Mở TradingView, chọn asset
  2. Click “Pine Editor”
  3. Copy code indicator bạn muốn
  4. Paste, save (Ctrl+S), đặt tên
  5. Click “Add to chart”
  6. Repeat cho indicators khác (max 3 trên free tier)

💡 Combine Strategies

Trend following: #2 EMA Crossover + #8 Heikin Ashi + #5 ATR Channel
Mean reversion: #1 RSI + #3 BB Squeeze + #6 Stoch RSI
Breakout: #3 BB Squeeze + #4 Volume Spike + #7 Pivot Points
Multi-timeframe: #10 MTF Dashboard + bất kỳ entry indicator nào

Customize với AI

Mọi indicator có thể modify với ChatGPT/Claude:

  • “Add alerts cho indicator [paste code]”
  • “Convert sang strategy script cho backtest”
  • “Combine indicator #1 và #3 thành single script”
  • “Add multi-timeframe version của indicator này”

Detail: ChatGPT & Claude cho Indicators.

⚠️ Reminder

Indicators là tools, không phải crystal balls. Tất cả có 30-40% false signals. Backtest trước khi pakai live, combine multiple cho confluence, và luôn pakai risk management.

🚀 Test 10 indicators trên Deriv V75 demo (chart 24/7):

Mở Demo Deriv Miễn Phí

Bài Liên Quan

DM

Dan Machado

Founder IA Trader Pro · 100+ Pine Scripts published

⚠️ Disclaimer: Indicators không guarantee profit. Backtest trước live. Deriv không được cấp phép bởi SBV. Bài viết này có chứa affiliate link Deriv. Disclaimer đầy đủ.