How to set Stop Loss and Target based on options price

Hello,
I want to add SL and Target based on options price data as the exit conditions in the Set number 1. Below are the requirements for the same.

  1. SL should be 40 points less than the Entry price of the option.
  2. Target should be 100 points more than the Entry price of the option.

I have attached the screenshot of my code. Please guide me if the code is correct or not.

Regards,
Kundan

check like for profit like LTP >= entry +100, similar way for Loss. == is difficult to be true. so use >= or <=. and deploy in paper trading or offline to test.