Chiusura Candela Ultimo Pattern

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #170921 quote
    byT77
    Participant
    New

    Buongiorno,

    Necessito del vostro cortese supporto.

    Vorrei inserire nel mio ProScreener la traduzione in codice di una strategia.

    Esempio:

    CandleA = Close[1] > Open[1]

    CandleB= Close[2] > Open[2]

    Pattern = CandleA and CandleB

    LivelloOrdini = Close[CandleA]

    A questo punto vorrei chiedergli, identifica il Pattern e avvisami quando Close[0] > LivelloOrdini

    Ho provato con questo codice per identificare il pattern, ma vorrei integrarlo con l’ultima voce. Cioè il LivelloOrdini.

     

    ONCE LastPattern1 = Pattern

    IF LastPattern1 then
    LastPattern1 = Barindex
    Endif

    #170923 quote
    robertogozzi
    Moderator
    Legend
    LivelloOrdini = Close[CandleA]

    non va bene, in quanto CandleA ha un valore booleano (logico) 0 o 1. Se ha valore 0 prende il valore corrente, se 1 il valore della candela precedente.
    Non capico bene cosa tu voglia fare, hai scritto delle righe con CandleA, CandleB e LivelloOrdini, poi nell’ultimo codice non ce n’è traccia.
    Se puoi chiarire meglio quello che vuoi fare forse posso aiutarti.

    #170928 quote
    byT77
    Participant
    New

    Semplifico 🙂

    In realtà vorrei che ad ogni volta che si crea un patter, come illustrato nell’immagine, la Chiusura della CandleA venga identificato come livello o valore fisso.

    Questo per ogni volta che si generi un pattern simile.

    Spero di essermi spiegato meglio

    Pattern.jpg Pattern.jpg
    #170949 quote
    robertogozzi
    Moderator
    Legend

    Eccolo, ti segnala il livello desiderato (non l’ho provato):

    CandleA = Close[1] > Open[1]
    CandleB = Close[2] > Open[2]
    Pattern = CandleA AND CamdleB
    LivelloOrdini = 0
    IF Pattern THEN
       LivelloOrdini = close[1]
    ENDIF
    SCREENER[Pattern](LivelloOrdini AS "Livello")
    
    #170964 quote
    byT77
    Participant
    New

    Grazie mille, davvero gentile.

    Buon proseguimento

    #170967 quote
    byT77
    Participant
    New

    Ho testato il codice riportando qualche modifica, funziona alla grande.

    Grazie ancora.
    1
    2
    3
    4
    5
    6
    7
    8
    CandleA = Close[1] > Open[1]
    CandleB = Close[2] > Open[2]
    Pattern = CandleA AND CamdleB
    LivelloOrdini = 0
    IF Pattern THEN
    LivelloOrdini = close[1]
    ENDIF
    C1 = Close[0] > LivelloOrdini
    SCREENER[C1]
    robertogozzi thanked this post
Viewing 6 posts - 1 through 6 (of 6 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

Chiusura Candela Ultimo Pattern


ProScreener: Scansione Mercati & Screener

New Reply
Author
author-avatar
byT77 @byt77 Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by byT77
5 years, 3 months ago.

Topic Details
Forum: ProScreener: Scansione Mercati & Screener
Language: Italian
Started: 06/01/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...