[Python] Pine scripts (tradingview) convert python

Discussão em 'Python' iniciado por Stack, Fevereiro 25, 2025.

  1. Stack

    Stack Membro Participativo

    I have two pine scripts (tradingview). How can I the script to Pandas python or with help talib library convert and how can man ‘pds’ calculate. I donot need The plot. I well by thankful if some help

    wapScore(pds) =>
    mean = sum(volume*close,pds)/sum(volume,pds)
    vwapsd = sqrt(sma(pow(close-mean, 2), pds) )
    (close-mean)/vwapsd

    plot(vwapScore(48),title="ZVWAP2-2",color=#ffe0b2, linewidth=2,transp=0.75)
    plot(vwapScore(199),title="ZVWAP2-2",color=#cfb9ff, linewidth=2,style=circles,transp=0.75)
    plot(vwapScore(484),title="ZVWAP2-3",color=#ffe0b2, linewidth=2,style=circles,transp=0.75)

    =============================================================

    study("VWAP", overlay=true)
    typicalPrice = (high + low + close) / 3
    typicalPriceVolume = typicalPrice * volume

    cumulativePeriod1 = input(48, "Period")
    cumulativeTypicalPriceVolume1 = sum(typicalPriceVolume, cumulativePeriod1)
    cumulativeVolume1 = sum(volume, cumulativePeriod1)
    vwapValue1 = cumulativeTypicalPriceVolume1 / cumulativeVolume1
    plot(vwapValue1,color=#b2b5be,style=circles)```

    Continue reading...

Compartilhe esta Página