@nazafks
Hi, you could make increase a variable by 1 every candle by the condition the position is losable, when the condition is above N -> close the trade.