TradingView Pine Script v6 Release

Fact checked by
Mike Christensen, CFOA
March 11, 2026
Everything you need to know about the TradingView Pine Script v6 release, from new features to migration tips and ongoing 2025-2026 updates.

Bottom Line

  • TradingView released Pine Script v6 in November 2024 as the biggest update since v4, introducing enums, dynamic requests, and runtime logging
  • The release includes strict boolean handling that eliminates na booleans and implicit type casting for more reliable scripts
  • Dynamic request functions allow scripts to pull data from different symbols and timeframes inside loops and conditionals for the first time
  • Monthly updates throughout 2025-2026 have added footprint data analysis, bid/ask variables, active inputs, and visual improvements

The TradingView Pine Script v6 release landed in November 20241, and it represents the most significant upgrade to TradingView's scripting language since Pine Script v4 introduced the modern syntax traders use today. Whether you write your own indicators, rely on community scripts, or automate strategies through platforms like TradersPost, this release changes what is possible inside the Pine Editor. In this guide, we cover what Pine Script v6 is, why TradingView built it, the features that matter most to traders and developers, and how to start using it.

Why TradingView Released v6

Pine Script has been evolving steadily since TradingView first introduced it in 2013. Each major version addressed a specific set of limitations that the trading community had outgrown.

  • v1 (2013) introduced the language itself, giving traders a way to write custom indicators directly on TradingView charts
  • v2 (2015) added if statements, replacing awkward ternary-only logic
  • v3 (2017) brought string support and more functions for technical analysis
  • v4 (2019) was a landmark release that reorganized the language into namespaces, added while loops, switch statements, arrays, and user-defined types
  • v5 (2021) added libraries for code reuse, methods, matrices, and maps1

By late 2024, the Pine Script team had accumulated a long list of features that required foundational changes to the language. Booleans could still be na, which caused subtle bugs. Request functions were locked to global scope, limiting how scripts could pull multi-symbol data. There was no built-in way to log debug messages at runtime. And developers had been asking for enumerated types for years.

Rather than patch these issues into v5, TradingView chose to graduate to v6. The result is a release that cleans up long-standing inconsistencies while adding the features that modern trading script development demands. Starting with the v6 release, all future Pine Script updates apply exclusively to v6, meaning existing v5 scripts continue to work but will not receive new capabilities2.

Top Features for Traders

If you use Pine Script indicators or strategies on your charts, these are the v6 features that will have the biggest impact on the tools available to you.

Dynamic Requests

Before v6, every request.security() call had to know its symbol and timeframe at compile time. If you wanted data from five symbols, you needed five separate function calls written out in your code. There was no way to loop through a list of tickers or change the requested symbol based on a condition.

Pine Script v6 changes this completely. All request.*() functions now accept "series" arguments by default, which means the symbol, timeframe, and other parameters can change on every bar2. More importantly, these functions can now be called inside loops, conditional blocks, and even library functions3.

Here is what a dynamic request looks like in practice:

//@version=6
indicator("Multi-symbol RSI", overlay = false)

symbols = array.from("AAPL", "MSFT", "GOOGL")

for i = 0 to symbols.size() - 1
    float rsi = request.security(symbols.get(i), timeframe.period, ta.rsi(close, 14))
    plot(rsi, symbols.get(i))

Why it matters for traders: Indicator developers can now build multi-symbol dashboards, screener-style tools, and rotation strategies that were previously impossible or required clumsy workarounds. If you use community scripts that compare multiple assets, expect those tools to become significantly more powerful.

Enums for Cleaner Settings

Enums, short for enumerations, let script authors define a fixed set of named options4. In v5, if a strategy offered three oscillator choices, the developer had to use string comparisons and hope the user typed the right value. In v6, enums create type-safe dropdown menus automatically.

//@version=6
indicator("Oscillator Selector")

enum OscType
    rsi = "Relative Strength Index"
    mfi = "Money Flow Index"
    cci = "Commodity Channel Index"

OscType oscInput = input.enum(OscType.rsi, "Oscillator type")

