Ciao,
Ecco il sistema da qui come ti dicevo prima vorrei evitare una volta arrivato a target di rientrare subito nelle barre successive.
Grazie
Mauro
// THIS SIMPLE STRATEGY CATCH PROFIT BY UNIVERSAL INDICATOR
// IG MARKET GERMANY CASH 1 EUR MINI – SPREAD 1 – 15 M
DEFPARAM CumulateOrders = FALSE
DEFPARAM FlatBefore = 080000
DEFPARAM FlatAfter = 212900
if (time >=080000 and time < 110000) or (time >= 134500 and time <181400) then
if onmarket[1]=1 and onmarket=0 then
start = barindex
endif
condition = barindex-start>=5
indicator1, ignored = CALL “BLUSTER DAX”
c1 = (indicator1 >= 1)
IF c1 AND CurrentDayOfWeek <> 1 AND CONDITION THEN
BUY 1 CONTRACT AT MARKET
ENDIF
indicator2, ignored = CALL “BLUSTER DAX”
c2 = (indicator2 <= -1)
IF c2 THEN
SELL AT MARKET
ENDIF
indicator3, ignored = CALL “BLUSTER DAX”
c3 = (indicator3 <= -1)
IF c3 AND CurrentDayOfWeek <> 1 AND CONDITION THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
indicator4, ignored = CALL “BLUSTER DAX”
c4 = (indicator4 >= 1)
IF c4 THEN
EXITSHORT AT MARKET
ENDIF
// TRAILING STOP LOGIK BY KENNETH KVISTAD MODIFIED FOR LONG AND SHORT POSITION
TGL =47
TGS= 41
if not onmarket then
MAXPRICE = 0
MINPRICE = close
PREZZOUSCITA = 0
ENDIF
if longonmarket then
MAXPRICE = MAX(MAXPRICE,close)
if MAXPRICE-tradeprice(1)>=TGL*pointsize then
PREZZOUSCITA = MAXPRICE-TGL*pointsize
ENDIF
ENDIF
if shortonmarket then
MINPRICE = MIN(MINPRICE,close)
if tradeprice(1)-MINPRICE>=TGS*pointsize then
PREZZOUSCITA = MINPRICE+TGS*pointsize
ENDIF
ENDIF
if onmarket and PREZZOUSCITA>0 then
EXITSHORT AT PREZZOUSCITA STOP
SELL AT PREZZOUSCITA STOP
ENDIF
SET STOP PLOSS 70
SET TARGET PPROFIT 87
ENDIF
// REGARDS ALE