REM// Parametri indicatori
x=ExponentialAverage[13](close)
y=ExponentialAverage[17](close)
w=WeightedAverage[48](close)
z=SmoothedStochastic[17,8](close)
// Condizioni per entrare su posizioni long
c1 = (x CROSSES OVER y[1])
c2 = (z <= 51)
indicator1 = Adx[11]
c3 = (indicator1 >= 26)
c4 = (close > w[1])
indicator2 = WeightedAverage[20](z)
c11 = (z > indicator2[1])
IF time >090000 and time <200000 and c1 AND c2 AND c3 AND c4 and c11 THEN
BUY 1 CONTRACT AT MARKET
SET STOP PLOSS 56
long=0
ENDIF
if longonmarket then
if long=0 and close > close[1] then
long=1
mylongstop=low-2*pointsize
endif
if long=1 then
if close > close[1] then
mylongstop=low-2*pointsize
endif
sell at mylongstop stop
endif
endif
// Condizioni per uscire da posizioni long
c5 = (x CROSSES UNDER y)
IF c5 THEN
SELL AT MARKET
ELSE
SET TARGET PPROFIT 118
ENDIF
// Condizioni per entrare su posizioni short
c6 = (x CROSSES UNDER y[1])
c7 = (z >= 51)
c8 = (indicator1 >= 26)
c9 = (close < w[1])
c12 = (z < indicator2[1])
IF time >090000 and time <200000 and c6 AND c7 AND c8 AND c9 and c12 THEN
SELLSHORT 1 CONTRACT AT MARKET
SET STOP PLOSS 56
short=0
ENDIF
if shortonmarket then
if short=0 and close < close[1] then
short=1
myshortstop=high+2*pointsize
endif
if short=1 then
if close < close[1] then
myshortstop=high+2*pointsize
endif
exitshort at myshortstop stop
endif
endif
// Condizioni per uscire da posizioni short
c10 = (x CROSSES OVER y)
IF c10 THEN
EXITSHORT AT MARKET
ELSE
SET TARGET PPROFIT 132
ENDIF