Dominant moving average

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #224115 quote
    marco7630
    Participant
    New

    Hi,

     

    A while ago you created this screener:

    timeframe(weekly)

    EMA21=ExponentialAverage[21](Close)

    C1=Summation[30](Close>EMA21)=30
    ATRpercent=100*(AverageTrueRange[14](close))/close
    c2 = ATRpercent>=3.5
    c3 = volume[1]>1000000
    c4 = close> 5
    test = c1 AND C2 AND C3 and c4

    screener[test]

    It shows all the stocks that have been above the EMA21 week for at least 30 weeks.

    Could you add the following:

    During the time that the stock is above the EMA21 the price should have touched the EMA21 at least 2 times (close obviously needs to be above EMA 21 all the time)

    Thanks a lot

     

    Gr Marco

    #224123 quote
    JC_Bywan
    Moderator
    Master
    timeframe(weekly)
    
    EMA21=ExponentialAverage[21](Close)
    
    C1=Summation[30](Close>EMA21)=30
    ATRpercent=100*(AverageTrueRange[14](close))/close
    c2 = ATRpercent>=3.5
    c3 = volume[1]>1000000
    c4 = close> 5
    
    c5= summation[30](low<EMA21)>=2
    
    test = c1 and c2 and c3 and c4 and c5
    
    screener[test]

     

    Moved from proorder (automatic strategies) to proscreener (screeners)  forum.

    List of all forums (scrolling down to access appropriate language group of forums):

    https://www.prorealcode.com/forums/

    Location of English ProScreener forum:

    https://www.prorealcode.com/forum/prorealtime-english-forum/proscreener-support/

    #224447 quote
    marco7630
    Participant
    New

    Hi @js,

    Could you help me with this one? Thanks

     

    gr Marco

    #224470 quote
    JC_Bywan
    Moderator
    Master

    What kind of issue was there with the code proposed above?

    I don’t mind if you didn’t like my code proposal and/or if you prefer someone else to volunteer free time to assist (and JS is a good choice, we consider him very capable and very helpful), but at least, for the next guy if not for me, feedback on what kind of error you had with the code proposed would surely be welcome before proposing something else?

    #224496 quote
    marco7630
    Participant
    New

    Hi,

     

    There was no problem with the code. I only want the following to be added:

    During the time that the stock is above the EMA21 the price should have touched the EMA21 at least 2 times (close obviously needs to be above EMA 21 all the time)

    Thanks a lot

     

    gr Marco

    #224513 quote
    JS
    Participant
    Veteran

    Hi Marco,

    The condition you want to add is already in the code under c5…

    C5=Summation[30](Low<EMA21)>=2

    Loosely translated: over the last 30 weeks, the “Low” has closed below the EMA21 at least twice… (only the Low and not the Close)

    #224521 quote
    marco7630
    Participant
    New
    Thanks
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Dominant moving average


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
marco7630 @marco7630 Participant
Summary

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

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 11/22/2023
Status: Active
Attachments: No files
Logo Logo
Loading...