Code Z-Score Indicator

Forums ProRealTime English forum ProBuilder support Code Z-Score Indicator

Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • #6898

    Good evening, I ask politely if you can have the code for Z-Score.

    The formula is: (Close – Average close to n periods) / Standard Deviation to n periods.

    The indicator should show the lines at +2 (green) and -2 (red) standard deviations and the 0 level (which is when the Close = Average Close).

    Thanks in advance for the help

    #6910

    Yes of course. Z-score.. I used to work a lot with it, I’m a ‘mean reverting theory’ lover.. 🙂

    You can combine different n time horizons to compound a more precise deviation for instance. What is the purpose of this request? 🙂

     

    #6949

    Good morning Nicolas, thanks for your response and your availability.

    The purpose of my request is to use the indicator to see when the prices are very far from the average, and then locate the probable turning points. In my opinion it works well especially when there are divergences with prices.

    I plan to also use it with other indicators … I’ll let you know.

    Kindly ask you if you can draw horizontal lines to +2 (green) and a – 2 (red) to see immediately when prices exceed the standard deviation

    #6956

    What you are doing here is normalizing the bollinger bands indicator. Try to set a Bollinger bands on price and you’ll see the exact same informations (with n=20 of course). Though, Z-score is more convenient view I agree.

    To add these 2 lines, replace the last line of code with this :

    Have a nice day.

     

    #6957

    Thank you very much Nicolas. I thank you also for your advice on BB. You’re really kind. If I let you know the news.Have a nice day

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

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