How to set PNL for particular set ? or put a stoploss on the basis of the PNL of that set

How to set PNL for particular set ? or put a stoploss on the basis of the PNL of that set.

To check the PNL of a particular set we need to calculate it using the various keyword available to us like the TradedInstrument Entry price and LTP and Quantity.

On the Above Image, The 1st part is how we are calculating a PNL stop-loss or -1500 and the 2nd part shows how we are calculating Take Profit of 25000.
Here we are using a list as underlying you may also use a single instrument. This means this can be applied to a list of instruments as well.

2 Likes

Answer
There is another way of Setting PNL for each set, Below is an example where an exit condition for Iron Condor is shown where hedges are from entry and sell entries are from repair once.

1 Like

not working in my stategy

if any of u r traded instruments have already met its exit condition, abv formula wont work. As per my knowledge pnl in a traded instrument work with eqn LTP-entry price. for an exited leg condition will be false.

Hi

Can we define our exit condition as

.Please reconfirm?

The below condition did not work for a Set Gain of Rs 500 or 20 points (25x20) in Bank Nifty…Can any one suggest any error…? This is a SELL trade so gain is when LTP is 20 points below the Entry price
( ( Traded Instrument ( ‘strategy_id’, ‘run_counter’, ‘Entry’, ‘price’, ‘NIFTY BANK’, ‘1’, ‘1’, ‘1’ ) - LTP ( Traded Instrument Name ( ‘strategy_id’, ‘run_counter’, ‘Entry’, ‘instrument’, ‘NIFTY BANK’, ‘1’, ‘1’, ‘1’ ) , ‘LTP’ ) ) >= Number ( ‘20’ ) )

The Condition is Perfectly OK but it did not get executed because of an Error in Condition builder…

Chandrahas - pls share screenshot of your code

1 Like

The issue is resolved… Just pasting the screens

1 Like