Skip to content
All library documents

Weekly Strategy Returns Table with Compounded Group Totals

Article TradingView scripts

Summary

This script demonstrates a way to display a strategy’s weekly equity returns in a chart table. It tracks changes in strategy equity, compounds the bar-level returns within each week, and stores completed weekly values over a user-selected date range. The table groups a configurable number of weeks into rows, colors positive and negative weekly results, and shows a compounded total for each group. The included example trading logic uses a short-period RSI crossing upper and lower thresholds to enter long and short positions; it serves as a sample strategy for the reporting display.

The document explains date selection, display precision, grouping, and the calculation of weekly results, but provides no evidence that the sample trading rules are profitable. It advises enabling recalculation on every tick for the table workflow and cautions that doing so can alter strategy behavior relative to bar-close execution. The weekly figures depend on strategy equity and the selected interval, while the grouped values are compounded rather than added. Users should account for those settings when interpreting or comparing the display.

Key ideas

  • The script calculates weekly returns from changes in strategy equity and compounds the bar returns within each week.
  • A configurable table groups weekly results and displays both individual values and compounded group totals.
  • The example entries use RSI threshold crossovers, but the document’s main contribution is performance reporting.
  • The reporting window, displayed precision, and number of weeks per group are configurable.
  • The author warns that recalculating on every tick can change strategy behavior.

Tags

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