Stochastic %K and %D

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #8753 quote
    SydneyFox
    Participant
    New

    I am trying to set up a screener which looks at the slope of both the %K and %D lines of the stochastic. Rather than looking at the traditional overbought / oversold values. This is along the lines of the “Anti” set up as described in the book Street Smarts by Connors and Raschke where they use a seven period %K with a smoothing parameter of 4 and a 10 period %D.

    I can find stochastic in the proscreener programming guide but can’t see how I can utilise the %K and %D individually.

    Help in coding would be appreciated.

    #8761 quote
    Nicolas
    Keymaster
    Master

    Because the stochastic instruction return only %K, you just have to make a moving average of your stochastic indicator which is the %D.

    Like this :

    K = stochastic[14,3]
    D = average[4](K)
    
    RETURN K, D

    (this is an indicator), but you can get the K and D value in your screener if you like.

    #8784 quote
    SydneyFox
    Participant
    New

    Thank you Nicolas

    if I want say the %K today to be greater than %K yesterday and %D today to be less than %D yesterday can I write it like:

    %K > %K[1]
    %D < %D[1]

    Or would it be more like:

    K = stochastic(14,3)
    D = average(4)(K)
    KYday = stochastic[1](14,3)
    DYday = average(4)(KYday)
    K > KYday
    D < DYday

    Thanks

    #8816 quote
    Nicolas
    Keymaster
    Master

    No, it’s not so complicated 🙂

    You already have in your variable the %D and the %K values, so just compare theses variables between them:

    K = stochastic[14,3]
    D = average[4](K)
    
    if K>K[1] then 
     Kresult = 1 
    else
     Kresult = 0
    endif
    
    if D<D[1] then 
      Dresult = 1 
    else
      Dresult = 0
    endif
    #8817 quote
    SydneyFox
    Participant
    New

    Awesome. Thanks Nicolas.

    #20120 quote
    Brage
    Participant
    Senior

    Hi Sydney

    Just curious. Do you use the ANTI strategy in your trading? Have you tried to use it in an automatic trading system?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Stochastic %K and %D


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
SydneyFox @sydneyfox Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by Brage
9 years, 1 month ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 06/03/2016
Status: Active
Attachments: No files
Logo Logo
Loading...