Dynamic Flow Ribbons

Category: Indicators By: Iván González Created: July 10, 2025, 10:46 AM
July 10, 2025, 10:46 AM
Indicators
0 Comments

1. Introduction

Dynamic Flow Ribbons is a trend-following ribbon indicator designed to visualize the evolving balance between bullish and bearish momentum (created by BigBeluga).

This tool overlays multiple dynamic bands (“ribbons”) around a central mid-line, adjusting their width based on recent price volatility. Traders use it to identify shifts in trend direction, confirm breakouts, and gauge strength of moves without relying solely on static moving averages.

2. Indicator Overview

At its core, Dynamic Flow Ribbons calculates a typical price (src) and a volatility measure (dist) over a long baseline.

It then constructs upper and lower bands offset from a short moving average of src by multiples of dist.

When price crosses or bends these bands, the indicator flips its “direction” state, altering ribbon coloration and the reference mid-line. This creates a flowing ribbon effect that dynamically expands and contracts as volatility changes.

3. Calculation and Internal Logic

  1. Distance (dist)

    • Computed as a 200-period simple average of the true high–low range:

      dist = average[200](high − low)
  2. Source Price (src)

    • The typical price for each bar:

      src = (high + low + close) / 3
  3. Dynamic Bands

    • Short moving average of src over 15 periods, offset by factor × dist.

    • Lower band initializes or follows its previous value depending on whether it tightens or price probes it.

    • Upper band follows analogous logic in the opposite direction.

  4. Direction Determination

    • The indicator tracks a direction state (1 for bullish, –1 for bearish).

    • When price exceeds the upper band, it flips to bearish (–1); if it falls below the lower band, it flips to bullish (1).

  5. Ribbon Construction

    • Five bands above and below the active trendline are drawn at increments of dist × {–1.0, –0.5, 0, +0.5, +1.0}.

    • The mid-line (iline) is the simple average of upper and lower bands.

  6. Color & Transparency

    • Ribbons adopt “up” or “down” RGB colors, with alpha transparency varying by band proximity to the mid-line.

    • When in a bullish state, the lower ribbons highlight in the “up” color; when bearish, the upper ribbons highlight in the “down” color.

4. Input Parameters

Input Name Default Description
factor 3 Multiplier for volatility distance (dist).
RcolorUp 26 Red component of “up” color (0–255).
GcolorUp 221 Green component of “up” color (0–255).
BcolorUp 127 Blue component of “up” color (0–255).
RcolorDn 231 Red component of “down” color (0–255).
GcolorDn 147 Green component of “down” color (0–255).
BcolorDn 20 Blue component of “down” color (0–255).

5. Recommended Configuration

  • Default Settings work well on higher-timeframe charts (H1 and above) for major FX pairs and stock indices.

  • Increasing factor widens the ribbons, reducing whipsaws in choppy markets—but can delay signals.

  • Reducing factor tightens the ribbons, capturing earlier moves at the cost of more false signals.

  • Color Customization: Choose contrasting RGB values to ensure visibility over your chart background.

6. Usage Examples

  • Bullish Signal: When the price closes above the upper band and ribbons flip color to the bearish palette, it indicates exhaustion of the upmove and potential reversal. A return into the ribbon zone can confirm the renewed uptrend.

  • Bearish Signal: Conversely, a close below the lower band turns ribbons into the bullish palette, suggesting a shift into bullish momentum once price re-enters.

  • Volatility Gauging: Ribbon width expansion signals rising volatility, hinting at a stronger trend continuation. Contraction warns of consolidation or imminent reversal.

Tip: Combine with volume filters or a momentum oscillator (e.g., RSI) to confirm the strength of the ribbon-based signals.

7. ProBuilder Code Placeholder

//---------------------------------------//
//PRC_Dynamic Flow Ribbons by [BigBeluga]
//version = 0
//10.07.25
//Iván González @ www.prorealcode.com
//Sharing ProRealTime knowledge
//---------------------------------------//
// --- Inputs
//---------------------------------------//
factor=3 // Length
RcolorUp=26
GcolorUp=221
BcolorUp=127
RcolorDn=231
GcolorDn=147
BcolorDn=20
//---------------------------------------//
// --- Calculations
//---------------------------------------//
dist = average[200,0](high-low)
src=(high+low+close)/3
once direction=1

if barindex>=200 then

lowerband=average[15,1](src)-factor*dist
if lowerband>lowerband[1] or src[1]<lowerband[1] then
lowerband=average[15,1](src)-factor*dist
else
lowerband=lowerband[1]
endif

upperband=average[15,1](src)+factor*dist
If upperband<upperband[1] or src[1]>upperband[1] then
upperband=average[15,1](src)+factor*dist
else
upperband=upperband[1]
endif

if trendline[1]=upperband[1] then
if src>upperband then
direction=-1
else
direction=1
endif
else
if src<lowerband then
direction=1
else
direction=-1
endif
endif
if direction=-1 then
trendline=lowerband
r=rcolorUp
g=gcolorUp
b=bcolorUp
alu=0
alw=1
else
trendline=upperband
r=rcolorDn
g=gcolorDn
b=bcolorDn
alu=1
alw=0
endif
iline=(lowerband+upperband)/2
alpha=255
else
upperband=src
lowerband=src
iline=src
alpha=0
endif
//---------------------------------------//
// --- Ribbons
//---------------------------------------//
upperband1=upperband-dist
upperband2=upperband-dist*0.5
upperband3=upperband
upperband4=upperband+dist*0.5
upperband5=upperband+dist
lowerband1=lowerband+dist
lowerband2=lowerband+dist*0.5
lowerband3=lowerband
lowerband4=lowerband-dist*0.5
lowerband5=lowerband-dist
//---------------------------------------//
return iline coloured(r,g,b,alpha)style(line,3),upperband1 coloured(r,g,b,alpha*alu*0.2)style(line,1),upperband2 coloured(r,g,b,alpha*alu*0.4)style(line,1),upperband3 coloured(r,g,b,alpha*alu*0.6)style(line,1),upperband4 coloured(r,g,b,alpha*alu*0.8)style(line,1),upperband5 coloured(r,g,b,alpha*alu)style(line,1), lowerband1 coloured(r,g,b,alpha*alw*0.2)style(line,1), lowerband2 coloured(r,g,b,alpha*alw*0.4)style(line,1),lowerband3 coloured(r,g,b,alpha*alw*0.6)style(line,1),lowerband4 coloured(r,g,b,alpha*alw*0.8)style(line,1),lowerband5 coloured(r,g,b,alpha*alw)style(line,1)

Download
Filename: PRC_Dynamic-Flow-Ribbons.itf
Downloads: 58
Iván González Master
Code artist, my biography is a blank page waiting to be scripted. Imagine a bio so awesome it hasn't been coded yet.
Author’s Profile

Comments

Logo Logo
Loading...