calcOsc(float source, simple int length, OscType selection) =>
    switch selection
        OscType.rsi => ta.rsi(source, length)
        OscType.mfi => ta.mfi(source, length)
        OscType.cci => ta.cci(source, length)

plot(calcOsc(close, 14, oscInput))

Why it matters for traders: The settings panel for your indicators and strategies becomes cleaner and less error-prone. Dropdown menus replace free-text fields, and you can no longer accidentally type an invalid option. Script authors can also build more sophisticated configuration UIs without increasing complexity.

Runtime Logging

Debugging Pine Script has historically meant adding plot() or label.new() calls to display intermediate values on the chart. It worked, but it was clumsy and cluttered your visuals.

v6 introduces the log.info(), log.warning(), and log.error() functions3. These send formatted messages to a dedicated Pine Logs pane in the editor, separate from your chart. You can log from any scope, including inside loops, conditionals, and even within requested data contexts.

//@version=6
indicator("Logging Demo", overlay = true)

if barstate.isfirst
    log.info("Script started on {0}", syminfo.tickerid)

if ta.crossover(ta.sma(close, 10), ta.sma(close, 50))
    log.info("Golden cross detected at bar {0}, price {1}", bar_index, close)

Why it matters for traders: If you have ever tried to figure out why a strategy is not entering trades when you expect it to, runtime logging gives you a straightforward way to trace exactly what your script is doing on each bar without polluting your chart with debug plots.

Polyline Drawing

Pine Script v6 includes polyline objects that let scripts draw complex shapes by connecting multiple chart.point coordinates with a single drawing object3. Polylines can be straight or curved, open or closed, and filled with color.

Why it matters for traders: Indicators can now render Zig Zag patterns, channel boundaries, custom chart patterns, and other complex visuals that previously required dozens of individual line objects. The result is cleaner code and more visually polished tools.

Stricter Types Mean Fewer Bugs

Two changes in v6 directly reduce the number of subtle bugs in Pine scripts:

  • Boolean values can no longer be na. In v5, a bool could be true, false, or na, which led to confusing three-state logic. In v6, booleans are strictly true or false2.
  • Integers and floats no longer implicitly cast to booleans. In v5, writing if myFloat would treat any non-zero value as true and zero as false. In v6, you must write an explicit comparison like if myFloat != 02.

Why it matters for traders: Scripts that compile in v6 are more predictable. Conditions behave exactly as written, and the category of bugs caused by ambiguous na-boolean states is eliminated entirely. If a script compiles, its logic is doing what the code says.

Top Features for Developers

If you write Pine Script professionally or maintain libraries, v6 includes several features targeted at you.

Library Improvements

Libraries can now export enums and user-defined types more effectively. Combined with dynamic requests, library authors can build reusable multi-symbol analysis functions that were impossible to distribute before. Libraries can also now contain request.*() calls within their functions when dynamic requests are enabled, which dramatically expands what shared code can accomplish.

Unlimited Scopes

Pine Script v5 limited the depth of nested scopes (if/else blocks, for loops, function calls) to a fixed number2. In v6, this restriction has been removed. Scripts can nest conditional structures, loops, and function calls as deeply as the logic requires without hitting artificial compiler limits1.

Why it matters: Complex strategies with multiple layers of conditions, filters, and position management logic no longer need to be artificially flattened. You can write code that reflects your actual trading logic without workarounds.

Active Inputs

The input.enum() function and other input functions now support an active parameter1. When set to false, the input is grayed out in the settings panel, signaling to the user that it is not currently relevant. For example, a smoothing length input can be deactivated when the user disables smoothing.

//@version=6
indicator("Active Inputs Demo")

bool enableSmoothing = input.bool(true, "Enable smoothing")
int smoothLength = input.int(5, "Smooth length", active = enableSmoothing)

float rsi = ta.rsi(close, 14)
plot(enableSmoothing ? ta.ema(rsi, smoothLength) : rsi)

