
Pine Script v6 is the biggest update to TradingView's scripting language in years, and it has generated a lot of questions from traders and developers. Whether you are deciding if it is time to upgrade, troubleshooting a conversion error, or trying to understand what the new features actually do, this FAQ covers the 20 most common questions we hear about Pine Script v6.
Each answer is kept concise so you can quickly find what you need. For deeper coverage of any topic, follow the links to our dedicated guides.
Pine Script v6 was released on November 13, 20241. TradingView announced the update alongside a detailed migration guide and release notes2. Since the launch, TradingView has shipped monthly updates throughout 2025 adding features like footprint requests, dynamic for loops, active inputs, bid/ask variables, and plot linestyles to the v6 platform1.
No, upgrading is optional. Your existing v5 scripts will continue to compile and run on TradingView exactly as they do today4. However, all new scripts created in the Pine Editor default to v6, and any new language features released after November 2024 are only available in v61. If you want access to dynamic requests, enums, footprint data, or runtime logging, you need to be on v6.
TradingView has not announced any plan to deprecate or disable Pine Script v5. Historically, TradingView has maintained backward compatibility across versions, and scripts written in v3 and v4 still run today. You can expect v5 scripts to continue working for the foreseeable future, though they will not receive new features.
The single most impactful change is dynamic requests. In v5, request.security() and other request.*() functions required compile-time constant arguments and could not be placed inside loops or conditionals2. In v6, these functions accept series string arguments by default, enabling multi-symbol scanning inside loops, conditional data fetching, and library-exported request functions1. This single change unlocks entire categories of strategies that were impossible before.
Open your script in the Pine Editor, click the "Manage script" dropdown menu, and select "Convert code to v6." The script must compile successfully in v5 before conversion4. The auto-converter handles common changes like removing the when parameter, fixing duplicate function parameters, and adding basic bool() casts2. After conversion, compile the result and fix any remaining errors manually. See our Pine Script v6 breaking changes guide for the full list of issues to check.
Enums (enumerations) are a new data type in v6 that define a fixed set of named values1. Instead of using input.string() with an array of options, you declare an enum with specific members and use input.enum() to create type-safe dropdown menus3. The compiler catches invalid values at compile time, eliminating an entire class of bugs caused by string typos. See our complete enums guide for detailed examples.
Pine Script v6 makes two major changes to boolean behavior. First, booleans can no longer hold na. They are strictly true or false, and functions like na(), nz(), and fixnan() no longer accept bool arguments2. Second, implicit casting from int and float to bool is removed2. Code like if bar_index must become if bar_index != 0. If your logic requires a third state, replace the bool with an int variable using values like -1, 0, and 1.
In v5, integer and float values were implicitly cast to boolean in conditional contexts. Zero and na evaluated to false, and any nonzero value evaluated to true. V6 removes this implicit casting entirely2. You must use an explicit comparison like if myInt != 0 or wrap the value with bool(myInt)3. The auto-converter handles many of these cases, but review every conditional that tests a numeric value directly.
In v6, the and and or operators use short-circuit (lazy) evaluation2. If the left side of and is false, the right side is never executed. If the left side of or is true, the right side is skipped. This is dangerous when the right side contains a ta.* function that depends on being called every bar to maintain its internal history. The fix is to extract the function call to a global-scope variable before using it in the conditional.
Yes. In v6, all request.*() functions accept series string arguments by default1. You can pass a variable that changes value on each bar as the symbol or timeframe argument. You can also call request.security() inside for loops, if blocks, and exported library functions3. Scripts are limited to 40 dynamic request calls per execution cycle (64 on Ultimate plans)1. If you need v5 behavior for any reason, add dynamic_requests = false to your declaration.
The when parameter was deprecated in v5 and is fully removed in v62. It previously appeared in strategy.entry(), strategy.order(), strategy.exit(), strategy.close(), strategy.close_all(), strategy.cancel(), and strategy.cancel_all()3. Replace every when = condition with a wrapping if condition block. The auto-converter handles this change automatically in most cases.
In v5, dividing two const int values used integer division: 1 / 2 returned 0 and 5 / 2 returned 2. In v6, all integer division returns the fractional result: 1 / 2 returns 0.5 and 5 / 2 returns 2.52. This change produces no compilation error, making it one of the most dangerous v6 changes because it silently alters calculations. Wrap any division where you need the old truncated result with int() or use math.floor()3. See our dedicated integer division deep dive for affected patterns.
Pine Script v6 adds three logging functions: log.info(), log.warning(), and log.error()3. These send messages to the Pine Logs pane in TradingView, replacing the old workaround of using plot() or label.new() to inspect values at runtime. Log messages support string formatting, filtering by severity level, and include timestamps1. This makes debugging strategies and indicators dramatically faster and cleaner.
Polylines are a drawing type introduced in v6 that allow you to draw connected sequences of straight and curved line segments on the chart1. Unlike line.new(), which draws a single line between two points, polylines connect multiple points in a single drawing object. They support filled regions, curve interpolation, and can be used to create custom chart shapes like channels, zones, or complex pattern visualizations that would have required dozens of individual line objects in v53.
The request.footprint() function, added in January 2026, provides native access to volume footprint data in Pine Script1. It returns a footprint object containing volume distribution data across price levels for each bar, including the Point of Control (POC), Value Area High/Low, buy and sell volume per row, and volume imbalances3. This feature requires a TradingView Premium or Ultimate plan. See our footprint requests guide for detailed examples.
No. Pine Script v6 itself is available on all TradingView plans, including the free tier4. However, certain features introduced after the v6 launch have plan requirements. The request.footprint() function requires Premium or Ultimate1. The bid and ask variables require access to tick charts, which is available on paid plans. The number of dynamic request calls is also plan-dependent: 40 on most paid plans, 64 on Ultimate1.
Yes. Pine Script v6 scripts can import and use libraries written in v54. The library functions work as expected. However, the reverse is not true: v5 scripts cannot import v6 libraries. If you maintain a library that other developers depend on, consider keeping a v5-compatible version available until the community has widely adopted v6.
Dynamic requests have a per-execution call limit. On most paid TradingView plans, a script can execute up to 40 request.*() calls per bar1. Ultimate plans allow up to 64. Each unique call inside a loop iteration or conditional branch counts against this limit. If your script exceeds the limit, TradingView raises a runtime error. Plan your loops accordingly and use early exits with break to stay within bounds.
Yes. TradersPost works with TradingView webhook alerts from both v5 and v6 strategies5. The webhook payload format is identical regardless of Pine Script version. You create alerts on your v6 strategy in TradingView, configure the webhook URL to point to TradersPost, and TradersPost routes the orders to your connected broker5. All v6 features like dynamic requests, enums, and footprint analysis can generate signals that TradersPost executes automatically across stocks, options, futures, and crypto.
Start with TradingView's official Pine Script v6 reference manual and the v5-to-v6 migration guide. For practical guides focused on specific features and trading applications, explore our Pine Script v6 series:
Here is a summary of the key facts covered in this FAQ:
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