Buongiorno,
vorrei testare questa strategia su H1
prendo come riferimento i massimi ed i minimi che il mio asset hanno registrato dalle 00:00 alle 08:00 del mattino ore Italiane, definendo cosi una sorta di box
se i prezzi effettuano il breakout dei massimi, per poi effettuare il break in degli stessi (può accadere anche durante la giornata, non c’è necessità che questo avvenga subito), si entra short e si hanno 3 target
target 1 50% dell’ampiezza del box
target 2 61,8% dell’ampiezza del box
target 3 100% dell’ampiezza del box
si entra quindi con 3 contratti che avranno inizialmente lo stop al 150% di ampiezza del box (quindi in questo caso di short scenario, il 50% dell’ampiezza del box proiettato in alto)
qualora si arrivasse a target 1 lo stop dei due contratti rimanenti deve essere spostato in pari
SCENARIO SPECULARE PER LO SHORT
mi piacerebbe anche mettere un filtro, se possibile:
il trade dovrebbe partire solo se il break in avviene con i prezzi che rientrano nel box per almeno 3 punti
grazie infinite
Con “SCENARIO SPECULARE PER LO SHORT” intendevi scrivere LONG ?
Si Sig.Roberto
chiedo scusa per l’errore
La strategia è intraday quindi se le condizioni non vengono soddisfatte, si passa al giorno successivo
Grazie infinite
Eccola (provata su DAX, h1):
IF Time = 000000 THEN
Massimo = high
Minimo = low
ENDIF
IF Time > 000000 AND Time <= 080000 THEN
Massimo = max(Massimo,high)
Minimo = min(Minimo,low)
BreakOutL = 0
BreakOutS = 0
RangeBox = Massimo - Minimo
TP1 = RangeBox * 0.5
TP2 = RangeBox * 0.618
TP3 = RangeBox
SL = RangeBox * 1.5
Offset = 3 * PipSize
ENDIF
IF Time >= 080000 AND Not OnMarket THEN
IF close CROSSES OVER Massimo THEN
BreakOutL = 1
BreakOutS = 0
ELSIF close CROSSES UNDER Minimo THEN
BreakOutL = 0
BreakOutS = 1
ENDIF
IF BreakOutL THEN
IF close < (Massimo - Offset) THEN
SELLSHORT 3 Contracts AT Market
SET STOP LOSS SL
SET TARGET PROFIT TP3
Exit1 = close - TP1
Exit2 = close - TP2
Exit3 = close - TP3
BreakEvenS = close
ENDIF
ENDIF
IF BreakOutS THEN
IF close > (Minimo + Offset) THEN
BUY 3 Contracts AT Market
SET STOP LOSS SL
SET TARGET PROFIT TP3
Exit1 = close + TP1
Exit2 = close + TP2
Exit3 = close + TP3
BreakEvenL = close
ENDIF
ENDIF
ENDIF
IF OnMarket AND Not OnMarket[1] THEN
IF LongOnMarket THEN
Exit1 = Tradeprice + TP1
Exit2 = Tradeprice + TP2
Exit3 = Tradeprice + TP3
BreakEvenL = Tradeprice
ELSIF ShortOnMarket THEN
Exit1 = Tradeprice - TP1
Exit2 = Tradeprice - TP2
Exit3 = Tradeprice - TP3
BreakEvenS = Tradeprice
ENDIF
ENDIF
Posizioni = abs(CountOfPosition)
IF LongOnMarket THEN
IF Posizioni = 3 THEN
SELL 1 Contract AT Exit1 LIMIT
SELL 1 Contract AT Exit2 LIMIT
SELL 1 Contract AT Exit3 LIMIT
ELSIF Posizioni = 2 THEN
SELL 1 Contract AT Exit2 LIMIT
SELL 1 Contract AT Exit3 LIMIT
IF close > BreakEvenL THEN
SELL AT BreakEvenL STOP
ELSE
SELL AT BreakEvenL LIMIT
ENDIF
ELSE
SELL 1 Contract AT Exit3 LIMIT
IF close > BreakEvenL THEN
SELL AT BreakEvenL STOP
ELSE
SELL AT BreakEvenL LIMIT
ENDIF
ENDIF
ELSIF ShortOnMarket THEN
IF Posizioni = 3 THEN
EXITSHORT 1 Contract AT Exit1 LIMIT
EXITSHORT 1 Contract AT Exit2 LIMIT
EXITSHORT 1 Contract AT Exit3 LIMIT
ELSIF Posizioni = 2 THEN
EXITSHORT 1 Contract AT Exit2 LIMIT
EXITSHORT 1 Contract AT Exit3 LIMIT
IF close < BreakEvenS THEN
EXITSHORT AT BreakEvenS STOP
ELSE
EXITSHORT AT BreakEvenS LIMIT
ENDIF
ELSE
EXITSHORT 1 Contract AT Exit3 LIMIT
IF close < BreakEvenS THEN
EXITSHORT AT BreakEvenS STOP
ELSE
EXITSHORT AT BreakEvenS LIMIT
ENDIF
ENDIF
ENDIF
//graph Posizioni
//graphonprice Tradeprice
//graphonprice Exit1 coloured(255,0,0,255)
//graphonprice Exit2 coloured(0,255,0,255)
//graphonprice Exit3 coloured(0,0,255,255)
//graphonprice Massimo coloured(255,0,255,255)
//graphonprice Minimo coloured(255,0,255,255)
Grazie Sig. Roberto,
è stato davvero molto gentile