Pine Script version guide
Pine Script latest version in 2026: v6 explained
A direct answer for traders and developers seeing v5, v6, migration warnings, and older scripts inside TradingView.
Direct answer
- The latest major Pine Script version in 2026 is Pine Script v6.
- TradingView announced Pine Script v6 on December 10, 2024.
- You do not have to rewrite every v5 script immediately, but new work should normally start in v6.
v6 vs v5 quick comparison
| Question | Pine Script v5 | Pine Script v6 |
|---|---|---|
| Best for new scripts? | Only if you maintain an older codebase | Yes, use v6 for new work |
| Existing scripts | Can keep running | Convert when you need new features or cleaner behavior |
| Boolean behavior | More permissive | Stricter boolean rules |
| Conditional performance | Older evaluation behavior | Lazy evaluation for and/or conditions |
| request.*() functions | More limited patterns | Dynamic requests are supported |
Do this before converting
- Save the current working script as a backup.
- Run TradingView's v6 converter from Pine Editor.
- Fix any compiler errors manually instead of forcing quick patches.
- Retest repaint behavior, alerts, MTF requests, and strategy orders.
- Compare old and new plots on the same symbol and timeframe.
Minimal Pine Script v6 example
//@version=6
indicator("Pine Script v6 trend example", overlay=true)
fast = ta.ema(close, 9)
slow = ta.ema(close, 21)
plot(fast, "Fast EMA", color=color.teal)
plot(slow, "Slow EMA", color=color.orange)
buySignal = ta.crossover(fast, slow)
sellSignal = ta.crossunder(fast, slow)
plotshape(buySignal, title="Buy", style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell", style=shape.labeldown, text="SELL")Pine Script latest version FAQ
What is the latest Pine Script version in 2026?
Pine Script v6 is the latest major version shown in TradingView's current user manual.
Is Pine Script v6 available in TradingView?
Yes. TradingView announced Pine Script v6 on December 10, 2024, and the current docs are built around v6.
Do I need to rewrite v5 scripts?
No. Existing v5 scripts can continue to work. Convert when you want v6 features, stricter behavior, or long-term maintainability.
What should I test after converting?
Test alerts, repainting, MTF data, strategy fills, position sizing, input defaults, and every broker webhook payload.