Price change Indicator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #233134 quote
    swingforyoursupper
    Participant
    New

    Looked at the prorealcode archive but cant see a simple way to do the below

    Date 1: 24/05/2024

    Date 2 : 04/01/2024

    Indicator = % change in price between date 1 and Date 2

    Screener = Indicator > 30%

    Any suggestions please?

    #233139 quote
    Iván González
    Moderator
    Master

    It could be like this:

     

    startdate=20240104
    n=barssince(startdate=date)
    
    finaldate=20240520
    m=barssince(finaldate>=date)
    
    if m>0 and n>0 then
    spread=close[max(0,m-1)]-close[max(0,n)]
    indicator=spread/close[max(0,n)]*100
    endif
    
    screener[indicator>30](indicator as "%")
    JC_Bywan thanked this post
    #233141 quote
    JC_Bywan
    Moderator
    Master

    Hi,

    something like that? (to be used with “daily” selected in the screener window’s right side)

    date1=20240524
    date2=20240104
    if opendate=date1 then
    close1=close
    endif
    if opendate=date2 then
    close2=close
    endif
    indi=close1/close2-1
    selection= indi>0.3
    
    SCREENER[selection](indi as "indi")
    Iván González thanked this post
    #233142 quote
    JC_Bywan
    Moderator
    Master

    Ivan was faster, as Roberto says: “two replies better than one”

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

Price change Indicator


ProScreener: Market Scanners & Detection

New Reply
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by JC_Bywan
1 year, 9 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 05/28/2024
Status: Active
Attachments: No files
Logo Logo
Loading...