SCREENER CON ATR PER AZIONI

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #251207 quote
    massimogpmassimogp
    Participant
    Senior

    Buon giorno chiedevo uno screner daily che estragga azioni con i seguenti parametri:

    dalla prima candela daily del mese sommo o sottraggo il valore dell ATR (a 20 periodi) cosi da trovare un canale per andare long o short alla rottura.

    vorrei che mi estraesse i titoli che hanno raggiunto questa condizione di valore ATR in piu o in meno dalla chiusura daily primo gg del mese. Grazie.

    #251266 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Ecco:

    atr=averagetruerange[20](close)
    if openmonth<>openmonth[1] then
       checkLevelUp = close+atr
       checkLevelDn = close-atr
       firstUp=0
       firstDn=0
    endif
    
    if close crosses over checkLevelUp and firstUp=0 then
       firstUp=1
    elsif close crosses under checklevelDn and firstDn=0 then
       firstDn=1
    endif
    
    setupLong=firstUp and firstUp[1]=0
    setupShort=firstDn and firstDn[1]=0
    screener[setupLong or setupShort](setupLong as "Long",setupShort as "short")
    
    robertogozzi thanked this post
    #251271 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo:

    Cond = 0
    FOR i = 0 TO 31
       IF OpenMonth[i] <> OpenMonth[i + 1] THEN
          myATR     = AverageTrueRange[20](close[i])
          Apertura  = Open[i]
          BandaSup  = Apertura + myATR
          BandaInf  = Apertura - myATR
          IF (close[i] >= BandaSup) THEN
             Cond = 1
          ELSIF (close[i] <= BandaInf) THEN
             Cond = 2
          ENDIF
          break
       ENDIF
    NEXT
    SCREENER[Cond](Cond AS "1=Sup, 2=Inf")

    questo è un indicatore per vedere le bande sul grafico:

    myATR     = AverageTrueRange[20](close)
    Apertura  = Open
    BandaSup  = Apertura + myATR
    BandaInf  = Apertura - myATR
    RETURN BandaSup AS "Banda Superiore",BandaInf AS "Banda Inferiore"
    Iván González thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

SCREENER CON ATR PER AZIONI


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
massimogp @massimogp Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by robertogozzirobertogozzi
12 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 09/21/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...