I want to fix the error of an indicator, statistics section in Tradingview. -- 2

Job ID: 33009799

Budget: $10 – $30 USD

If the price does not reach any target 1 and there is an "opposite" signal, it calculates it as if it was a stop loss. I am looking for someone to fix this error.
Related categories: PHP Algorithm Metatrader Mathematics Pine Script