OPEN-SOURCE SCRIPT
Mini Chart

OVERVIEW
This script is a lightweight utility that draws a compressed, multi-metric mini chart directly on your main screen. At its core, it is a morphological analysis tool that visualizes the structural shape of long-term historical data. It helps quickly answer key visual questions: Are there macro trend shifts, crossover events, or structural similarities between different datasets? Ultimately, it allows users to monitor the "big picture" context without cluttering their lower-timeframe workspace.
MAIN CONCEPT
Think of this indicator as a landscape photographer taking a panoramic picture and printing it on a small paper. Instead of drawing every single movement bar by bar, the script memorizes the market's path over a long historical window (e.g., the last 25,000 bars). When it reaches the current bar, it scales this massive memory down proportionally and sketches a summarized map of the entire journey.
APPLICATIONS
Because it focuses on structural morphology, this tool is highly versatile and can be adapted to various analytical disciplines:
• Benchmark: Compare strategy performance (e.g., Close + Equity + Hold).
• Correlation: Analyze macroeconomic shifts (e.g., DXY + BTC Dominance + Total Market Cap).
• Trend: Observe macro directional bias (e.g., Multiple Moving Averages + Trend Tracker Systems).
• Oscillator: Identify historical extremes (e.g., RSI + ATR + Volume).
• Onchain / Fundamentals: Track underlying market mechanics (e.g., Cryptocap, Open Interest, Funding Rate).
etc.
MECHANICS
The architecture relies on memory management rather than continuous plotting:
• Data Pooling: The script uses array.push() and array.shift() to continuously maintain a rolling window of historical values for up to 6 user-defined sources, along with their respective UNIX timestamps.
• Execution: To optimize performance, the drawing engine is encapsulated entirely within a barstate.islast condition.
• Scaling Function (f_scale): A custom function converts the raw data into coordinates constrained by a dynamic bounding box. The Y-axis boundaries of this box are calculated using a multiplier against the current Average True Range (ATR), allowing the box height to breathe with market volatility.
• Normalization: The script handles two distinct scaling logic paths. Global scaling evaluates all active arrays against a shared min/max (ideal for homogenous data). Independent normalization isolates each array, scaling them solely against their own historical extremes (ideal for superimposing heterogeneous data).
• Hover Tooltips: Instead of printing overlapping text labels for the X-axis, the script generates invisible label objects ("📌") mapped vertically across the box span. Utilizing the tooltip argument, these act as a hitbox array, allowing users to retrieve precise historical timestamps and raw array values via mouse hover.
HOW TO USE
Users can configure the indicator via the settings panel:
• Lookback: Define the size of the historical data pool (up to 100,000 bars).
• Source: Toggle and assign up to 5 different data sets.
• Scale: Choose between Linear or Logarithmic logic. Toggle "Normalization" on if you are comparing metrics with different numerical ranges.
• Display: Adjust the horizontal Chart Span (width in bars), the vertical Height (ATR multiplier), and the horizontal Offset. You can also input your local timezone offset (GMT+) to align the hover tooltips with your local clock.
OUTPUTS
The script generates a single geometric box at the end of the chart containing:
• Line series representing the downsampled historical data of the active sources.
• Text labels on the right axis showing the current actual values of the sources.
• Text labels indicating the absolute Maximum and Minimum values recorded within the lookback window.
• An interactive area where hovering the cursor over the box reveals the exact timestamp and raw source values for that specific structural slice.
DISCLAIMER
This indicator is strictly a contextual visualization tool, not a signal generator. It does not provide entry or exit triggers. Because it heavily downsamples data (e.g., compressing 25,000 bars into a 40-bar span), the X-axis (time) is significantly distorted. It is designed for observing macro bias, historical extremes, and relative strength convergences. Users should not attempt to read precise crossover timings or micro-structures from the mini chart.
This script is a lightweight utility that draws a compressed, multi-metric mini chart directly on your main screen. At its core, it is a morphological analysis tool that visualizes the structural shape of long-term historical data. It helps quickly answer key visual questions: Are there macro trend shifts, crossover events, or structural similarities between different datasets? Ultimately, it allows users to monitor the "big picture" context without cluttering their lower-timeframe workspace.
MAIN CONCEPT
Think of this indicator as a landscape photographer taking a panoramic picture and printing it on a small paper. Instead of drawing every single movement bar by bar, the script memorizes the market's path over a long historical window (e.g., the last 25,000 bars). When it reaches the current bar, it scales this massive memory down proportionally and sketches a summarized map of the entire journey.
APPLICATIONS
Because it focuses on structural morphology, this tool is highly versatile and can be adapted to various analytical disciplines:
• Benchmark: Compare strategy performance (e.g., Close + Equity + Hold).
• Correlation: Analyze macroeconomic shifts (e.g., DXY + BTC Dominance + Total Market Cap).
• Trend: Observe macro directional bias (e.g., Multiple Moving Averages + Trend Tracker Systems).
• Oscillator: Identify historical extremes (e.g., RSI + ATR + Volume).
• Onchain / Fundamentals: Track underlying market mechanics (e.g., Cryptocap, Open Interest, Funding Rate).
etc.
MECHANICS
The architecture relies on memory management rather than continuous plotting:
• Data Pooling: The script uses array.push() and array.shift() to continuously maintain a rolling window of historical values for up to 6 user-defined sources, along with their respective UNIX timestamps.
• Execution: To optimize performance, the drawing engine is encapsulated entirely within a barstate.islast condition.
• Scaling Function (f_scale): A custom function converts the raw data into coordinates constrained by a dynamic bounding box. The Y-axis boundaries of this box are calculated using a multiplier against the current Average True Range (ATR), allowing the box height to breathe with market volatility.
• Normalization: The script handles two distinct scaling logic paths. Global scaling evaluates all active arrays against a shared min/max (ideal for homogenous data). Independent normalization isolates each array, scaling them solely against their own historical extremes (ideal for superimposing heterogeneous data).
• Hover Tooltips: Instead of printing overlapping text labels for the X-axis, the script generates invisible label objects ("📌") mapped vertically across the box span. Utilizing the tooltip argument, these act as a hitbox array, allowing users to retrieve precise historical timestamps and raw array values via mouse hover.
HOW TO USE
Users can configure the indicator via the settings panel:
• Lookback: Define the size of the historical data pool (up to 100,000 bars).
• Source: Toggle and assign up to 5 different data sets.
• Scale: Choose between Linear or Logarithmic logic. Toggle "Normalization" on if you are comparing metrics with different numerical ranges.
• Display: Adjust the horizontal Chart Span (width in bars), the vertical Height (ATR multiplier), and the horizontal Offset. You can also input your local timezone offset (GMT+) to align the hover tooltips with your local clock.
OUTPUTS
The script generates a single geometric box at the end of the chart containing:
• Line series representing the downsampled historical data of the active sources.
• Text labels on the right axis showing the current actual values of the sources.
• Text labels indicating the absolute Maximum and Minimum values recorded within the lookback window.
• An interactive area where hovering the cursor over the box reveals the exact timestamp and raw source values for that specific structural slice.
DISCLAIMER
This indicator is strictly a contextual visualization tool, not a signal generator. It does not provide entry or exit triggers. Because it heavily downsamples data (e.g., compressing 25,000 bars into a 40-bar span), the X-axis (time) is significantly distorted. It is designed for observing macro bias, historical extremes, and relative strength convergences. Users should not attempt to read precise crossover timings or micro-structures from the mini chart.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.