Indicatore Reversal poin in Screener

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #76733 quote
    Gianluca
    Participant
    Master

    Ciao ho provato a trasformare l’indicatore reversal point presente nel database in screener, ma quando provo a lanciarlo non mi segnala mai nessun titolo, ho fatto qualche errore nell’impostare lo screener?

     

    ONCE SEGNALE = 0
    sto = stochastic[8,3]
    
    c1 = close[1]<open[1] and close>open
    c2 = close>open[1]
    c3 = lowest[3](low)<lowest[50](low)[1] or lowest[3](low)<lowest[50](low)[2] or lowest[3](low)<lowest[50](low)[3]
    c4 = summation[3](sto<20)>0
    long = c1 and c2 and c3 and c4
    
    if long then
    SEGNALE=1
    ELSE
    SEGNALE=0
    endif
    
    // SHORT
    //Green/Red candle (reversal)
    //Bearish candle close below the close of the previous green candle
    //Space to the left (the high of the last 3 candles higher than the high of the last 50 candles)
    //default stochastic (8,3,3) was in the overbought area within the last 3 candles.
    
    c5 = close[1]>open[1] and close<open
    c6 = close<open[1]
    c7 = highest[3](high)>highest[50](high)[1] or highest[3](high)>highest[50](high)[2] or highest[3](high)>highest[50](high)[3]
    c8 = summation[3](sto>80)>0
    short = c5 and c6 and c7 and c8
    
    if short then
    SEGNALE=-1
    ELSE
    SEGNALE=0
    endif
    
    SCREENER [SEGNALE] (SEGNALE as "result")
    #76740 quote
    robertogozzi
    Moderator
    Master

    Prova a togliere la riga 1, ONCE a volte da problemi a ProScreener.

    #76765 quote
    Gianluca
    Participant
    Master

    Prova a togliere la riga 1, ONCE a volte da problemi a ProScreener.

    Niente da fare, come si puo’ fare a scrivere allo screener se la condizione si è verificata nelle ultime tot barre per esempio?

    #76782 quote
    robertogozzi
    Moderator
    Master

    Puoi chiarirmi quali sono le condizioni, capisco le righe 4-5 e 22-23, ma non capisco bene la 6 e la 24.

    Intanto cerco di togliere le cose ridondanti, che tra l’altro rallentano l’esecuzione, alle righe 6 e 24, creo una riga in più ma è più leggibile

    PiuBasso = lowest[3](low)
    c3 = PiuBasso<lowest[50](low)[1] or PiuBasso<lowest[50](low)[2] or PiuBasso<lowest[50](low)[3]
    
    PiuAlto = highest[3](high)
    c7 = PiuAlto>highest[50](high)[1] or PiuAlto>highest[50](high)[2] or PiuAlto>highest[50](high)[3]
    

    Capisco che per le condizioni C3 e C7 vai a ricercare il più basso/alto delle ultime 50 barre, ma perché indicare [1], [2] e [3] ?

    #77577 quote
    Gianluca
    Participant
    Master

    Non so risponderti, bisognerebbe chiedere a chi ha fatto l’indicatore: https://www.prorealcode.com/prorealtime-indicators/reversal-point-indicator/

    #77581 quote
    robertogozzi
    Moderator
    Master

    Bene, aspettiamo la risposta.


    @Nicolas
    , se la linea 10 dell’indicatore https://www.prorealcode.com/prorealtime-indicators/reversal-point-indicator/ significa

                                   “//Space to the left (the lowEST of the last 3 candles lower than the low of the PREVIOUS last 50 candles)

    allora la riga 17 dovrebbe essere scritta così:

    c3 = highest[3](low) < lowest[50](low[3])

    e la riga 33:

    c7 = lowest[3](high) > highest[50](high[3])

    no?

    Il risultato delle modifiche è nel grafico 2 della foto allegata.

    Grazie.

    x-5.jpg x-5.jpg
    #77587 quote
    robertogozzi
    Moderator
    Master

    Comunque Gianluca, il problema nel tuo codice è alle righe 10-14 e 28-32.

    Togli le righe 10-14 e sostituisci le righe 28-32 con queste:

    if long then
       SEGNALE=1
    elsif short then
       SEGNALE=-1
    ELSE
       SEGNALE=0
    endif

    Quando Nicolas risponderà vedremo se l’indicatore va modificato o meno, ma non riguarda direttamente il tuo problema.

    #77610 quote
    Nicolas
    Keymaster
    Master

    Confermo che il codice della riga condition3 (c3) è corretto come per il codice originale. Il minimo più basso degli ultimi 3 periodi è inferiore a quello dei 50 periodi.

    robertogozzi thanked this post
    #77617 quote
    robertogozzi
    Moderator
    Master

    Questa era la mia interpretazione (errata).

    x-6.jpg x-6.jpg
    #78007 quote
    Gianluca
    Participant
    Master

    Ho provveduto a modificarlo @Roberto, grazie sempre per la tua disponibilita’ e grazie sempre anche a @Nicolas.
    Ecco il codice, pero’ vedo che continua a non restituirmi mai alcun risultato:

    ONCE SEGNALE = 0
    sto = stochastic[8,3]
    
    c1 = close[1]<open[1] and close>open
    c2 = close>open[1]
    c3 = lowest[3](low)<lowest[50](low)[1] or lowest[3](low)<lowest[50](low)[2] or lowest[3](low)<lowest[50](low)[3]
    c4 = summation[3](sto<20)>0
    long = c1 and c2 and c3 and c4
    // SHORT
    //Green/Red candle (reversal)
    //Bearish candle close below the close of the previous green candle
    //Space to the left (the high of the last 3 candles higher than the high of the last 50 candles)
    //default stochastic (8,3,3) was in the overbought area within the last 3 candles.
    c5 = close[1]>open[1] and close<open
    c6 = close<open[1]
    c7 = highest[3](high)>highest[50](high)[1] or highest[3](high)>highest[50](high)[2] or highest[3](high)>highest[50](high)[3]
    c8 = summation[3](sto>80)>0
    short = c5 and c6 and c7 and c8
    
    
    if long then
    SEGNALE=1
    elsif short then
    SEGNALE=-1
    ELSE
    SEGNALE=0
    endif
    
    SCREENER [SEGNALE] (SEGNALE as "result")
    #78009 quote
    robertogozzi
    Moderator
    Master

    Prova a togliere (comnentandola) la riga 29 e sostituiscila con:

    Return SEGNALE

    in questo modo lo trasformi in indicatore, così lo metti sotto il grafico e vedi che segnali ti da, se te ne darà…. perché potrebbero anche non essercene o essercene pochi.

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

Indicatore Reversal poin in Screener


ProScreener: Scansione Mercati & Screener

New Reply
Author
author-avatar
Gianluca @altares Participant
Summary

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

Topic Details
Forum: ProScreener: Scansione Mercati & Screener
Language: Italian
Started: 07/25/2018
Status: Active
Attachments: 2 files
Logo Logo
Loading...