Telegram Web Link
๐ŸŒฒ #newfeature
Six new chart.is_* built-in variables help us detect the chart type used.
๐ŸŒฒ #newfeature
Variance, standard deviation and covariance built-in functions now have a biased parameter. Its default true value continues to use estimates of the population. When false is used, estimates of the sample can now be used instead.
๐Ÿ›  #fix
math.round(na) used to return zero instead of na, contrary to how other built-ins behave. This has been fixed. math.round(na) now returns na. If needed, you can still reproduce the previous behavior with nz(math.round(x)).
๐ŸŒฒ #newfeature
You can now extract the exchange or symbol part from any string in the "exchange:symbol" format using syminfo.prefix(string) and syminfo.ticker(string):

//@version=5
indicator("")
symbolInput = input.symbol("FX:USDCAD")
exchangeName = syminfo.prefix(symbolInput)
symbolName = syminfo.ticker(symbolInput)
ticker = ticker.new(exchangeName, symbolName, session.extended)
symbolClose = request.security(ticker, "1D", close)
plot(symbolClose)
if barstate.islastconfirmedhistory
label.new(bar_index, symbolClose, exchangeName + ":" + symbolName)
๐ŸŒฒ #newfeature
The risk_free_rate parameter was added to strategy(). It allows you to specify the reference rate of return used to calculate Sharpe and Sortino ratios:
https://www.tradingview.com/pine-script-reference/v5/#fun_strategy
๐ŸŒฒ #newfeature
Premium accounts can now get more accurate strategy fills on their orders with the new Bar Magnifier feature. Keep in mind that more realistic fills do not necessarily produce more profits:
https://www.tradingview.com/blog/en/accurate-backtesting-with-bar-magnifier-31746/
๐ŸŒฒ #newfeature
A new `request.security_lower_tf()` function makes it much easier to access information from intrabars, which are bars at a lower timeframe than the chart's. It returns an array containing one value per intrabar:
https://www.tradingview.com/blog/en/request-more-data-from-your-scripts-31944/
๐ŸŒฒ #newfeature
A new `request.economic()` function provides scripts with access to economic data from different regions and sectors:
https://www.tradingview.com/blog/en/request-more-data-from-your-scripts-31944/
๐ŸŒฒ #newfeature
A new syminfo.volumetype variable was added, which can help distinguish between base, quote and tick volumes on feeds for which the data vendor makes that information available. See it in use in the most recent "24-hour Volume" built-in indicator:
https://www.tradingview.com/blog/en/new-built-in-indicator-24-hour-volume-31718/
๐ŸŒฒ #newfeature
Six new parameters for `strategy.exit()` now allow you to generate different comments and alert messages depending on whether the order was triggered by a take profit, a stop loss or a trailing stop.
๐ŸŒฒ #newfeature
A new chart.bg_color variable returns the color of the chart's background. Another one, chart.fg_color, returns a color producing optimal contrast with that background.
๐ŸŒฒ #newfeature
To complement the recently introduced chart.is_* variables, a new `chart.is_standard` variable detects when a standard chart type is used. Standard chart types are ones where the close is not synthetic, so bars, candles, hollow candles, line, area or baseline.
๐ŸŒฒ #newfeature
A new `currency.USDT` constant was added for Tether.
๐ŸŒฒ #newfeature
`ta.change()` can now be called with a "bool" variable to detect state changes. You can now write:

//@version=5
indicator("", "", true)
bool upBar = close > open
bool directionChange = ta.change(upBar)
plotchar(directionChange, "directionChange", "โ€ข", location.top, size = size.tiny)
๐ŸŒฒ #newfeature
The historical states of arrays and matrices can now be referenced with the `[]` operator. In the example below, we reference the historic state of a matrix 10 bars ago:

//@version=5
indicator("")
m = matrix.new<float>(1, 1, close)
float x = na
if bar_index > 10
x := matrix.get(m[10], 0, 0)
plot(x)
๐ŸŒฒ #newfeature
10 second charts are now available. timeframe.period will return "10S" on them, as expected.
๐Ÿ’ช #tip
You can access the Pine Scriptโ„ข Editor from anywhere, including on phones, by using this link:
https://www.tradingview.com/pine/
๐ŸŒฒ #newfeature
You can now use timeframe.change("D") instead of ta.change(time("D")):
https://www.tradingview.com/pine-script-reference/v5/#fun_timeframe{dot}change
๐ŸŒฒ #newfeature
ta.vwap() now allows you to specify an anchor timeframe, and it can return stdev bands:
https://www.tradingview.com/pine-script-reference/v5/#fun_ta{dot}vwap
๐ŸŒฒ #newfeature
A new ta.pivot_point_levels() function calculates pivot levels using different types of calcs that reset on a condition you specify:
https://www.tradingview.com/pine-script-reference/v5/#fun_ta{dot}pivot_point_levels
2025/06/30 13:56:21
Back to Top
HTML Embed Code: