Turbo boost your scripts with our Pine Profiler

May 20

Ever wonder which parts of your script take the longest to execute? Our new Profiler reveals what’s going on behind the scenes by showing you how much time the Pine Script️™ runtime spends on each part of your code. Using the Profiler’s information, you can now optimize the slowest sections of code so your scripts load faster on new charts.

Activate the Profiler from the Pine Editor by using “Enable profiler mode” from the “Add/Update” dropdown menu:

The Profiler’s information appears in the left margin of the script’s code:

The percentage values indicate the portion each part of the code accounts for relative to the script’s total execution time. They can cover one or multiple lines. The most significant values are bold. Hovering over values brings up a tooltip showing more information about each value.

The flame icon at the bottom left of the margin represents up to three of the most performance-intensive code segments in the script. Clicking the icon moves you to those segments. Because they are the most significant bottlenecks in your script, they are also the ones where there is the most opportunity to improve its performance.

The new Profiling and optimization page of the User Manual provides much more information on how to use the Profiler to your advantage. If you intend to use the Profiler, be sure to have a look at it.

To stay up to date on new Pine Script® features, keep an eye on the User Manual’s Release notes. The PineCoders account also broadcasts updates from its Squawk Box on Telegram, its Twitter account, and from the Pine Script™ Q&A public chat on TradingView.

We hope you find this highly-requested feature as useful as we think it’ll be, and please do keep sending us your feedback and suggestions so we can make the platform the best it can be. We build TradingView for you, and we’re always keen to hear your thoughts.

— Team TradingView

Look first Then leap

TradingView is built for you, so make sure you're getting the most of our awesome features
Launch Chart