Square off Position Basis on Profit Amount Not on Percentage Basis

I am new to this forum and want to build algo strategy. In that strategy buy/sell order shall get placed at 9.16 and if profit is equal to 2000 per script, the algo should be able to place square off order as soon as profit reaches Rs. 2000. I don't know if api is capable to return profit per order to user or not
  • sujith
    You can fetch positions which will have the average price of a position and you can use live market feed data to compute the live P&L. Once your condition is met you can place an order of type market with opposite transaction type. You can check out this thread to know how to calculate P&L live.
  • desain2
    Thanks Sujith.
This discussion has been closed.