Advanced Programming for Option Strategy PNL

#1

I have multiple option positions like
BANKNIFTY MAY 28600 PE NFO -20 415.75 772.65 -7,138.00 85.84%

BANKNIFTY MAY 29600 PE NFO 20 797.00 1,237.40 +8,808.00 55.26%

BANKNIFTY MAY 29000 PE NFO -20 660.00 948.15 -7,876.00 0.00

How can I write a code such that I get alert if there is a profit of Rs 3000 or loss of Rs 1500 for above 3 positions?

#2

Try using sentinel, give condition of their sums of LTPs reaching that particular profit level or loss, you can set two different triggers, one for profit booking and other for loss taking,you will get an alert when that condition is met. Create basket of those positions and add it to that trigger, once condition is met you will get an alert on kite web and with 2 clicks you can place orders for that added basket.

#3

How do I provide my cost price? Because Profit will be MyPrice - LTP

Can you share the code with me?