Bonjour,
J’aimerai couper mon robot au bout de 3 trades gagnants.
J’ai utilisé le code suivant :
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
🙂
j’ai oublié de préciser trademax = 3