PineCoders Squawk Box
3.84K subscribers
60 photos
166 links
News & Tips on TradingView's Pine programming language
Download Telegram
🔈 #news
The Strategy Tester's "List of Trades" tab had a facelift. The typography was improved and you can now click on the "Trade #" heading to change the sorting order of trades.
🔥14👍8🥰3
🌲 #newfeature
A new "About this script..." item in the "More" menu of indicators will bring script users to the page of published scripts, or to the Help Center for built-ins.
29👍12🤩4
🌲 #newfeature
You now have access to a monospace font in labels, boxes and tables with:

text_font_family = font.family_monospace
👍22🔥32
🛠 #fix
There was a problem with scripts using chart.left/right_visible_bar_time where if the indicator's scale was manually adjusted, it reverted to auto-scaling when the chart changed. Expected behavior was restored.
👍9🔥3
🛠 #fix
The ordering of scripts in your user profile's SCRIPTS tab was inadvertently changed a few days ago, which made them appear in latest updated order. The previous order by publication date was restored. Apologies for the inconvenience.
👍123🤔1😢1
🛠 #fix
When a plot style was used and script users changed it in the "Style" tab, and then changed an input value, the plot's style was reset. This no longer happens.
👍13🎉32🔥2👏1
🌲 #newfeature
The formatting of the Editor's console messages was streamlined and timestamps were added to them. Remember that you can click on error messages to bring you to the offending code in your script.
👍17🔥101
🌲 #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)
👍347👌31🤩1
🛠 #fix
math.round_to_mintick() used to return zero when used on na values. It now returns na in those cases.
👍16🍾64👌3👏1🏆1
🌲 #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.
👍29🏆75🔥52🍾2👏1🙏1
🌲 #newfeature
When opening your script in a new window of the Editor, the size of the last-used window is remembered.
174😱3🔥2👍1
🌲 #newfeature
Three new functions were added to access trade comments in strategies:
`strategy.opentrades.entry_comment()`
`strategy.closedtrades.entry_comment()`
`strategy.closedtrades.exit_comment()`
🔥16👍6❤‍🔥3😢32🤯2
🌲 #newfeature
Today we introduce user-defined types and objects to Pine Script:
https://www.tradingview.com/blog/en/pine-script-does-objects-35230/
❤‍🔥28👏12😍9🔥7👍4🍾4🥰3🎉32
🌲 #newfeature
The Editor now has a "Settings" dialog box accessible from the "More" menu. Among other things, it allows you to disable autocomplete.
🙏15👍12🔥74🍾4👏1🤔1🏆1
🌲 #newfeature
Pine Script now supports the equivalent of extension methods. Read about them in the usrman's new page on Pine methods.
🔥19👍1264
🌲 #newfeature
A new `request.currency_rate()` function allows you to retrieve a rate to convert values between currencies.
🔥19👍5👏1
🌲 #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/
🔥2813👍6👏1👌1
🌲 #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.
🔥1973❤‍🔥3👍2😍1