Bonjour,
J’aimerai couper mon robot au bout de 3 trades gagnants.
J’ai utilisé le code suivant :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
if intradaybarindex=0 then bartoday = barindex endif if positionperf(1) < 0 and tradeindex(1)>bartoday THEN notrading = 0 ELSE count = 0 for i = 0 to trademax do if tradeindex(i)>bartoday then if positionperf(i)>0 then count=count+1 endif endif next notrading = count>=trademax ENDIF GRAPH count |
Mais j’ai un problème j’aimerai que la variable count ne s’incrémente qu’à la fin du trade gagnant et pas entre deux trades (voir pièce jointe)
Merci beaucoup à tous
🙂