OPEN-SOURCE SCRIPT
TFRSI & RSI Analog Dial [CHE]

 TFRSI & RSI Analog Dial [CHE] — Interactive analog visualization for TFRSI or RSI with gradient zones, radial markers, and a trailing hand pointer.
Summary
This indicator renders an interactive analog dial for either TFRSI or standard RSI, providing a visual gauge with gradient-filled zones for oversold, neutral, and overbought regions. The hand pointer tracks the current value, with optional trailing dots at recent positions to show momentum direction. Radial lines mark key thresholds, and a digital readout displays the exact value. This design enhances readability over linear plots by leveraging familiar clock-like intuition, reducing cognitive load during quick scans. Signals are robust due to clamping to safe bounds and mode-specific scaling, ensuring consistent display across different volatility regimes.
Motivation: Why this design?
Traditional linear RSI or momentum indicators often feel abstract, especially in fast-paced screening where users scan multiple assets. Sharp swings can make thresholds hard to gauge at a glance, leading to missed nuances in overbought or oversold conditions. This dial addresses that by mapping values to a curved scale with color gradients, making extremes visually pop while the hand's trail hints at recent path without cluttering the chart. The dual-mode support allows seamless switching between advanced momentum (TFRSI) and classic RSI, fitting diverse strategies without reloading scripts.
What’s different vs. standard approaches?
- Baseline reference: Diverges from linear plotlines like the built-in RSI oscillator, which stacks values vertically and relies on horizontal lines for thresholds.
- Architecture differences:
- Curved projection with perspective tilt for depth illusion, using polyline arcs instead of straight plots.
- Mode-aware clamping and scaling to handle TFRSI's extended range versus RSI's standard bounds.
- Persistent trail array for hand history, capped at three points to avoid performance drag.
- Gradient segmentation for smooth zone transitions, rendered via multiple thin polylines.
- Practical effect: Charts show a compact, rotatable dial that fits in pane corners, with colors intuitively signaling bias (lime for buy zones, red for sell). The trail adds qualitative flow without numerical overload, helping spot divergences faster than static bars.
How it works (technical)
The indicator first computes the selected metric: for TFRSI, it processes price accelerations through a multi-step filter involving differencing, exponential damping, and normalization to a centered scale; for RSI, it uses the standard gain-loss ratio over the specified period. The value is then clamped between mode-specific minimum and maximum bounds to prevent display overflow.
This clamped value drives the hand angle on a 300-degree arc, projected from a 3D-like model rotated for perspective. Arcs for zones are built as segmented polylines, with colors interpolated linearly across the gradient. Key levels are drawn as radial lines from inner to outer radius, colored by zone. The trail maintains up to three prior angles in an array, updated only on confirmed bars to avoid repainting, and rendered as sized dots fading from small to large.
Initialization seeds filter states to zero on first bar, with persistent variables holding smoothing history. Data flows from price to metric computation, clamping, angle mapping, and projection—all executed globally on the last bar for redraw efficiency.
Parameter Guide
Mode — Switches between TFRSI (extended momentum gauge) and RSI (classic oscillator); affects bounds, zones, and labels. Default: "TFRSI". Trade-offs: TFRSI adds sensitivity to accelerations but may amplify noise; RSI is more stable for trend confirmation.
Dial Size — Sets radius in pixels, scaling all elements proportionally. Default: 200. Bounds: 50–500. Tips: Larger for detailed views, smaller for multi-pane layouts; auto-scales hand length to match.
Dial Vertical Offset — Shifts entire dial up/down in pixels. Default: 0. Bounds: -200–200. Trade-offs: Negative pulls toward price action; positive spaces below—use to avoid overlap.
Camera Angle — Tilts view from top-down (0) to side (90) for 3D effect. Default: 45. Bounds: 0–90. Tips: Steeper angles emphasize depth but compress horizontally; flat for precision.
Resolution — Polygon sides for smooth arcs. Default: 64. Bounds: 4–64. Trade-offs: Higher reduces jaggedness but increases draw calls—balance with pane zoom.
TFRSI Hand Length — Base pointer length at 200px dial, auto-scaled. Default: 170. Bounds: 10–200. Tips: Longer for emphasis in large dials; shorter avoids edge clipping.
Show TFRSI Hand — Toggles pointer visibility. Default: true. Trade-offs: Off for clean zones only; on for value tracking.
Show Hand Trail Dots — Displays 3 fading dots at recent tips. Default: true. Trade-offs: Adds motion context but may clutter static views—disable in alerts.
TFRSI Hand Color — Pointer hue, used for trail dots too. Default: 7E57C2. Tips: Match strategy theme; gradients auto-blend to zones.
Dial Base Color — Arc outline/fill tint. Default: blue. Trade-offs: Opaque for contrast; transparent blends with background.
Neutral Color (50) — Mid-zone shade. Default: gray. Tips: Neutral tones reduce bias in balanced markets.
Oversold Color — Low-zone fill. Default: lime. Trade-offs: Bright for alerts; muted for subtlety.
Overbought Color — High-zone fill. Default: red. Trade-offs: As above—pair with hand blending.
Label Size — Text scaling for thresholds. Default: "normal". Options: tiny/small/normal/large/huge. Tips: Smaller for dense charts; larger for presentations.
Digital TFRSI Size — Readout font. Default: "large". Options: as above. Trade-offs: Balances visibility without dominating dial.
Digital Vertical Offset — Readout position shift. Default: -50. Bounds: -200–200. Tips: Negative centers above dial; adjust for multi-indicators.
TFRSI Length — Core lookback for accelerations. Default: 6. Min: 1. Trade-offs: Shorter heightens reactivity, risks whipsaws; longer smooths extremes.
TFRSI Trigger Length — Final smoothing passes. Default: 2. Min: 1. Tips: Increase for fewer false crosses; decrease for quicker pivots.
RSI Length — Period for gain-loss averaging. Default: 14. Min: 1. Trade-offs: Classic 14 balances; shorter for scalps, longer for swings.
Reading & Interpretation
The dial arcs sweep from overbought (right, red) through neutral (top, gray) to oversold (left, lime), with the hand pointing to the current value—clockwise for rising, counterclockwise for falling. Trail dots grow larger toward the present, colored to match hand zones, indicating recent direction without numbers. Threshold lines thicken at center (50) for quick zeroing; labels confirm levels. Digital readout below shows precise value prefixed by mode. Hand color gradients from neutral to extremes signal building pressure verbally: deepening red warns of potential pullbacks, brightening lime suggests bounces.
Practical Workflows & Combinations
Trend following: Enter long when hand crosses above 50 from oversold trail; confirm with higher highs in price structure. Filter shorts below 50 in downtrends using volume spikes.
Exits/Stops: Trail stops to recent dot positions in overbought; tighten on red gradients exceeding thresholds. Conservative: Exit at neutral; aggressive: Hold to extremes if trail aligns with momentum.
Multi-asset/Multi-TF: Defaults suit forex/stocks on 1H–4H; for crypto, shorten lengths by 20% for volatility. Stack with HTF security calls (e.g., daily mode on 15m chart) for confluence—watch for alignment across dials.
Behavior, Constraints & Performance
Closed-bar updates ensure no repainting; live bars show provisional hand/trail, confirmed on close. No security or HTF calls, so zero lookahead bias. Resources: Caps at 500 lines/labels/polylines, rebuilds only on last bar; max_bars_back=2000 handles history without lag. Known limits: Trail may stutter in flat markets; gradients approximate smooth fills via segments, visible at low resolution.
Sensible Defaults & Quick Tuning
Start with TFRSI mode, length=6, trigger=2 for responsive momentum on daily charts. Too choppy? Bump trigger to 4 for stability. Lagging entries? Drop length to 4, watch for overreactions. For RSI trend filter, set length=21; combine with MA cross for entries when dial nears 30/70.
What this indicator is—and isn’t
This is a visualization layer for momentum gauges, aiding quick bias assessment and threshold spotting. Pair it with price action, volume, and risk rules for decisions. It’s not a standalone signal generator or predictive tool—values reflect past data, prone to whipsaws in ranging conditions.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
Summary
This indicator renders an interactive analog dial for either TFRSI or standard RSI, providing a visual gauge with gradient-filled zones for oversold, neutral, and overbought regions. The hand pointer tracks the current value, with optional trailing dots at recent positions to show momentum direction. Radial lines mark key thresholds, and a digital readout displays the exact value. This design enhances readability over linear plots by leveraging familiar clock-like intuition, reducing cognitive load during quick scans. Signals are robust due to clamping to safe bounds and mode-specific scaling, ensuring consistent display across different volatility regimes.
Motivation: Why this design?
Traditional linear RSI or momentum indicators often feel abstract, especially in fast-paced screening where users scan multiple assets. Sharp swings can make thresholds hard to gauge at a glance, leading to missed nuances in overbought or oversold conditions. This dial addresses that by mapping values to a curved scale with color gradients, making extremes visually pop while the hand's trail hints at recent path without cluttering the chart. The dual-mode support allows seamless switching between advanced momentum (TFRSI) and classic RSI, fitting diverse strategies without reloading scripts.
What’s different vs. standard approaches?
- Baseline reference: Diverges from linear plotlines like the built-in RSI oscillator, which stacks values vertically and relies on horizontal lines for thresholds.
- Architecture differences:
- Curved projection with perspective tilt for depth illusion, using polyline arcs instead of straight plots.
- Mode-aware clamping and scaling to handle TFRSI's extended range versus RSI's standard bounds.
- Persistent trail array for hand history, capped at three points to avoid performance drag.
- Gradient segmentation for smooth zone transitions, rendered via multiple thin polylines.
- Practical effect: Charts show a compact, rotatable dial that fits in pane corners, with colors intuitively signaling bias (lime for buy zones, red for sell). The trail adds qualitative flow without numerical overload, helping spot divergences faster than static bars.
How it works (technical)
The indicator first computes the selected metric: for TFRSI, it processes price accelerations through a multi-step filter involving differencing, exponential damping, and normalization to a centered scale; for RSI, it uses the standard gain-loss ratio over the specified period. The value is then clamped between mode-specific minimum and maximum bounds to prevent display overflow.
This clamped value drives the hand angle on a 300-degree arc, projected from a 3D-like model rotated for perspective. Arcs for zones are built as segmented polylines, with colors interpolated linearly across the gradient. Key levels are drawn as radial lines from inner to outer radius, colored by zone. The trail maintains up to three prior angles in an array, updated only on confirmed bars to avoid repainting, and rendered as sized dots fading from small to large.
Initialization seeds filter states to zero on first bar, with persistent variables holding smoothing history. Data flows from price to metric computation, clamping, angle mapping, and projection—all executed globally on the last bar for redraw efficiency.
Parameter Guide
Mode — Switches between TFRSI (extended momentum gauge) and RSI (classic oscillator); affects bounds, zones, and labels. Default: "TFRSI". Trade-offs: TFRSI adds sensitivity to accelerations but may amplify noise; RSI is more stable for trend confirmation.
Dial Size — Sets radius in pixels, scaling all elements proportionally. Default: 200. Bounds: 50–500. Tips: Larger for detailed views, smaller for multi-pane layouts; auto-scales hand length to match.
Dial Vertical Offset — Shifts entire dial up/down in pixels. Default: 0. Bounds: -200–200. Trade-offs: Negative pulls toward price action; positive spaces below—use to avoid overlap.
Camera Angle — Tilts view from top-down (0) to side (90) for 3D effect. Default: 45. Bounds: 0–90. Tips: Steeper angles emphasize depth but compress horizontally; flat for precision.
Resolution — Polygon sides for smooth arcs. Default: 64. Bounds: 4–64. Trade-offs: Higher reduces jaggedness but increases draw calls—balance with pane zoom.
TFRSI Hand Length — Base pointer length at 200px dial, auto-scaled. Default: 170. Bounds: 10–200. Tips: Longer for emphasis in large dials; shorter avoids edge clipping.
Show TFRSI Hand — Toggles pointer visibility. Default: true. Trade-offs: Off for clean zones only; on for value tracking.
Show Hand Trail Dots — Displays 3 fading dots at recent tips. Default: true. Trade-offs: Adds motion context but may clutter static views—disable in alerts.
TFRSI Hand Color — Pointer hue, used for trail dots too. Default: 7E57C2. Tips: Match strategy theme; gradients auto-blend to zones.
Dial Base Color — Arc outline/fill tint. Default: blue. Trade-offs: Opaque for contrast; transparent blends with background.
Neutral Color (50) — Mid-zone shade. Default: gray. Tips: Neutral tones reduce bias in balanced markets.
Oversold Color — Low-zone fill. Default: lime. Trade-offs: Bright for alerts; muted for subtlety.
Overbought Color — High-zone fill. Default: red. Trade-offs: As above—pair with hand blending.
Label Size — Text scaling for thresholds. Default: "normal". Options: tiny/small/normal/large/huge. Tips: Smaller for dense charts; larger for presentations.
Digital TFRSI Size — Readout font. Default: "large". Options: as above. Trade-offs: Balances visibility without dominating dial.
Digital Vertical Offset — Readout position shift. Default: -50. Bounds: -200–200. Tips: Negative centers above dial; adjust for multi-indicators.
TFRSI Length — Core lookback for accelerations. Default: 6. Min: 1. Trade-offs: Shorter heightens reactivity, risks whipsaws; longer smooths extremes.
TFRSI Trigger Length — Final smoothing passes. Default: 2. Min: 1. Tips: Increase for fewer false crosses; decrease for quicker pivots.
RSI Length — Period for gain-loss averaging. Default: 14. Min: 1. Trade-offs: Classic 14 balances; shorter for scalps, longer for swings.
Reading & Interpretation
The dial arcs sweep from overbought (right, red) through neutral (top, gray) to oversold (left, lime), with the hand pointing to the current value—clockwise for rising, counterclockwise for falling. Trail dots grow larger toward the present, colored to match hand zones, indicating recent direction without numbers. Threshold lines thicken at center (50) for quick zeroing; labels confirm levels. Digital readout below shows precise value prefixed by mode. Hand color gradients from neutral to extremes signal building pressure verbally: deepening red warns of potential pullbacks, brightening lime suggests bounces.
Practical Workflows & Combinations
Trend following: Enter long when hand crosses above 50 from oversold trail; confirm with higher highs in price structure. Filter shorts below 50 in downtrends using volume spikes.
Exits/Stops: Trail stops to recent dot positions in overbought; tighten on red gradients exceeding thresholds. Conservative: Exit at neutral; aggressive: Hold to extremes if trail aligns with momentum.
Multi-asset/Multi-TF: Defaults suit forex/stocks on 1H–4H; for crypto, shorten lengths by 20% for volatility. Stack with HTF security calls (e.g., daily mode on 15m chart) for confluence—watch for alignment across dials.
Behavior, Constraints & Performance
Closed-bar updates ensure no repainting; live bars show provisional hand/trail, confirmed on close. No security or HTF calls, so zero lookahead bias. Resources: Caps at 500 lines/labels/polylines, rebuilds only on last bar; max_bars_back=2000 handles history without lag. Known limits: Trail may stutter in flat markets; gradients approximate smooth fills via segments, visible at low resolution.
Sensible Defaults & Quick Tuning
Start with TFRSI mode, length=6, trigger=2 for responsive momentum on daily charts. Too choppy? Bump trigger to 4 for stability. Lagging entries? Drop length to 4, watch for overreactions. For RSI trend filter, set length=21; combine with MA cross for entries when dial nears 30/70.
What this indicator is—and isn’t
This is a visualization layer for momentum gauges, aiding quick bias assessment and threshold spotting. Pair it with price action, volume, and risk rules for decisions. It’s not a standalone signal generator or predictive tool—values reflect past data, prone to whipsaws in ranging conditions.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
