// Condizioni per entrare su posizioni long
DEFPARAM cumulateorders = false
ma1 = ExponentialAverage[breve](totalprice)
ma2 = ExponentialAverage[lungo](totalprice)
ma01 = Average[breve](totalprice)
ma02 = Average[lungo](totalprice)
// dummy = 1 per EMA veloci, = 0 per SMA
IF dummy = 1 and NOT LongOnMarket AND ma1 crosses over ma2 THEN
BUY 20000 CASH AT MARKET
elsif dummy = 0 and NOT LongOnMarket AND ma01 crosses over ma02 THEN
BUY 20000 CASH AT MARKET
ENDIF
if longonmarket and dummy = 1 and ma1 crosses under ma2 then
sell at market
elsif longonmarket and dummy = 0 and ma01 crosses under ma02 then
sell at market
endif
graphonprice ma1 coloured(0,51,153) as “media veloce EMA”
graphonprice ma2 coloured(255,77,6) as “media lunga EMA”
graphonprice ma01 coloured(0,71,171) as “media veloce SMA” // blu cobalto
graphonprice ma1 coloured(55, 165, 0) as “media lunga SMA” // arancione
**VARIABLES : breve 10 – 80 step 5 – lungo 20,220 passo 10 – dummy 0,1 step 1

BACKTEST su 5000 barre 0,3% commissione 20 Ek fissi – FREE
(2Ema o 2Sma ott), 25 march 2025
TEXAS INSTRUMENTS
guadangno +319%
max drawdonwns 10%
runup 417%
Coppie dummy = 0 80,130 75,110 80,140
CREDEM
guadangno +257%
max drawdonwns 29%
runup 210%
dummy = 0 10,200 70,200 10,190
FINECOBANK
guadangno +277%
max drawdonwns 28%
runup 160%
dummy = 0 20,90 35,40 25,50
ZALANDO
guadangno +213%-426%
max drawdonwns 25%
runup 220%
dummy = 0 75,70 75,60 25,40
DANIELI
guadangno +1787
max drawdonwns 31%
runup 1213%
dummy = 1 10,190 10,200 15,190
1MICROSOFT
guadangno +437%
max drawdonwns 18%
runup 250%
dummy = 0 40,200 e 0 70, 180 e d= 1 40,90
.ITF file




