Stochastic formula for prorealtime

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #166595 quote
    keengteekeengtee
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 robertogozzirobertogozzi
5 years, 6 months ago.

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