I need when the security order is activated, the take profit does not come out until it touches the blue bar, which is when the profit would have been reached.

Job ID: 35586892

Budget: €30 – €250 EUR

I need that when the safety order is triggered (indicated in red in my purple line image), then the take profit (indicated in yellow in the image) does not occur on the same candle, but on the following candle. i.e. I need this code:

SafetylongStopLosshit = SafetyOrder_Opened and Safety_Long_Bar2 and low < ShafetyLongStop

if security is long, to stop the loss, shit
SafetyOrder_Opened:=false

when triggered, it is not executed on the same candle where it was triggered, but on subsequent candles.
Related categories: C Programming Pine Script