Conversion of Dynamic Flow Ribbons from TradingView
Forums › ProRealTime forum Français › Support ProBuilder › Conversion of Dynamic Flow Ribbons from TradingView
- This topic has 1 reply, 2 voices, and was last updated 1 month ago by
Iván.
-
-
07/09/2025 at 4:15 PM #248766
Hello,
I need help to translate a such great indicator, that is not very easy to translate, please.
Thanks// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © BigBeluga//@version=6
indicator(“Dynamic Flow Ribbons [BigBeluga]”, overlay = true)// INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
factor = input.float(3, “Length”, step = 0.01)
col_up = input.color(color.rgb(26, 221, 127), “”, inline = “Col”)
col_dn = input.color(color.rgb(231, 147, 20), “”, inline = “Col”)
// }// CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
float dist = ta.sma(high-low, 200)trend_line(factor)=>
float src = hlc3
int _direction = na
float trend_line = naupperBand = ta.ema(src, 15) + factor * dist
lowerBand = ta.ema(src, 15) – factor * dist
prevLowerBand = nz(lowerBand[1])
prevUpperBand = nz(upperBand[1])lowerBand := lowerBand > prevLowerBand or src[1] < prevLowerBand ? lowerBand : prevLowerBand upperBand := upperBand < prevUpperBand or src[1] > prevUpperBand ? upperBand : prevUpperBand
prevTrendLine = trend_line[1]
if na(dist[1])
_direction := 1
else if prevTrendLine == prevUpperBand
_direction := src > upperBand ? -1 : 1
else
_direction := src < lowerBand ? 1 : -1 trend_line := _direction == -1 ? lowerBand : upperBand line_ = math.avg(lowerBand, upperBand) [line_, _direction, lowerBand, upperBand] [line_, _direction, lowerBand, upperBand] = trend_line(factor) // } // PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{ t_col = _direction == 1 ? col_dn : col_up plot(line_, "TrendLine", color = color.new(t_col, 0), linewidth = 4) plot(line_, "TrendLine", color = color.new(t_col, 80), linewidth = 10) plot(lowerBand+dist, "LowerBand1", color = _direction == -1 ? color.new(t_col, 80) : color.new(t_col, 100), linewidth = 1) plot(lowerBand+dist*0.5, "LowerBand2", color = _direction == -1 ? color.new(t_col, 60) : color.new(t_col, 100), linewidth = 1) plot(lowerBand, "LowerBand3", color = _direction == -1 ? color.new(t_col, 40) : color.new(t_col, 100), linewidth = 1) plot(lowerBand-dist*0.5, "LowerBand4", color = _direction == -1 ? color.new(t_col, 20) : color.new(t_col, 100), linewidth = 1) plot(lowerBand-dist, "LowerBand5", color = _direction == -1 ? color.new(t_col, 0) : color.new(t_col, 100), linewidth = 1) plot(upperBand+dist, "UpperBand5", color = _direction == 1 ? color.new(t_col, 0) : color.new(t_col, 100), linewidth = 1) plot(upperBand+dist*0.5, "UpperBand4", color = _direction == 1 ? color.new(t_col, 20) : color.new(t_col, 100), linewidth = 1) plot(upperBand, "UpperBand3", color = _direction == 1 ? color.new(t_col, 40) : color.new(t_col, 100), linewidth = 1) plot(upperBand-dist*0.5, "UpperBand2", color = _direction == 1 ? color.new(t_col, 60) : color.new(t_col, 100), linewidth = 1) plot(upperBand-dist, "UpperBand1", color = _direction == 1 ? color.new(t_col, 80) : color.new(t_col, 100), linewidth = 1) plotcandle(open, high, low, close, title='CandleStick Coloring', color = color.new(t_col, 50), wickcolor=color.new(t_col, 50), bordercolor = color.new(t_col, 50)) // }07/10/2025 at 7:15 AM #248775Ici vous avez :
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495//---------------------------------------////PRC_Dynamic Flow Ribbons by [BigBeluga]//version = 0//10.07.25//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//---------------------------------------//// --- Inputs//---------------------------------------//factor=3 // LengthRcolorUp=26GcolorUp=221BcolorUp=127RcolorDn=231GcolorDn=147BcolorDn=20//---------------------------------------//// --- Calculations//---------------------------------------//dist = average[200,0](high-low)src=(high+low+close)/3once direction=1if barindex>=200 thenlowerband=average[15,1](src)-factor*distif lowerband>lowerband[1] or src[1]<lowerband[1] thenlowerband=average[15,1](src)-factor*distelselowerband=lowerband[1]endifupperband=average[15,1](src)+factor*distIf upperband<upperband[1] or src[1]>upperband[1] thenupperband=average[15,1](src)+factor*distelseupperband=upperband[1]endifif trendline[1]=upperband[1] thenif src>upperband thendirection=-1elsedirection=1endifelseif src<lowerband thendirection=1elsedirection=-1endifendifif direction=-1 thentrendline=lowerbandr=rcolorUpg=gcolorUpb=bcolorUpalu=0alw=1elsetrendline=upperbandr=rcolorDng=gcolorDnb=bcolorDnalu=1alw=0endifiline=(lowerband+upperband)/2alpha=255elseupperband=srclowerband=srciline=srcalpha=0endif//---------------------------------------//// --- Ribbons//---------------------------------------//upperband1=upperband-distupperband2=upperband-dist*0.5upperband3=upperbandupperband4=upperband+dist*0.5upperband5=upperband+distlowerband1=lowerband+distlowerband2=lowerband+dist*0.5lowerband3=lowerbandlowerband4=lowerband-dist*0.5lowerband5=lowerband-dist//---------------------------------------//return iline coloured(r,g,b,alpha)style(line,3),upperband1 coloured(r,g,b,alpha*alu*0.2)style(line,1),upperband2coloured(r,g,b,alpha*alu*0.4)style(line,1),upperband3 coloured(r,g,b,alpha*alu*0.6)style(line,1),upperband4coloured(r,g,b,alpha*alu*0.8)style(line,1),upperband5 coloured(r,g,b,alpha*alu)style(line,1), lowerband1coloured(r,g,b,alpha*alw*0.2)style(line,1), lowerband2 coloured(r,g,b,alpha*alw*0.4)style(line,1),lowerband3coloured(r,g,b,alpha*alw*0.6)style(line,1),lowerband4 coloured(r,g,b,alpha*alw*0.8)style(line,1),lowerband5coloured(r,g,b,alpha*alw)style(line,1)1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on