OPEN-SOURCE SCRIPT

Dynamic Fair-Value Ribbon Pro @darshakssc

227
1. What This Indicator Is (In Simple Terms)
The Dynamic Fair-Value Ribbon Pro is a visual tool that helps you see how price behaves around a statistically derived “fair-value zone”:
  • A colored ribbon/cloud marks a central “fair” area.
  • Areas above the ribbon are labeled as “Unfair High Zone”.
  • Areas below the ribbon are labeled as “Unfair Low Zone”.
  • A small state panel tells you where price currently sits relative to this ribbon.

All calculations are based only on historical price, volume, and volatility.
It does not predict future price, does not give buy/sell signals, and is not financial advice.

2. Adding the Indicator
  1. Open a chart on TradingView.
  2. Click on Indicators.
  3. Search for “Dynamic Fair-Value Ribbon Pro”.
  4. Click to add it to your chart.


You will see:
  • A cloud/ribbon around price.
  • Colored bars when price is outside the ribbon.
  • A panel in the top right describing the current state.


3. Core Concept: Fair vs Unfair Zones (Analytical Only)
The indicator tries to answer a descriptive question:
“Where is price trading relative to a historically derived central area?”

It does this by:
  • Calculating a central value (“fair mid”).
  • Building a band around that mid.
  • Coloring the chart depending on whether price is inside or outside that band.


It is not claiming that:
  • Price “must” return to the band.
  • Price is “overvalued” or “undervalued”.
  • Any state is good or bad.

It is simply a visual classification tool.

4. Engine Modes — How the Ribbon Is Calculated
Under “Fair-Value Engine” you can choose:
4.1 Mode 1: Range
  • Looks back over a chosen number of bars (default: 100).
  • Finds the highest high and lowest low in that window.
  • Defines a central “slice” of that range as the fair-value ribbon:
  • Range Mode: Lower Percent → bottom boundary of the slice (e.g., 30%).
  • Range Mode: Upper Percent → top boundary of the slice (e.g., 70%).


Effect:
  • The ribbon represents a middle portion of the historical range.
  • Above the ribbon = “Unfair High Zone” (analytical label only).
  • Below the ribbon = “Unfair Low Zone”.

This is purely statistical — it does not mean price is wrong or will revert.

4.2 Mode 2: VWAP + Stdev
In this mode, the central value is based on VWAP:
  • VWAP (Volume-Weighted Average Price) is used as the midline.
  • A standard deviation envelope is built around VWAP:
  • VWAP Mode: Stdev Multiplier controls how wide that envelope is.


Effect:
  • The ribbon shows where price is trading relative to a volume-weighted average.
  • Again, areas above and below are just described as “unfair” zones in a visual, analytical sense, not a predictive one.


5. ATR Adaptive Width — Making the Ribbon React to Volatility
Under “ATR Adaptive Width”:
  • Use ATR Adaptive Width:
  • On: the band width scales with volatility.
  • Off: band width stays fixed based on Range or VWAP settings.
  • ATR Length: how many bars to use for ATR.
  • Reference ATR (% of price): a reference level for normal volatility.
  • Min Width Scale / Max Width Scale: clamps the scaling so that the band doesn’t get too narrow or too wide.


What this does (analytically):
  • When volatility (ATR) is higher than the reference, the band can become wider.
  • When volatility is lower, the band can become narrower.
  • This is a mathematical rescaling only and does not imply any optimal levels or performance.


6. Visual Elements — What You See on the Chart
6.1 Fair-Value Ribbon (Cloud)
The cloud between Fair Ribbon Low and Fair Ribbon High is the fair zone.
Color can be changed via “Fair Ribbon Color”.

6.2 Midline
  • If “Show Center Line” is enabled:
  • A line runs through the middle of the ribbon.
  • In Range mode, this is the average of the upper and lower band.
  • In VWAP mode, it’s essentially the VWAP-based mid.

This line is for visual reference only and makes no claims about support, resistance, or reversion.

6.3 Bar Colors
  • Unfair High Zone: bars are colored with Unfair High Bar Color.
  • Unfair Low Zone: bars are colored with Unfair Low Bar Color.
  • Inside the ribbon:
  • If “Fade Bars Inside Fair Zone” is ON, bars may be more faded/neutral.
  • These colors are simply classification highlights; they do not tell you what to do.


6.4 State Panel (Top Right)
If “Show State Panel” is enabled, you’ll see a small box that displays:
  • Current engine:
  • Range or VWAP+Stdev.
  • Current price state:
  • Inside Ribbon (Fair Zone)
  • Above Ribbon (Unfair High Zone)
  • Below Ribbon (Unfair Low Zone)

This is a quick summary of where price sits relative to the computed ribbon.

7. Typical Ways to Use It (Informational Only)
The indicator can help you visually:
  • See when price is spending time inside a historically defined central zone.
  • Notice when price is frequently trading outside that zone.
  • Compare different timeframes (e.g., 5m vs 1h vs 4h) to see how the fair zone shifts.
  • Experiment with:
  • Range length (shorter vs longer lookback).
  • VWAP vs Range mode.
  • ATR adaptation on/off.


Important:
Any interpretation of these visuals is entirely up to the user.
The script does not tell you to buy, sell, hold, or do anything specific.

8. Limitations and Important Notes
  • All calculations use past data only (price, volume, volatility).
  • The ribbon does not guarantee:
  • that price will revert,
  • that zones will hold,
  • or that any outcome will occur.
  • There are no built-in signals such as “long/short” or automatic entries/exits.
  • The script is best used as a supporting, visual layer alongside other tools or methods you choose.


9. Disclaimer
This indicator is:
  • Strictly informational and educational.
  • Not a trading system or strategy.
  • Not financial advice or a recommendation.
  • Not guaranteed to be accurate, complete, or suitable for any specific purpose.

Users should always perform their own research and due diligence.
Past behavior of any visual pattern or zone does not guarantee future behavior.

Exención de responsabilidad

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.