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

QuestionPine Script v5Pine Script v6
Best for new scripts?Only if you maintain an older codebaseYes, use v6 for new work
Existing scriptsCan keep runningConvert when you need new features or cleaner behavior
Boolean behaviorMore permissiveStricter boolean rules
Conditional performanceOlder evaluation behaviorLazy evaluation for and/or conditions
request.*() functionsMore limited patternsDynamic requests are supported

Do this before converting

  1. Save the current working script as a backup.
  2. Run TradingView's v6 converter from Pine Editor.
  3. Fix any compiler errors manually instead of forcing quick patches.
  4. Retest repaint behavior, alerts, MTF requests, and strategy orders.
  5. 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.