bollinger band code tradingview to prorealtime code

Forums ProRealTime English forum ProBuilder support bollinger band code tradingview to prorealtime code

Viewing 6 posts - 1 through 6 (of 6 total)
  • #142659

    Cant seem to get my tradingview bollinger band to match my prorealtime setup. Please help, this is the trading view code in attachment.

    My settings are Length 10, std dev 0.66, source – close, offset – 1  from tradingview

     

     

    #142661

    Different data in equals different result out. Unless your Tradingview is getting the exact same data from the exact same broker as your PRT platform is then why would you expect the same result?

    Also please don’t expect people to download TXT files. Post the code directly in your post.

    1 user thanked author for this post.
    #142678

    That needs a custom coding, here is the code for that kind of bollinger bands (short term, 0.66 factor for the upper and lower bands and offset by 1 period):

     

    1 user thanked author for this post.
    #142693

    Hi sorry heres the code –

    //@version=4
    study(shorttitle=”BB”, title=”Bollinger Bands”, overlay=true, resolution=””)
    length = input(20, minval=1)
    src = input(close, title=”Source”)
    mult = input(2.0, minval=0.001, maxval=50, title=”StdDev”)
    basis = sma(src, length)
    dev = mult * stdev(src, length)
    upper = basis + dev
    lower = basis – dev
    offset = input(0, “Offset”, type = input.integer, minval = -500, maxval = 500)
    plot(basis, “Basis”, color=#872323, offset = offset)
    p1 = plot(upper, “Upper”, color=color.teal, offset = offset)
    p2 = plot(lower, “Lower”, color=color.teal, offset = offset)
    fill(p1, p2, title = “Background”, color=#198787, transp=95)

    #142694

    Thank you for the reply. I tried the same code which i found in this forum before. It still come up differently, i think it may be the ‘source’. im not sure. i put the tradingview code in my reply above.

    #142696

    Hi again, i just want to say thankyou. I tried this code exactly and it was what i was looking for. please ignore my above reply. Cant thank you enough.

Viewing 6 posts - 1 through 6 (of 6 total)

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