У меня есть приведенный ниже код в тестере стратегий, и когда он автоматически выходит во время тейк-профита на 300, он всегда входит снова. Как мне остановить его от повторного входа, когда срабатывает выход
isShort=false
isLong=false
if (goLong)
if(isShort==false)
strategy.entry("Long", strategy.long,100000,when=isShort?false:true)
strategy.exit("b1","Long",profit=300)
isShort:=true
isLong:=false
else
if(isLong==false)
strategy.entry("Short", strategy.short,100000,when=isLong?false:true)
strategy.exit("b2","Short",profit=300)
isShort:=false
isLong:=true