Price above 200 MA for 5 months.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #201111 quote
    MaryMary
    Participant
    Average

    Hello,
    How do you describe a condition for Screener where you want to screen stocks whose Price is above 200 Moving Average for 5 months straight, not less, not more, Exactly  5 months?

    Thank you.

    #201131 quote
    NicolasNicolas
    Keymaster
    Legend

    You can code it like this, with a monthly timeframe that has sufficient history to compute a 200 period moving average:

    timeframe(monthly)
    c1 = summation[5](close>average[200])=5
    
    screener[c1]

    or you can also make it on a daily timeframe, to check for the last 100 days (which is roughly 5 months of trading days)

    timeframe(daily) 
    c1 = summation[100](close>average[200])=100 
    
    screener[c1]
    #201172 quote
    MaryMary
    Participant
    Average

    Thank you Nicolas!

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

Price above 200 MA for 5 months.


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Mary @mila Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by MaryMary
3 years, 12 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 09/20/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...