CREAZIONE CODICI PER NUMERO DI CANDELE CONSECUTIVE

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26438 quote
    CriistianCriistian
    Participant
    New

    Ciao a tutti,

    Avrei bisogno due codici per proscreener che mi avvisino in base al numero di candele consecutive verdi e rosse, con la possibilità di poter modificare a mio piacimento il numero di candele consecutive, esempio: 7 verdi consecutive o 10 o 12 e cosi via.

    Ci ho provato parecchie volte ma non ci sono mai riuscito, spero che ci sia qualcuno che possa aiutarmi con questi due codici.

    Grazie mille. 🙂

    #26668 quote
    NicolasNicolas
    Keymaster
    Legend

    Per recuperare quanto le candele consecutive dello stesso colore si è verificato, diciamo, negli ultimi 10 periodi, è possibile utilizzare questo tipo di FOR / NEXT ciclo continuo:

    //find how much red candlesticks in the last previous X bars 
    
    X = 20
    
    count=0 
    for i = 0 to X do 
     if close[i]<Open[i] then 
      count=count+1
     else
      break
     endif
    next
    
    RETURN count

    Questo codice trovare solo quanto i candelabri ribassista è accaduto nella stessa riga. Si tratta di un indicatore di mostrarvi come funziona. Spero che ti aiuta.

    #26673 quote
    CriistianCriistian
    Participant
    New

    Grazie Nicolas,

    Ma ho bisogno un proscreener che mi avvisi quando si sono verificate esempio 5 candele o più, a mia scelta, ho provato a creare questo codice ma non funziona bene, c’è qualcosa di sbagliato e quindi non fa la sua funzione.

    if Range[0]<Range[1] AND Range[0]<Range[2] AND Range[0]<Range[3] AND Range[0]<Range[4] AND Range[0]<Range[5] AND Range[0]<Range[6] AND Range[0]<Range[7] AND high[0]>high[1] AND high[1]>high[2] AND high[2]>high[3] AND high[3]>high[4] AND high[4]>high[5] AND high[5]>high[6] AND high[6]>high[7]then
    Cond =1
    else
    Cond=0
    endif
    
    SCREENER [Cond](Cond as "CANDELSTICKCALL")

     

    riesci a capire dove sbaglio  ?

    #26675 quote
    NicolasNicolas
    Keymaster
    Legend

    Non capisco il motivo per cui si sta confrontando “range” di candela, che è solo correlata alle loro dimensioni, non la loro direzione.
    Quindi, per ottenere un vagliatore che trova la condizione su 5 candelieri rossi nella stessa riga, questo è il codice corretto:

    c = summation[5](close<open)=5
    
    screener [c]
    #26678 quote
    CriistianCriistian
    Participant
    New

    haahahahah non lo so il perché Nicolas 🙂

    ho solo preso pezzi di altri proscreener e cercato di far qualcosa :)))

    funziona, ti ringrazio moltissimo, senza te non saprei come avrei potuto averlo :))))

    grazie ancora !

Viewing 5 posts - 1 through 5 (of 5 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

CREAZIONE CODICI PER NUMERO DI CANDELE CONSECUTIVE


ProScreener: Scansione Mercati & Screener

New Reply
Author
author-avatar
Criistian @criistian Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by CriistianCriistian
9 years, 6 months ago.

Topic Details
Forum: ProScreener: Scansione Mercati & Screener
Language: Italian
Started: 02/26/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...