Zigzag Fibonacci Indicator transcript from Tradingview needed

Forums ProRealTime English forum ProBuilder support Zigzag Fibonacci Indicator transcript from Tradingview needed

Viewing 3 posts - 1 through 3 (of 3 total)
  • #234331

    Hi everybody,

    I am familiar with coding (python, pinescript) and would like to start with prorealcode too.
    Nevertheless I struggle a bit with the specifics of prorealcode:-(

    So to kickstart, please could someone transcript the tradingview indicator to prorealcode?
    It shows very good the expected direction (see attached picture, green is the target direction) based on the fibonacci levels which are calculated with a different timeframe of 8 or 10 minutes on a 1 minute chart.

    Thanks in advance:-)

    …. pinescript code is as follows …

    // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    //@version=2
    study(“Z01 Indi”)
    //calc_on_every_tick=false
    useAltTF = input(true, title=’Use Alt Timeframe’)
    tf = input(‘8′, title=’Alt Timeframe’)
    zigzag() =>
    _isUp=close>=open
    _isDown=close<=open
    _direction=_isUp[1]and_isDown?-1:_isDown[1]and_isUp?1:nz(_direction[1])
    _zigzag=_isUp[1]and_isDownand_direction[1]!=-1?highest(2):_isDown[1]and_isUpand_direction[1]!=1?lowest(2):na
    _ticker = tickerid
    sz = useAltTF ? (change(time(tf)) != 0 ? security(_ticker, tf, zigzag()) : na) : zigzag()
    plot(sz, title=’zigzag’, color=lime, linewidth=2)
    x=valuewhen(sz,sz,4)
    a=valuewhen(sz,sz,3)
    b=valuewhen(sz,sz,2)
    c=valuewhen(sz,sz,1)
    d = valuewhen(sz, sz, 0)
    //————————————————————————————————————————————————————-
    fib_range = abs(d-c)
    fib_0000 = d > c ? d-(fib_range*0.000):d+(fib_range*0.000)
    fib_0236 = d > c ? d-(fib_range*0.236):d+(fib_range*0.236)
    fib_0382 = d > c ? d-(fib_range*0.382):d+(fib_range*0.382)
    fib_0500 = d > c ? d-(fib_range*0.500):d+(fib_range*0.500)
    fib_0618 = d > c ? d-(fib_range*0.618):d+(fib_range*0.618)
    fib_0764 = d > c ? d-(fib_range*0.764):d+(fib_range*0.764)
    fib_1000 = d > c ? d-(fib_range*1.000):d+(fib_range*1.000)
    plot(title=’Fib 0.000′, series=fib_0000, color=fib_0000 != fib_0000[1] ? na : black)
    plot(title=’Fib 0.236′, series=fib_0236, color=fib_0236 != fib_0236[1] ? na : red)
    plot(title=’Fib 0.382′, series=fib_0382, color=fib_0382 != fib_0382[1] ? na : olive)
    plot(title=’Fib 0.500′, series=fib_0500, color=fib_0500 != fib_0500[1] ? na : lime)
    plot(title=’Fib 0.618′, series=fib_0618, color=fib_0618 != fib_0618[1] ? na : teal)
    plot(title=’Fib 0.764′, series=fib_0764, color=fib_0764 != fib_0764[1] ? na : blue)
    plot(title=’Fib 1.000′, series=fib_1000, color=fib_1000 != fib_1000[1] ? na : black)
    #234366

    Hi! Here you have a code similar to that one you are sharing.

    #234429

    thank’s Ivan … that helps much.

    I can work further on and adapt my specifics wishes or what I do have in trading view already setup.
    As you can see in the attached picture zigzag and fibonacci is a good combination to identify support and resistance levels and trading targets accordingly.

    After my summer holiday I will post my final result here and share with the community.

    Cheers Jo

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

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