Prezzo di apertura di un certo giorno

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #232726 quote
    Stefano1234
    Participant
    Average

    Buongiorno,

    vorrei selezionare azioni con variazioni maggiori di una certa percentuale da una certa data.

    Ad esempio da inizio anno ad oggi.

    Qualcosa nel seguente codice è errato.

    If day =2 and month = 1 and year = 2024 then
    apertura = open
    endif
    
    c1 = (close - apertura) *100 / apertura
    
    c2 = c1 > 10
    
    SCREENER[c2]
    #232753 quote
    Iván González
    Moderator
    Master

    Ciao. Ecco un esempio:

    startdate = 20240102
    n=0
    if IsLastBarUpdate then
    for i=0 to 250 Do
    if date[i]>startdate then
    n=n+1
    endif
    next
    endif
    performance=(close-close[max(0,n)])/close[max(0,n)]*100
    
    SCREENER[performance>10 and barindex>n](performance as "Perf%")
    #232755 quote
    Stefano1234
    Participant
    Average

    Grazie Iván

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

Prezzo di apertura di un certo giorno


ProScreener: Scansione Mercati & Screener

New Reply
Author
Summary

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

Topic Details
Forum: ProScreener: Scansione Mercati & Screener
Language: Italian
Started: 05/16/2024
Status: Active
Attachments: No files
Logo Logo
Loading...