BeeHolder

Performance Table

This indicator is based on the Performance section in the TradingView's sidebar and uses new Pine tables functionality. It compares the current price of the symbol to its past price and calculates the rate of return to make it easier to track the performance of the symbol. Note that the Performance sidebar is not updated in real-time, while this indicator is, so on real-time charts the values between the two can differ (the indicator's values are more recent).

The formula of the calculation is (Current value - Past value) * 100 / Past value, where Past value is:
  • 1W - close 5 daily bars ago
  • 1M - close 21 daily bars ago
  • 3M - close 63 daily bars ago
  • 6M - close 126 daily bars ago
  • YTD - close of the past year
  • 1Y - close 251 daily bars ago
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Comments

500 coins
+4 Reply
500 coins
+1 Reply
Toss a coin to your tables
100 coins
+1 Reply
I love this, although I wish I could get lower time frames for intraday trading. Any advice on how to code for 4H, 1H, 15Min time frames?
100 coins
Reply
one suggestion to made it applicable for 7/24 open markets, such as crypto

crypto = syminfo.type == "crypto" or syminfo.type == "bitcoin"

if barstate.islast
    f_fillCell(perfTable, 0, 0, f_performance(crypto ? 7 : 5), "1W")
    f_fillCell(perfTable, 1, 0, f_performance(crypto ? 30 : 21), "1M")
    f_fillCell(perfTable, 2, 0, f_performance(crypto ? 91 : 63), "3M")
    f_fillCell(perfTable, 0, 1, f_performance(crypto ? 182 : 126), "6M")
    f_fillCell(perfTable, 1, 1, f_rateOfreturn(close, lastYearClose), "YTD")
    f_fillCell(perfTable, 2, 1, f_performance(crypto ? 365 : 251), "1Y")
+3 Reply
@dgtrd, This helped, thanks man
+1 Reply
Hello, Thanks for this indicator, just wanted to ask two things.
Is it possible to see "52 Week" High / Low stock price?
And "All Time" High / Low stock price?
+2 Reply
This publication is now featured in our Editors' Picks: https://www.tradingview.com/scripts/editors-picks/ .
In the name of all TradingViewers, thank you for your valuable contribution to the community, and congrats!
+2 Reply
BeeHolder PineCoders
@PineCoders, thanks!
+1 Reply
WHAT?!! this is the greatest thing ever! how does tradingview not have something like baked in already. Really good job
+1 Reply