Breakout intraday su pattern daily

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #196542 quote
    MinoP
    Participant
    New

    Vorrei entrare al superamento del massimo/minimo del giorno precedente su TF Daily, aggiungendo o sottraendo 10 ticks/pips, dal massimo/minimo precedente, dopo aver verificato la presenza del pattern di prezzo di mio interesse.

    Ho creato un TS, ma funziona alla chiusura della candela daily del giorno successivo, mentre io vorrei che operasse in intraday.

     

    Allego il TS da me creato,

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    Up5C = Close>Close[1] and Close[1]>Close[2] and Close[2]>Close[3] and Close[3]>Close[4]
    
    // Condizioni per entrare su posizioni long
    
    c1 = (close > Up5C)
    
    IF c1 THEN
    BUY 1 SHARES AT MARKET
    ENDIF
    
    // Condizioni per entrare su posizioni short
    
    Down5C = Close<Close[1] and Close[1]<Close[2] and Close[2]<Close[3] and Close[3]<Close[4]
    
    c2 = (close < Down5C)
    
    IF c2 THEN
    SELLSHORT 1 SHARES AT MARKET
    ENDIF
    
    // Stop e target
    SET STOP %LOSS 3
    SET TARGET %PROFIT 3
    

     

    grazie in anticipo.

    #196558 quote
    robertogozzi
    Moderator
    Master

    Prova questo modificato (il setup lo stabilisce sul Giornaliero, però puoi farlo girare intraday, 1 ora, 5 minuti, ecc…):

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    Timeframe(1 Day,UpdateOnClose)
    Up5C   = Close>Close[1] and Close[1]>Close[2] and Close[2]>Close[3] and Close[3]>Close[4]
    Down5C = Close<Close[1] and Close[1]<Close[2] and Close[2]<Close[3] and Close[3]<Close[4]
    
    Timeframe(default)
    // Condizioni per entrare su posizioni long
     
    c1 = (close > Up5C)
     
    IF c1 AND Not LongOnMarket THEN
    BUY 1 SHARES AT MARKET
    ENDIF
     
    // Condizioni per entrare su posizioni short
    
    c2 = (close < Down5C)
     
    IF c2 AND Not ShortOnmarket THEN
    SELLSHORT 1 SHARES AT MARKET
    ENDIF
     
    // Stop e target
    SET STOP %LOSS 3
    SET TARGET %PROFIT 3
    MinoP thanked this post
    #196562 quote
    MinoP
    Participant
    New

    Se volessi aggiungere un ulteriore filtro, entra al superamento del massimo del giorno prima + 10 ticks/pips o viceversa potrei aggiungere il codice di seguito?

    entrylong = high + 10*pipsize

    entryshort = low – 10*pipsize

    c1 = (entrylong > Up5C)

    c2 = (entryshort < Down5C)

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

Breakout intraday su pattern daily


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
MinoP @minop Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 07/01/2022
Status: Active
Attachments: No files
Logo Logo
Loading...