Telegram Web Link
🌲 #newfeature
`str.format_time(time, format, timezone)` allows you to convert a Unix timestamp into a formatted string, while also allowing its translation to a timezone:

//@version=5
indicator("str.format_time")
if timeframe.change("1D")
// Time in exchange tz.
formattedTime1 = str.format_time(time, "yyyy-MM-dd HH:mm", syminfo.timezone)
// Time in UTC tz using `str.format()`.
formattedTime2 = str.format("{0,time,yyyy-MM-dd HH:mm}", time)
// Time in UTC tz using `str.format_time()`.
formattedTime3 = str.format_time(time, "yyyy-MM-dd HH:mm", "UTC")
label.new(bar_index, high, formattedTime1 + "\n" + formattedTime2 + "\n" + formattedTime3)
πŸ›  #fix
math.round_to_mintick() used to return zero when used on na values. It now returns na in those cases.
🌲 #newfeature
The editor now has code snippets to help you with a few common constructs such as if, switch, for and while. More are planned.
🌲 #newfeature
When opening your script in a new window of the Editor, the size of the last-used window is remembered.
🌲 #newfeature
Three new functions were added to access trade comments in strategies:
`strategy.opentrades.entry_comment()`
`strategy.closedtrades.entry_comment()`
`strategy.closedtrades.exit_comment()`
🌲 #newfeature
The Editor now has a "Settings" dialog box accessible from the "More" menu. Among other things, it allows you to disable autocomplete.
🌲 #newfeature
Pine Scriptβ„’ now supports the equivalent of extension methods. Read about them in the usrman's new page on Pine methods.
🌲 #newfeature
A new `request.currency_rate()` function allows you to retrieve a rate to convert values between currencies.
🌲 #newfeature
Use as many external inputs as you want from scripts, as long as they originate from no more than 10 different indicators.
https://www.tradingview.com/blog/en/more-external-inputs-for-scripts-38014/
🌲 #newfeature
The new array.every() and array.some() functions allow you to test if all or some elements of a "bool" array are true. They also work with "int" and "float" arrays.
πŸ’ͺ #tip
The "Strategy" section of the User Manual was vastly expanded. It contains much more details and code examples:
https://www.tradingview.com/pine-script-docs/en/v5/concepts/Strategies.html
🌲 #newfeature
In the Editor, you can now replace the "Add to chart" button with "Update on chart". This allows you to push changes to the chart's version of the script while creating only a minor revision number. Continue to use "Save" when you want to create a major revision.
🌲 #newfeature
A new disable_alert parameter in strategy.*() functions issuing orders allows you to prevent selective orders from triggering alerts.
🌲 #newfeature
A new fill_orders_on_standard_ohlc parameter for the strategy() declaration statement allows strategies running on Heikin Ashi charts to fill orders using the market's OHLC values instead of the synthetic HA prices. The setting can also be changed in the strategy's "Properties" tab.
🌲 #newfeature
Three new syminfo.* variables were added: syminfo.sector, syminfo.industry, syminfo.country.
πŸ’ͺ #tip
Better late than never ) We added a usrman page on matrices:
https://www.tradingview.com/pine-script-docs/en/v5/language/Matrices.html
🌲 #newfeature
The "More" menu of scripts using interactive inputs now contains a "Reset points..." item that restarts the selection process of the interactive inputs without having to reload the script on the chart.
🌲 #newfeature
The Reference Manual was reorganized in more meaningful sections, which you can see in its left navigation pane. Also, items in each section are now ordered alphabetically.
2025/06/29 11:16:37
Back to Top
HTML Embed Code: