Overbought and Oversold Stochastic Screener

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #151469 quote
    sfjeelanisfjeelani
    Participant
    New

    Dear All

    Can someone please point me in the right direction on finding  Overbought and Oversold conditions for Stochastic indicator. I have just found stochastic and MACD crossover indicator, would be great if screener could pick overbought and oversold conditions for this.

    Stochastic MACD Oscillator

    Many thanks

    #151470 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go:

    LookBack = 20
    if barindex >= 26 then
       LL       = lowest[LookBack](low)
       HH       = highest[LookBack](high)
       StEMA12  = (Average[12,1](close) - LL) / (HH - LL)
       StEMA26  = (Average[26,1](close) - LL) / (HH - LL)
       StMACD   = (StEMA12 - StEMA26) * 100
       SigLine  = Average[9,1](StMACD)
       hhmacd   = max(sigline,max(hhmacd,stmacd))
       llmacd   = min(sigline,min(llmacd,stmacd))
       macdperc = ((stmacd-llmacd)/(hhmacd-llmacd))*100
       sigperc  = ((sigline-llmacd)/(hhmacd-llmacd))*100
    endif
    Result = 0
    IF macdperc >= 80 THEN            //OverBought
       Result = 1
    ELSIF macdperc <= 20 THEN         //OverSold
       Result = 2
    ENDIF
    SCREENER[Result](Result AS "1=Ob, 2=Os")
    #151479 quote
    sfjeelanisfjeelani
    Participant
    New

    Many thanks Roberto.

    When I run, it shows syntax error: This variable is not used in the code:sigperc

    Is there I am doing something wrong?

    #151481 quote
    VonasiVonasi
    Moderator
    Master

    Just delete line 12

Viewing 4 posts - 1 through 4 (of 4 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

Overbought and Oversold Stochastic Screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
sfjeelani @sfjeelani Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by VonasiVonasi
5 years, 9 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 11/25/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...