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
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
Vedo che non è formattato come il mio, penso sia incluso qualche carattere di controllo estraneo al codice.
Importa il file ITF che allego.
grazie ora non da più errore