Add 200sma to screener

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #245903 quote
    segiesegie
    Participant
    Senior
    REM Compute a simple moving average on the last 1 day
    ma1 = AVERAGE[1]
     
    REM Compute a simple moving average on the last 20 days
    ma20 = AVERAGE[20]
     
    REM Compute the differential speed between the short and the long moving average
    speed = MOMENTUM(ma20-ma1) * 100 / CLOSE
     
    REM Select all the currencies on which that crossing over has just occured
    IF ma1 CROSSES OVER ma20 THEN
    SCREENER (speed AS "Speed")
    ENDIF

    Hi,

    How can I add this condition:

    Price must also be trading over the 200 day simple moving average.

    Thanks,

    Segie

    #245909 quote
    JSJS
    Participant
    Master

    Hi,

    Ma1=Average[1] is the same as “Close”…

    You can’t use the “Momentum” instruction like that…

     https://www.prorealcode.com/documentation/momentum/

    This “screener” checks if the “Close” crosses over MA20 and that the “Close” is also higher than MA200…

    MA1=Average[1](Close) // MA1=Close
    MA20=Average[20](Close)
    MA200=Average[200](Close)
    
    PctDifference=(MA1-MA20)/Close*100
    C1=PctDifference crosses over 0
    C2=Close > MA200
    
    Screener[C1 and C2]
    
    segie thanked this post
    Scherm­afbeelding-2025-04-15-om-12.39.19.jpg Scherm­afbeelding-2025-04-15-om-12.39.19.jpg
    #245936 quote
    segiesegie
    Participant
    Senior
    Thank you
    JS thanked this post
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

Add 200sma to screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
segie @segie Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by segiesegie
1 year, 5 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 04/15/2025
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...