Salut Mickey
Impossible de répondre avec précisons sans avoir tout le script
Faudrait vérifier que idLastAchatNotSell soit bien supérieur à 1
for idAchatNotSell = 1 to idLastAchatNotSell
if(ichi4h == 1 and close < leadLine1[25])
strategy.exit("Trade_ " + str.tostring(idAchatNotSell), qty_percent = 100, profit = 1)
idAchatNotSell += 1
Tu peux me contacter par email si tu veux: dave@best-trading-indicator.com
Ici tu trouveras les infos pour partager du code via ce forum: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code