Skip to content
All library documents

Monthly Strategy Returns and Risk Statistics in a TradingView Table

Article TradingView scripts

Summary

This Pine Script block adds a configurable table of monthly and yearly strategy performance to an existing TradingView strategy. It records equity at period boundaries and reports returns as percentages, changes in account currency, or both. Optional columns compare results with a buy-and-hold curve for the chart symbol, and display settings include year limits, themes, highlights, and relative cell coloring.

The table can also summarize whole-period performance with compound annual growth rate, maximum drawdown, MAR ratio, trade count, win rate, and profit factor. It tracks drawdown on each bar and allows annualized returns for periods shorter than a year to be hidden by default. The code includes a simple RSI demo signal only to make the standalone script run; it is not offered as a strategy recommendation. This is a reporting utility, not evidence of trading performance. The buy-and-hold comparison excludes commissions and slippage, and results depend on the host strategy, chart data, and backtest settings.

Key ideas

  • The table calculates monthly and yearly returns from strategy equity at period boundaries.
  • Users can view returns in percentage terms, account currency, or both.
  • An optional buy-and-hold column compares the strategy with the chart symbol over matching periods.
  • The summary row reports several performance and risk measures, including drawdown and trade statistics.
  • The included RSI signal is a demonstration and does not establish the value of any trading strategy.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.