It looks like you're new here. If you want to get involved, click one of these buttons!
{'client_id': 'DS5211',
'disclosed_quantity': None,
'exchange': 'NFO',
'order_id': '180227000228317',
'order_type': 'LIMIT',
'ordertime': datetime.datetime(2018, 2, 27, 9, 30, 50, 889308),
'price': 105.15,
'product': 'BO',
'quantity': 8000,
'squareoff_value': 10.15,
'status': 'NEW',
'stoploss_value': 1.7,
'tag': 3295,
'tradingsymbol': 'PNB18MARFUT',
'trailing_stoploss': 0.0,
'transaction_type': 'SELL',
'trigger_price': 0,
'validity': 'DAY',
'variety': 'bo'}
The second leg of the BO got filled at 101.40.
[{'average_price': 105.15,
'cancelled_quantity': 0,
'disclosed_quantity': 0,
'exchange': 'NFO',
'exchange_order_id': '1700000001003449',
'exchange_timestamp': Timestamp('2018-02-27 09:30:51'),
'exchange_update_timestamp': None,
'filled_quantity': 8000,
'guid': 'kWjts8RH8A7R1EfV',
'instrument_token': 12236290,
'market_protection': 0,
'order_id': '180227000228317',
'order_timestamp': Timestamp('2018-02-27 09:30:51'),
'order_type': 'LIMIT',
'parent_order_id': None,
'pending_quantity': 0,
'placed_by': 'DS5211',
'price': 105.15,
'product': 'BO',
'quantity': 8000,
'status': 'COMPLETE',
'status_message': None,
'tag': '3295',
'tradingsymbol': 'PNB18MARFUT',
'transaction_type': 'SELL',
'trigger_price': 0.0,
'validity': 'DAY',
'variety': 'bo'},
{'average_price': 101.4,
'cancelled_quantity': 0,
'disclosed_quantity': 0,
'exchange': 'NFO',
'exchange_order_id': '1700000001003980',
'exchange_timestamp': Timestamp('2018-02-27 09:30:51'),
'exchange_update_timestamp': None,
'filled_quantity': 8000,
'guid': None,
'instrument_token': 12236290,
'market_protection': 0,
'order_id': '180227000228384',
'order_timestamp': Timestamp('2018-02-27 12:48:13'),
'order_type': 'LIMIT',
'parent_order_id': '180227000228317',
'pending_quantity': 0,
'placed_by': 'DS5211',
'price': 101.4,
'product': 'BO',
'quantity': 8000,
'status': 'COMPLETE',
'status_message': None,
'tag': '3295',
'tradingsymbol': 'PNB18MARFUT',
'transaction_type': 'BUY',
'trigger_price': 0.0,
'validity': 'DAY',
'variety': 'bo'},
{'average_price': 0.0,
'cancelled_quantity': 4000,
'disclosed_quantity': 4000,
'exchange': 'NFO',
'exchange_order_id': '1700000001003981',
'exchange_timestamp': Timestamp('2018-02-27 12:48:13'),
'exchange_update_timestamp': None,
'filled_quantity': 0,
'guid': None,
'instrument_token': 12236290,
'market_protection': 0,
'order_id': '180227000228385',
'order_timestamp': Timestamp('2018-02-27 12:48:13'),
'order_type': 'SL-M',
'parent_order_id': '180227000228317',
'pending_quantity': 4000,
'placed_by': 'DS5211',
'price': 0.0,
'product': 'BO',
'quantity': 4000,
'status': 'CANCELLED',
'status_message': None,
'tag': '3295',
'tradingsymbol': 'PNB18MARFUT',
'transaction_type': 'BUY',
'trigger_price': 106.85,
'validity': 'DAY',
'variety': 'bo'}]
I checked if I had amended the Limit value midway . However it seems the order was placed originally with 3.75 points only.
[{'average_price': 0,
'cancelled_quantity': 0,
'disclosed_quantity': 8000,
'exchange': 'NFO',
'exchange_order_id': None,
'exchange_timestamp': None,
'exchange_update_timestamp': None,
'filled_quantity': 0,
'guid': None,
'instrument_token': 2,
'market_protection': 0,
'order_id': '180227000228384',
'order_timestamp': datetime.datetime(2018, 2, 27, 9, 30, 51),
'order_type': 'LIMIT',
'parent_order_id': '180227000228317',
'pending_quantity': 8000,
'placed_by': 'DS5211',
'price': 101.4,
'product': 'BO',
'quantity': 8000,
'status': 'PUT ORDER REQ RECEIVED',
'status_message': None,
'tag': '3295',
'tradingsymbol': 'PNB18MARFUT',
'transaction_type': 'BUY',
'trigger_price': 0,
'validity': 'DAY',
'variety': 'bo'},
{'average_price': 0,
'cancelled_quantity': 0,
'disclosed_quantity': 8000,
'exchange': 'NFO',
'exchange_order_id': None,
'exchange_timestamp': None,
'exchange_update_timestamp': None,
'filled_quantity': 0,
'guid': None,
'instrument_token': 12236290,
'market_protection': 0,
'order_id': '180227000228384',
'order_timestamp': datetime.datetime(2018, 2, 27, 9, 30, 51),
'order_type': 'LIMIT',
'parent_order_id': '180227000228317',
'pending_quantity': 8000,
'placed_by': 'DS5211',
'price': 101.4,
'product': 'BO',
'quantity': 8000,
'status': 'OPEN PENDING',
'status_message': None,
'tag': '3295',
'tradingsymbol': 'PNB18MARFUT',
'transaction_type': 'BUY',
'trigger_price': 0,
'validity': 'DAY',
'variety': 'bo'},
{'average_price': 0,
'cancelled_quantity': 0,
'disclosed_quantity': 8000,
'exchange': 'NFO',
'exchange_order_id': '1700000001003980',
'exchange_timestamp': datetime.datetime(2018, 2, 27, 9, 30, 51),
'exchange_update_timestamp': None,
'filled_quantity': 0,
'guid': None,
'instrument_token': 12236290,
'market_protection': 0,
'order_id': '180227000228384',
'order_timestamp': datetime.datetime(2018, 2, 27, 9, 30, 51),
'order_type': 'LIMIT',
'parent_order_id': '180227000228317',
'pending_quantity': 8000,
'placed_by': 'DS5211',
'price': 101.4,
'product': 'BO',
'quantity': 8000,
'status': 'OPEN',
'status_message': None,
'tag': '3295',
'tradingsymbol': 'PNB18MARFUT',
'transaction_type': 'BUY',
'trigger_price': 0,
'validity': 'DAY',
'variety': 'bo'},
{'average_price': 101.4,
'cancelled_quantity': 0,
'disclosed_quantity': 0,
'exchange': 'NFO',
'exchange_order_id': '1700000001003980',
'exchange_timestamp': datetime.datetime(2018, 2, 27, 9, 30, 51),
'exchange_update_timestamp': None,
'filled_quantity': 4000,
'guid': None,
'instrument_token': 12236290,
'market_protection': 0,
'order_id': '180227000228384',
'order_timestamp': datetime.datetime(2018, 2, 27, 12, 48, 13),
'order_type': 'LIMIT',
'parent_order_id': '180227000228317',
'pending_quantity': 4000,
'placed_by': 'DS5211',
'price': 101.4,
'product': 'BO',
'quantity': 8000,
'status': 'OPEN',
'status_message': None,
'tag': '3295',
'tradingsymbol': 'PNB18MARFUT',
'transaction_type': 'BUY',
'trigger_price': 0,
'validity': 'DAY',
'variety': 'bo'},
{'average_price': 101.4,
'cancelled_quantity': 0,
'disclosed_quantity': 0,
'exchange': 'NFO',
'exchange_order_id': '1700000001003980',
'exchange_timestamp': datetime.datetime(2018, 2, 27, 9, 30, 51),
'exchange_update_timestamp': None,
'filled_quantity': 8000,
'guid': None,
'instrument_token': 12236290,
'market_protection': 0,
'order_id': '180227000228384',
'order_timestamp': datetime.datetime(2018, 2, 27, 12, 48, 13),
'order_type': 'LIMIT',
'parent_order_id': '180227000228317',
'pending_quantity': 0,
'placed_by': 'DS5211',
'price': 101.4,
'product': 'BO',
'quantity': 8000,
'status': 'COMPLETE',
'status_message': None,
'tag': '3295',
'tradingsymbol': 'PNB18MARFUT',
'transaction_type': 'BUY',
'trigger_price': 0,
'validity': 'DAY',
'variety': 'bo'}]
This entire this is not making sense, as I am not able to place intended order. Further, its not a one off thing. So, I would like to know how bracket orders work so as to set my expectation right/tweak my algo.
You can check out this blogpost.
This is the circular from NSE.
If the price entered is below execution range then the order will sit at lower execution range value.
There is something we are missing here. Today I placed a bracket order to Short SBI March futures. It got filled at 253.20.Now, in line with our discussion and as happened in the PNB case cited above, if my Limit leg on BO was below 253.2 * 0.95 = 240.50, then the Limit leg should automatically be placed at lower bound i.e 240.50. However, I successfully placed my limit Leg at 231.30 and not one, but multiple orders.
I like to keep my Limit and SL leg tuned with the volatility of the future contract under consideration and hence when vols are high, my Limit leg could be wide, more than 10%. So, I want to understand how your BO order work when you place the Limit leg at significant deviation (>8%) from prevailing market price and which explains both: the SBI today and PNB earlier.
As you mentioned execution range for future is 5% of reference value. Just to confirm this I placed BO in LUPIN MAR 18 fut.
Buy Price : 764.2
Target : 100.0 (864.2)
Stoploss : 1.0 (763.2)
When Order was executed, the target price was reduced to 839.6 which is around 9.87% of the buying price.
PFB screen shot
Theoretically Target limit order should be placed around 812.4 . Could you please explain reason behind this?
I also faced similar issues. Although I figured out that the price range for Futures is not limited to 5% like you mentioned earlier. I think the following NSE link explains the reason why
https://www.nseindia.com/products/content/derivatives/equities/price_bands.htm
With Equity futures, NSE has a price band policy being capped at 10% of the base price. What is unclear here is the term "base price" mentioned on NSE site and why does it keep changing during the day. With my experience, when I place a bracket order for a NSE Scrip future, whose target or stop loss exceeds the price band limit, the respective leg gets capped at the extreme limit. For eg: – Lets say PNB Future closed at 100 Rs on the previous day. It opened at 106 today (6% Up). After 5 minutes of market opening, if I place a Buy BO at 106 with a 5 Rs Target (relative) and 2 Rs Stop loss (relative), I notice that the target leg of the order in Kite says 110 Rs = (110 – 106 = 4Rs relative instead of 5Rs). I understand that since this is NSE policy this is how it is, but its not that during the rest of the trading day the price of PNB is capped at 110 Rs. I notice that probably after 15 minutes, lets say it has risen to 112 Rs. Clearly, this means that the calculation of 10% of the 'base price' keeps shifting during the day. This dynamic nature needs to be understood in these cases.
Here lies another problem, that if the price band is dynamic in nature, then it means to achieve the desired target / SL, one has to modify them when the desired limit is extended by NSE. But that won't be possible with BO, because one can not modify the second leg orders in BO. One can only cancel the previous BO and place a new one.
Please shed some light on this.
Thanks
This needs more clarity from Zerodha.
There must be something in python which fetches this page from NSE for you and gets the value of tags with ID`s
And similarly for other future scrips.
Thanks
Regards
Extracting the upper and lower band limit values is not a tough task at all, and infact I do it for one of the Algos using the excellent "nsepy" python library. One should check it out, it scrapes a lot of information out of nse website.
Nevertheless, do we know for sure if Zerodha is placing the BO orders as per these bands. As per the circulars sighted by others, upper price band and lower price band are relevant for cash market not for derivatives.
Referring to various circular etc will not close the matter because, in the end, it all boils down to what Zerodha is following. By now, we already know that these circulars are not so clear.
Regards
Saurav
Sorry I had missed your post while replying to earlier one. Let me review it.