5 Candle close above 50EMA screener

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #83604 quote
    Marcel van VlietMarcel van Vliet
    Participant
    Veteran

    Hi,

    I need some help with the attached screener because it seems not to work. It is intended that the screener select shares which the last five candles are closed above the 50EMA.

    Upper=exponentialaverage[50] 
    
    BaseCandle = 5
     
    Close0 = Close[BaseCandle]
    Close1 = Close[BaseCandle + 1]https://www.prorealcode.com/forum/prorealtime-english-forum/proscreener-support/#
    Close2 = Close[BaseCandle + 2]
    Close3 = Close[BaseCandle + 3]
    Close4 = Close[BaseCandle + 4]
    
    C1 = Close0>Upper and Close1>Upper and Close2>Upper and Close3>Upper and Close4>Upper
    
    Screener [ (C1) ]
    
    #83605 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    This works the same as above:

    Upper    = exponentialaverage[50] 
    LookBack = 5
    C1 = (summation[LookBack](close > Upper) = LookBack)
    Screener [C1]
    Marcel van Vliet thanked this post
    #83606 quote
    Marcel van VlietMarcel van Vliet
    Participant
    Veteran

    Thank you @robertogozzi,

    I have tried your suggestion and it worked, but not as I would like to. Your code generates a screen for more than the five last closes above the EMA.

    Do you have a suggestion for a of code that screens shares with the last five closes above the EMA only?

    Best regards

    Marcel van Vliet

    #83612 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Only 5 bars:

    Upper    = exponentialaverage[50] 
    LookBack = 5
    C1 = (summation[LookBack](close > Upper) = LookBack)
    IF C1 THEN
       IF C1[1] THEN
          C1 = 0
       ENDIF
    ENDIF
    Screener [C1]
    Marcel van Vliet thanked this post
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

5 Candle close above 50EMA screener


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
7 years, 10 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 10/27/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...