Why it matters: Professional-quality scripts can now present context-aware settings panels. Inputs that do not apply to the current configuration are visually disabled, reducing confusion and making scripts feel more polished.

What Changed from v5

The v6 migration is not just about new features. Several v5 behaviors have been changed or removed, and some of these changes can break existing scripts. Here is a summary of the most impactful changes:

  • Boolean handling: Booleans can no longer be na. The na(), nz(), and fixnan() functions no longer accept bool arguments2.
  • Implicit casting removed: int and float values no longer implicitly convert to bool. You must use explicit comparisons2.
  • The when parameter removed: All strategy.*() functions that accepted a when parameter no longer support it. Use if blocks instead2.
  • Integer division: Dividing two const int values now returns a fractional result (e.g., 5/2 = 2.5) instead of performing integer division (5/2 = 2)2.
  • Lazy evaluation: The and and or operators now use short-circuit evaluation, skipping the right-hand expression when the result is already determined2.
  • Default margin changed: Strategy default margin is now 100% for both long and short positions, matching real-world trading more closely2.
  • Dynamic requests enabled by default: All request.*() functions execute dynamically in v6. Scripts that relied on non-dynamic behavior may need to set dynamic_requests = false in their declaration2.

The Pine Editor includes an automatic converter that handles many of these changes4. Open your v5 script, and the editor will offer to convert it to v6. In most cases, the converter handles the transition cleanly. For scripts with complex boolean logic or heavy use of the when parameter, you may need to make manual adjustments after conversion.

For a detailed walkthrough of every breaking change and how to fix it, see our companion post on adapting to type system changes in Pine Script v6.

Updates Since Launch

One of the advantages of the v6 release model is that TradingView now ships all new features exclusively to v6. Since the November 2024 launch, updates have arrived nearly every month. Here is a timeline of the most significant additions:

December 2024

The strategy.exit() function received updated calculation behavior1. When a call includes both absolute and relative parameters for the same exit order (for example, both limit and profit), the function now evaluates both and uses the level that the market price is expected to activate first, rather than always ignoring the relative parameter3.

February 2025

TradingView added bid and ask price variables for use on tick-based timeframes1. The bid and ask built-in variables provide real-time Level 1 quote data, available on the "1T" (one tick) timeframe3. This opened the door for scripts that analyze the bid-ask spread and order flow dynamics.

The scope depth limitation was also removed in this period, allowing unlimited nesting of conditional structures, loops, and function calls1.

March-April 2025

New setter functions arrived for box drawings (box.set_xloc()), and the Renko, Point & Figure, and Kagi chart functions gained a percentage-based box sizing option (PercentageLTP)1.

May 2025

The time_close variable was fixed to correctly return values on realtime bars of tick charts and price-based charts, resolving a long-standing issue where it returned na1.

July 2025

Active inputs launched with the active parameter on input functions, allowing script authors to gray out irrelevant settings dynamically1. This was accompanied by broader improvements to how enum inputs display in the settings panel.

September 2025

New plot line styles expanded the visual options for plot() and related functions, giving developers more ways to distinguish between multiple data series on a single chart1.

January 2026

The biggest post-launch addition arrived with request.footprint(), a new function that retrieves volume footprint data for chart bars1. Along with two new data types, footprint and volume_row, this feature enables scripts to analyze buy and sell volume at each price level, identify the Point of Control (POC) and Value Area (VA), and calculate volume deltas3. This is available to Premium and Ultimate plan subscribers.

//@version=6
indicator("Footprint Demo", overlay = true)

int ticksInput = input.int(100, "Ticks per row", minval = 1)
int vaInput = input.int(70, "Value Area %", minval = 1)

footprint fp = request.footprint(ticksInput, vaInput)

if not na(fp)
    float buyVol = fp.buy_volume()
    float sellVol = fp.sell_volume()
    float delta = fp.delta()
    log.info("Bar {0}: Buy={1}, Sell={2}, Delta={3}", bar_index, buyVol, sellVol, delta)

