Daily averages and stoch

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #215772 quote
    marco7630
    Participant
    New
    Hi,
    Can you help me with following.
    I would like to see on a daily timeframe all the assets that meet the following requirements:
    1. The SMA3, SMA6, SMA9 and EMA20 are ALL green (positive) on the current day candle
    2. At least one of the above SMA’s was red (negative) yesterday
    3. The stoch RSI14 should be above 80 on the current candle OR it should be greater than 50 and increased by at least 25 compared to yesterday
    4. The average daily volume over last 7 days has to be above 1 million
    5. The price needs to be above 10 usd
    6. The bolinger bandwidth (20 2) needs to be above 0.1
    Thanks
    gr Marco
    #215777 quote
    JC_Bywan
    Moderator
    Master

    Hello,

    To be tested:

    sma3 = Average[3](close)
    sma6 = Average[6](close)
    sma9 = Average[9](close)
    ema20= ExponentialAverage[20](close)
    
    myRSI = RSI[14](close)
    MinRSI = lowest[14](myrsi)
    MaxRSI = highest[14](myrsi)
    StochRSI = (myRSI-MinRSI)/(MaxRSI-MinRSI)
    StochRSIK = average[3](StochRSI)*100
    
    c1 = sma3>=sma3[1] and sma6>=sma6[1] and sma9>=sma9[1] and ema20>=ema20[1]
    c2 = sma3[1]<sma3[2] or sma6[1]<sma6[2] or sma9[1]<sma9[2]
    c3 = StochRSIK>80 or (StochRSIK>50 and (StochRSIK-StochRSIK[1])>25)
    c4 = Average[7](volume)>1000000
    c5 = close>10
    c6 = BollingerBandWidth[20](close)>0.1
    
    condition = c1 AND c2 AND c3 AND c4 AND c5 AND c6
    
    SCREENER[condition]
    #215812 quote
    JC_Bywan
    Moderator
    Master

    I forgot to add I took a smoothing of 3 for your stoch rsi as you only specified a length of 14. If you want a smoothing of 5 for example, it needs to be applied in line 10 as replacement of the [3]:

    StochRSIK = average[5](StochRSI)*100

    #215815 quote
    marco7630
    Participant
    New

    Thanks JC

    #215954 quote
    marco7630
    Participant
    New

    Hi JC,

     

    Could you change the code so it fits the following:

    Hi,

    Can you help me with following.
    I would like to see on a daily timeframe all the assets that meet the following requirements:

    The SMA3, SMA6 and EMA20 are ALL green (positive) on the current day candle

    At least one of the above SMA’s was red (negative) yesterday

    The stoch RSI14 should have increased by at least 25 compared to yesterday

    The average daily volume over last 7 days has to be above 1 million

    The price needs to be above 10 usd

    The bolinger bandwidth (20 2) needs to be above 0.1

     

    Thanks for all the great work you are doing. If i can place a great review for you somewhere i am happy to do it.

    gr Marco

    #215972 quote
    JC_Bywan
    Moderator
    Master

    Hi, thanks,

    OK, so in summary if I have spotted all the differences: getting rid of sma9 (impact c1 and c2), and a more simple stoch rsi14 condition (impact c3). It would give the following:

    sma3 = Average[3](close)
    sma6 = Average[6](close)
    ema20= ExponentialAverage[20](close)
    
    myRSI = RSI[14](close)
    MinRSI = lowest[14](myrsi)
    MaxRSI = highest[14](myrsi)
    StochRSI = (myRSI-MinRSI)/(MaxRSI-MinRSI)
    StochRSIK = average[3](StochRSI)*100
    
    c1 = sma3>=sma3[1] and sma6>=sma6[1] and ema20>=ema20[1]
    c2 = sma3[1]<sma3[2] or sma6[1]<sma6[2]
    c3 = StochRSIK-StochRSIK[1])>25
    c4 = Average[7](volume)>1000000
    c5 = close>10
    c6 = BollingerBandWidth[20](close)>0.1
    
    condition = c1 AND c2 AND c3 AND c4 AND c5 AND c6
    
    SCREENER[condition]
    #216006 quote
    marco7630
    Participant
    New

    Hi JC,

     

    I get the message in attachment.

     

    gr Marco

    2023-06-12_16-14-01.png 2023-06-12_16-14-01.png
    #216008 quote
    marco7630
    Participant
    New

    already solved it:-)

    #216013 quote
    JC_Bywan
    Moderator
    Master

    Sorry, yes the closing bracket ) should have been deleted and line 13 should have been:

    c3 = StochRSIKStochRSIK[1]>25

    #216017 quote
    marco7630
    Participant
    New

    Hi JC,

     

    It does not seem to work. Take stock: LSCC as an example. Stoch has increased by more than 30 points compared to yesterday and all the SMA’s are green. However, it does not come up in screener.

     

    gr Marco

    #216019 quote
    JC_Bywan
    Moderator
    Master

    Free end of day account?

    #216025 quote
    marco7630
    Participant
    New

    Sorry, do not understand you

    #216032 quote
    JC_Bywan
    Moderator
    Master

    If your PRT account is free, with only daily or above TF, your screener is not “real time”, today’s data is only available from next session’s open, so usually when someone is asking for a screener on daily timeframe and a stock seems to not match in scrrener behaviour observed on today’s chart, first thing to check is the account type: free with a one session delay for screener results, or real-time.

    #216113 quote
    marco7630
    Participant
    New

    Hi JC,

     

    What line of code do i need to add if i only want to see the following assets:

    • The ATR percentage (ATR/Closing Price) needs to be between 3 and 5%

     

    gr Marco

    #216114 quote
    marco7630
    Participant
    New

    I have a realtime account by the way

Viewing 15 posts - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.

Daily averages and stoch


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
marco7630 @marco7630 Participant
Summary

This topic contains 19 replies,
has 2 voices, and was last updated by JC_Bywan
2 years, 8 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 06/07/2023
Status: Active
Attachments: 2 files
Logo Logo
Loading...