Stochastic formula for prorealtime

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #166595 quote
    keengtee
    Participant
    New

    I just want a replica of the Stochastic indicator so I can optimize more than just the ‘K’ and ‘D’ I want to optimize the smoothing too.

    #166596 quote
    robertogozzi
    Moderator
    Master

    There you go:

    // https://en.wikipedia.org/wiki/Stochastic_oscillator
    //
    // settings for Stochastic 10,5,3)
    Periods = 10
    Kline   = 5
    Dline   = 3
    AvgType = 0     //Sma
    K       = average[Kline,AvgType](((close - lowest[Periods](low)) / (highest[Periods](high) - lowest[Periods](low)))  * 100)
    D       = average[Dline,AvgType](K)
    Return K AS "%K",D AS "%D"
    keengtee thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Stochastic formula for prorealtime


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
keengtee @keengtee Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
4 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/09/2021
Status: Active
Attachments: No files
Logo Logo
Loading...