Exit Option Based on Spot price's movement

Hello,
I am looking to track the spot price’s movement for option entry and exit.
For entry it is simple that it will be ltp or a position keyword to get last candle. With this I decide to sell call for a downward directional trade.
Now, based on change of spot/underlying price I want to exit with a stop loss or book a profit.

An example,
BankNifty spot price is at 34540, I short 34700 CE(round(34540) + 300).
Now, I want to exit this trade when BankNifty is at 34590 or at 34410 with either a profit or a loss.
Is there a way to do this?

Yes possible. Use LTP and Traded Intrument keyword
LTP of Banknifty > traded intrument Entry price + x
LTP of Banknifty < traded instrument Entry price - x