Stop Loss and Target Profit price - Cover Order

algoTraderQuant
Hi @sujith

Usecase: Lets say I have stock A trading at 100, I want to place an order to buy at 100 with stoploss at 95 and to book profit at 105.
Current Solution: I was using a CO for buying at 100 with stoploss triggered at 95 and another MIS for Selling (for profit booking) at 105, issues I face -
  1. CO and MIS are treated different so I am left with 2 open positions even though I have exited
  2. It requires 2x. the margin because they are treated as 2 separate orders
Is there a better way to achieve this, it would have been great if there was an option to exit a CO if ltp hit a price.
  • MAG
    You can/need to write your own code to do this.
    1. Place the order
    2. Monitor the position at your end using tick data.
    3. Exit the position if either stoploss or target is hit.

    The idea of the API is just that. You have the building blocks to build whatever you can think of. Provided you have the programming knowledge.
Sign In or Register to comment.