This timeline shows that v6 is not a one-time release but a living platform that receives meaningful updates on a regular cadence. Traders and developers who stay on v6 benefit from each of these additions automatically.

How to Start Using v6

Getting started with Pine Script v6 is straightforward regardless of whether you are writing new code or migrating existing scripts.

New Scripts Default to v6

When you open the Pine Editor on TradingView and create a new script, it automatically starts with //@version=6 at the top4. All new scripts are v6 by default, and you get access to every feature described in this guide without any extra setup.

Converting Existing Scripts

If you have v5 scripts that you want to upgrade, the Pine Editor includes a built-in converter. Open your script, and the editor will display a prompt offering to convert it to v6. The converter handles the majority of changes automatically, including:

  • Replacing the when parameter in strategy functions with if blocks
  • Adjusting boolean expressions that relied on implicit casting
  • Updating na handling for boolean variables
  • Setting the dynamic_requests parameter where needed

After conversion, compile the script and check for any remaining errors. The editor highlights issues and provides error messages that point to the specific line and migration guide section that explains the fix.

Tips for a Smooth Migration

  • Convert scripts one version at a time. If you have a v3 or v4 script, convert to v5 first, then to v6.
  • Test your converted script against v5 output to verify that trading logic and indicator values remain consistent.
  • Pay special attention to any if conditions that used to check numeric values as booleans. These are the most common source of post-conversion issues.
  • Use log.info() to trace execution flow during testing. It is the fastest way to verify that your converted script behaves as expected.

Automating v6 Strategies

Pine Script v6 strategies generate alerts just like their v5 predecessors, which means they integrate seamlessly with TradersPost for automated trade execution5. When your v6 strategy fires a strategy.entry() or strategy.exit() on TradingView, TradersPost receives the alert webhook and routes the order to your connected broker.

Several v6 features make this automation pipeline more powerful:

  • Dynamic requests let you build strategies that rotate between symbols based on momentum, correlation, or other criteria, and TradersPost executes the resulting trades across your brokerage accounts
  • Enums make strategy configuration cleaner, so you can switch between trading modes (aggressive, conservative, scalping) using dropdown inputs and see exactly which mode generated each alert
  • Runtime logging helps you debug why a strategy did or did not fire an alert before you go live, reducing the risk of unexpected trades
  • Stricter types mean fewer logic bugs in your strategy code, which translates directly to more reliable automated execution

TradersPost supports all the major brokers that traders pair with TradingView strategies, including TradeStation, Alpaca, Tradier, Robinhood, and Interactive Brokers for equities, as well as futures brokers like Tradovate and NinjaTrader5. Your v6 strategy sends the same alert payload format, so no changes to your TradersPost configuration are needed when you upgrade a script from v5 to v6.

If you are building a new v6 strategy specifically for automation, take advantage of the improved strategy.exit() behavior that correctly evaluates both absolute and relative exit levels. This gives TradersPost more precise signals for take-profit and stop-loss orders.

Conclusion

The TradingView Pine Script v6 release is more than a version bump. It is a foundational upgrade that fixes long-standing language limitations, adds features that developers have requested for years, and establishes a platform for continuous monthly improvements. Dynamic requests, enums, runtime logging, stricter types, and polyline drawing make v6 the most capable version of Pine Script ever released.

For traders, the practical impact is better indicators, more reliable strategies, and cleaner configuration panels on every script that adopts v6. For developers, it means fewer workarounds, more expressive code, and a growing set of tools like footprint data analysis that continue to arrive with each update.

New scripts already default to v6, and the built-in converter makes migrating existing v5 scripts straightforward. If you have been waiting for a reason to upgrade, the sixteen months of post-launch features since November 2024 have made that case decisively. Start building in v6 today, and pair your strategies with TradersPost to automate execution across your brokerage accounts.

References

1 Pine Script Release Notes
2 Pine Script v5 to v6 Migration Guide
3 Pine Script v6 Language Reference
4 Pine Script User Manual
5 TradersPost - Automated Trading Platform

Ready to automate your trading? Try a free 7-day account:
Try it for free ->