Once Conto = 0
If IntraDayBarIndex = 0 then
Conto = 0
Endif
If STRATEGYPROFIT < STRATEGYPROFIT [ 1 ] then
Conto = Conto + 1
Elsif STRATEGYPROFIT > STRATEGYPROFIT [ 1 ] and Conto < 3 then
Conto = 0
Endif
If MieCondizioni and Not OnMarket and Conto < 3 then
Buy 1 Contract at market
Endif
Un trade è perdente quando STRATEGYPROFIT > STRATEGYPROFIT[1], cioè quando nella candela attuale la strategia risulta < alla candela precedente.
Basta incrementare un contatore ed azzerarlo se, prima che arrivi a 3 ce n’è una in profitto.
Il conteggio lo userai come condizione aggiuntiva per entrare, o meno, a mercato.
Nel mio esempio ho messo che ogni inizio giorno il conto si azzera.