Order placing with Tag on different time frame

ravipratapsingh
Hi @sujith & Team -

A quick question regarding order and tag combinations

Can I place multiple order with different tags for same instrument? how it behave like it will buy/sell into existing order or always create separate order for same.
For Example: I have identified that BANKNIFTY will move upside at different time frame like 1 minute candle and 5 minute candle. Now can I place 2 different order for BANKNIFTY 18-Sep-2024 51100 CE with different tags

Suppose I am placing 2 orders as mentioned below
Order 1: Instrument: BANKNIFTY 18-Sep-2024 51100 CE, Tag: 01min, Qty: 150, Price: 20 - (Response Order Id: 123456788 with success)
Order 2: Instrument: BANKNIFTY 18-Sep-2024 51100 CE, Tag: 03min, Qty: 300, Price: 22 - (Response Order Id: 123456789 with success)

Point 1:
Once above order placed successfully, this will generate 2 different order in order book with different tag which is OK it seems.
But in position tab, both orders will be clubbed with total quantity with average price and displayed or any provision that it will display as 2 different order based on tag?

Point 2:
Now I want to place sell Order for the Order Id (123456788 from above example) which was bought or placed buy order with 01min tag.
Here how to ensure that it will only exit the orders which was placed at 01 minute time frame and not the other orders (123456789 from above example) which was placed at 03 minute time frame?

As in Order Place request - only InstrumentSymbol and OrderType looks like act as Key where I can't define that which OrderId I want to square off based on time frame.

Is it possible to define the tag at the time of place sell order and only matching InstrumentSymbol and OrderType with Tag will be squared off where I will be managing the timeframe and InstrumentSymbol at my end.

Please let me know the reference for same if API already available.

Please confirm the above query and let me know if required any further details.

Thanks & Regards,
Ravi
  • sujith
    You can only see separate entry on the orderbook as mentioned by you. Positions has no relation with orderbook, it is just a mark to market(m2m) of your account with respect to the market. One can't exit a particular order but can go long or short in the market by adding position or exiting a position.
  • sujith
    But you may use different product type to see different separate entries in the positions tab.
  • ravipratapsingh
    Hi @sujith - thanks for your response.

    Product type is OK which can be used as NORMAL or MIS based on this will be able to show different entries in position tab, I got this.

    Now another question: is it possible to exit the position based on OrderId instead of InstrumentSymbol? Suppose I place BANKNIFTY 53000 CE for SEP Expiry - 2 different order - 1 for 5 min time frame and another for 15 min time frame and post that I will be getting 2 different order Id (123456788 & 123456789 respectively).

    Now I want to exit only 5 min time frame which is having Order Id as 123456788, is there any provision that I can pass the OrderId with Sell request along with InstrumentSymbol to exist the position which was bought at 5 min time frame and it should not touch the 15 min time frame data.

    Please confirm.
  • sujith
    As mentioned above, there is no correlation between orderbook and positions. Hence whatever you are thinking is not possible.
  • ravipratapsingh
    ok thanks for clarifications
This discussion has been closed.