Trailing stoploss and increasing target on real time basis

Algotrade
Hello everyone.
I'm relatively new to python and my apologies if this is noob..
I usually place multi-legged FNO strategies like debit/credit spreads, call ratio spreads, ICs etc through kite connect API. I'm fetching the combined real time pnl of all legs in the console. Now, I wish to alter my combined SL and target on real time basis, based on live PNL of my positions. Till now, I was placing fixed overall SL and target for my combined positions. Can someone please point me in the right direction, how to do this?
I'm thinking of storing my live pnl feed in a pandas dataframe, fetching the max value in real time basis from the dataframe and altering my SL and TGT on real time basis..
Can someone please guide me in the right direction, how to accomplish this?
Sign In or Register to comment.