VPN indicator code

Forums ProRealTime English forum ProOrder support VPN indicator code

Viewing 2 posts - 1 through 2 (of 2 total)
  • #176180

    I’m curious about the VPN indicator by Markos Katsanos, but I’m struggling to convert the code. Does anyone know how to code this?

    “The VPN indicator calculates the difference of up day volume and down day volume, divided by the total volume. A day is an up day when its typical price – the average of high, low, and close – is higher than yesterday’s typical price plus 1/10 ATR. The opposite is true for down days. The result is multiplied by 100 and smoothed with a 3-day EMA.”

    This is my poor attempt, would appreciate if someone could point me in the right direction.

     

    #176182

    Not correct, but you were close! 🙂 Pinescript is somehow similar to Python with indentation.

    Try that version instead:

     

    1 user thanked author for this post.
Viewing 2 posts - 1 through 2 (of 2 total)

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