break out candela estesa

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #203376 quote
    Gabriele Battista
    Participant
    Senior

    Vorrei scrivere un trading system che entri long/short al break out di una candela estesa (esempio 35 punti) purchè avvenga nelle sole 2 candele successive. E’ possibile, grazie

    #203394 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    ONCE EntrataLong  = 0
    ONCE EntrataShort = 0
    ONCE Barra        = 0
    IF Barra > 0 THEN
       Barra = Barra + 1
       IF Barra > 2 THEN
          Barra = 0
       ENDIF
    ENDIF
    Estesa          = range >= 50 * PipSize   //almeno 35 punti
    IF Estesa THEN
       Barra        = 1
       EntrataLong  = high + 1 * PipSize
       EntrataShort = low  - 1 * PipSize
    ENDIF
    IF OnMarket THEN
       EntrataLong  = 0
       EntrataShort = 0
       Barra        = 0
    ENDIF
    IF Barra > 0 THEN
       BUY       1 CONTRACT AT EntrataLong  STOP
       SELLSHORT 1 CONTRACT AT EntrataShort STOP
    ENDIF
    SET STOP   pLOSS   100
    SET TARGET pPROFIT 300
    #203397 quote
    Gabriele Battista
    Participant
    Senior

    grazie lo provo

    #203472 quote
    Gabriele Battista
    Participant
    Senior

    Mi da errore.

    #203474 quote
    robertogozzi
    Moderator
    Master

    Vedo che non è formattato come il mio, penso sia incluso qualche carattere di controllo estraneo al codice.

    Importa il file ITF che allego.

    #203478 quote
    Gabriele Battista
    Participant
    Senior

    grazie ora non da più errore

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

break out candela estesa


ProOrder: Trading Automatico & Backtesting

New Reply
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 11/01/2022
Status: Active
Attachments: 1 files
Logo Logo
Loading...