OPEN-SOURCE SCRIPT
1M / 3M / 6M / 12M Performance Box

─────────────────────────────────────────────────────────────
1M / 3M / 6M / 12M Performance Box
─────────────────────────────────────────────────────────────
A compact on-chart dashboard that shows multi-horizon price performance
(1M / 3M / 6M / 12M) as percentage change, using DAILY data for consistency
across all chart timeframes (intraday, daily, weekly).
What it does
• Calculates % performance over 1, 3, 6, and 12 month horizons.
• Displays results in a clean table overlay on the chart.
• Automatically color-codes performance:
- Green = positive
- Red = negative
- Gray = neutral / not available
Month definition (user selectable)
• Calendar days mode:
1M = 30 days, 3M = 90 days, 6M = 180 days
• Trading days mode:
1M = 21 TD, 3M = 63 TD, 6M = 126 TD
• 12M is calculated as ~365 days in both modes.
Customization
• Table position (top/bottom + left/right)
• Decimal precision
• Fully customizable colors (header, labels, positive/negative/neutral cells)
• Adjustable background opacity
• Optional header with symbol + timeframe
Use cases
• Quick trend/context check before entries
• Relative strength snapshot across time horizons
• Cleaner decision-making without adding clutter
Notes
• Uses daily close/time via request.security() for stable results.
• Displays "n/a" when a reference value is not available.

─────────────────────────────────────────────────────────────
1M / 3M / 6M / 12M Performance Box
─────────────────────────────────────────────────────────────
A compact on-chart dashboard that shows multi-horizon price performance
(1M / 3M / 6M / 12M) as percentage change, using DAILY data for consistency
across all chart timeframes (intraday, daily, weekly).
What it does
• Calculates % performance over 1, 3, 6, and 12 month horizons.
• Displays results in a clean table overlay on the chart.
• Automatically color-codes performance:
- Green = positive
- Red = negative
- Gray = neutral / not available
Month definition (user selectable)
• Calendar days mode:
1M = 30 days, 3M = 90 days, 6M = 180 days
• Trading days mode:
1M = 21 TD, 3M = 63 TD, 6M = 126 TD
• 12M is calculated as ~365 days in both modes.
Customization
• Table position (top/bottom + left/right)
• Decimal precision
• Fully customizable colors (header, labels, positive/negative/neutral cells)
• Adjustable background opacity
• Optional header with symbol + timeframe
Use cases
• Quick trend/context check before entries
• Relative strength snapshot across time horizons
• Cleaner decision-making without adding clutter
Notes
• Uses daily close/time via request.security() for stable results.
• Displays "n/a" when a reference value is not available.
─────────────────────────────────────────────────────────────
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.