Calculating Multi-Period Price Returns in a TradingView Table
Summary
This indicator displays percentage price changes for selected absolute and to-date timeframes in a chart table. It compares the current price with a prior price associated with each chosen period, using the formula of price change divided by the absolute prior value. Users can select up to six absolute periods and three to-date periods, adjust the table width and colors, and hide timeframes they do not need.
The script supports calendar-style periods and aligns sampled data to timeframe boundaries; it rejects intraday timeframe inputs. Its notes describe standard reference periods and explain that custom periods must first be added through the chart’s timeframe controls. The display updates in real time, so its values may differ from TradingView’s performance sidebar, which the document says does not update in real time. The document explains the calculation and configuration but offers no performance testing or evidence that the table predicts returns; it is a monitoring aid rather than a trading signal.
Key ideas
- The table reports percentage price changes across configurable absolute and to-date periods.
- Returns are calculated from current and prior prices as a percentage of the prior price magnitude.
- Users can choose up to six absolute periods and three to-date periods, with intraday periods unsupported.
- Real-time updates can make displayed values differ from the TradingView performance sidebar.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.