Scan on specific date

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #90936 quote
    prevailution
    Participant
    Junior

    Hi,

    I have put in a code for the proscreener that gives live data, or results for end of day scan.

    Am I able to specify the scan to stop at a certain date and see scan results for previous days?

    #91036 quote
    Nicolas
    Keymaster
    Master

    Yes of course, you can base your conditions with any of the date&time instructions: https://www.prorealcode.com/documentation/category/dateandtime/

    #91058 quote
    prevailution
    Participant
    Junior

    Thank you for there reply. Sorry I am very new to coding and keep getting syntax error adding the date.

    I want to add Date[N] to this scan

    ONCE Periods = 20             //last 20 bars
    ONCE PerCent = Periods * 0.9  //90% of times on the rise
    ONCE RsiNum  = 14
    MyRsi = rsi[RsiNum](close)
    SCREENER[summation[Periods](MyRsi > MyRsi[1]) >= PerCent]
    

    How would I do this?

    #91081 quote
    Nicolas
    Keymaster
    Master

    So you want to know if this condition:

    summation[Periods](MyRsi > MyRsi[1]) >= PerCent

     
    was true at a specific date only?

    #91091 quote
    prevailution
    Participant
    Junior

    Yes I would like to search by date, all stocks that had RSI rising for 20 periods 90% of the time.

    Basically scan for January 6th for example which stocks met this condition at the end of day

    Are you able to add a “search by date” code within the scan?

    #91300 quote
    Nicolas
    Keymaster
    Master

    I think that it would work correctly with the below code:

    ONCE Periods = 20             //last 20 bars
    ONCE PerCent = Periods * 0.9  //90% of times on the rise
    ONCE RsiNum  = 14
    MyRsi = rsi[RsiNum](close)
    
    idate = 20190106
    
    if summation[Periods](MyRsi > MyRsi[1]) >= PerCent and date=idate then 
    test=1
    endif
    
    
    SCREENER[test]

    Change “idate” with the date of your choice in YYYYMMDD format.

    #91461 quote
    prevailution
    Participant
    Junior

    I think that it would work correctly with the below code:

    Change “idate” with the date of your choice in YYYYMMDD format.

    Yes that’s perfect! Thank you so much!

    #91511 quote
    prevailution
    Participant
    Junior

    I think that it would work correctly with the below code:

    Change “idate” with the date of your choice in YYYYMMDD format.

    Nicolas one last thing, are you able to add a volume parameter in this code?

    Such that I can input a minimum volume number to filter out the low volume stocks?

    #91618 quote
    Nicolas
    Keymaster
    Master

    Sure, here it is: (adjust the minVolume setting, default is set to 1M)

    ONCE Periods = 20             //last 20 bars
    ONCE PerCent = Periods * 0.9  //90% of times on the rise
    ONCE RsiNum  = 14
    MyRsi = rsi[RsiNum](close)
    idate = 20190106
    minVolume = 1000000
    
    if summation[Periods](MyRsi > MyRsi[1]) >= PerCent and date=idate and volume>minVolume then 
    test=1
    endif
    
    
    SCREENER[test]
    prevailution thanked this post
    #91621 quote
    prevailution
    Participant
    Junior

    Sure, here it is: (adjust the minVolume setting, default is set to 1M)

    Great, thanks so much Nicolas

    #91642 quote
    Vonasi
    Moderator
    Master

    prevailution – please don’t hit the ‘Quote’ button for every reply – especially if there is code in the post that you are quoting! Quoting is only necessary if you want to highlight one particular part of someone’s reply that you are responding to or if there are several people in a conversation and you want to show exactly who you are answering. Do this by highlighting the section of interest and then click on ‘Quote’. It is rarely necessary to quote someone’s whole post including their own code back to them – especially in a conversation between only two people! 🙂

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

Scan on specific date


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

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

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 02/09/2019
Status: Active
Attachments: No files
Logo Logo
Loading...