Conversion of Dynamic Flow Ribbons from TradingView

Forums ProRealTime forum Français Support ProBuilder Conversion of Dynamic Flow Ribbons from TradingView

  • This topic has 0 replies, 1 voice, and was last updated 5 hours ago by avatarnpam.
Viewing 1 post (of 1 total)
  • #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 = na

    upperBand = 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)) // }

Viewing 1 post (of 1 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login