RTD NetQty not getting updated

shashi
Hi, i want to check real time BN option qty available in my intraday position.
I am trying below code but it resulting 0 however in actual i am holding it intraday. please suggest.
=GetRTD("NFO",BANKNIFTY2171535500CE,"NETQTY")
  • shashi
    shashi edited July 2021
    @sujith @HowUTrade Plz help..............
  • HowUTrade
    @shashi
    It should work.
    Enclose the trade symbol with " (double quote)
    =GetRTD("NFO","BANKNIFTY2171535500CE","NETQTY")
  • shashi
    shashi edited July 2021
    @sujith , @rakeshr @HowUTrade GETRTD for NETQTY is not working in real time. I am facing big issues in it. It doesn't update in real time moreover it sometime update and in some cases it doesnt update for whole day.

    Why have you removed cover order? it has become so difficult to modify everything and then this NETQTY is not working. Please support else no point using kite connect as i cannot run my algo smoothly.

    check below snapshot. As per sheet i am holding 1 lot 35500ce however in actual i am having 36500pe. I cannot exit my position. Urgent support required.


  • HowUTrade
    @shashi

    The real time NETQTY and MTM provided by our software/library is calculated at software level using the order updates received via websocket. It may return wrong value on below cases;
    1. If the order updates are missed due to network issue, this will return wrong values, fetching the OrderBook will reconcile and return correct value.
    2. If the position is converted
    3. Overnight position exited intraday.
    4. Excel/RTD issue

    Note this NETQTY is related to our software only and has nothing to do with Kite API.
    This field is working fine at our end. If you need more reliable way to check positions, then call GetPositions and loop through each position.
  • shashi
    shashi edited July 2021
    @HowUTrade

    Above 4 reasons are not there, i checked it. it is very sluggish in response. Why we call it a RTD when there is no real time checking about the position/qty?
    why do we need to go to GetPosition when Real Time NETQTY is not meeting the purpose. what if we manually exit from phone incase of sudden spurt to book profit, why RTD NETQTY doesn't check in real time how much qty left instead of waiting for order to pass thru excel?

    Bracket order stopped, Cover order stopped and now MIS order doesn't work. why are you(Zerodha @sujith @rakeshr + Howutrade) making it more difficult for us to trade? I am just changing my codes every time. these things nt helping at all.
    What is the syntax of GetPosition. i didn't find it.

    is it OK?
    =GetPosition("NFO","BANKNIFTY2171535500CE","NETQTY")
  • shashi
    @sujith , @rakeshr @HowUTrade I am waiting for your response.
  • shashi
    @sujith , @rakeshr @HowUTrade I am waiting for your response.
  • shashi
    @sujith , @rakeshr @HowUTrade I am waiting for your response.
  • HowUTrade
    @shashi
    1. We again checked at our end, the NETQTY field is working fine and updating in real-time
    2. Only our library supports real-time NETQTY and MTM without pulling Position book
    3. This NETQTY is efficiently implemented by fully leveraging 'order updates on websocket'
    given that,
    If NETQTY is not updating in real-time or sluggish, then check your VBA code, there might be some code causing this issue. Also make sure ThrottleInterval is set to 0 in Excel

    If you feel NETQTY is not working, then you may try pulling Position book
    You need to write a custom VBA code that pulls GetPositions periodically and stores each symbols NetQty and Mtm in a local variables. Then create another UDF that will return this NetQty and Mtm, and call this UDF in the excel cell
  • shashi
    @HowUTrade
    I have checked and there is delay in response and sometimes there is wrong info about qty and my system understand that I am still holding that script and it starts firing sell order which in turn start getting rejected.

    Instead of each user of you starts writing a custom code for this basic thing why don't you update your NETQTY code in which it will pull customers real time position and check real time qty instead of current system where it counts orders fired thru excel and doesn't count the manual exit from app?
  • shashi
    @HowUTrade
    Waiting for your response
  • HowUTrade
    @shashi

    Pls try to understand the below;
    There is nothing that needs to be fixed at our end.
    Its your code or system that needs to be fixed.

    1. NETQTY will update in real-time irrespective of where you place orders (Excel or Kite Web). If not updating, check your VBA code and Network.
    2. Pulling OrderBook or Positions in a loop is very very poor design, if at all need to pull, then there should be a delay of at least 1min between each pull.
    3. Pulling OrderBook after every order placement is also very bad idea

    That's why zerodha API provide robust and fastest order updates through Web socket and post back.

    Placing orders based on live position is not advisable, as you can't fetch positions every second, sometimes OMS take time to update net positions and sometime order updates may get delayed. A good design should separate signal generation and live order execution. The Signal generation part should continuously generate entry and exit signals irrespective of live order placement

    Example:

    On EntrySignal
    1. Place Entry Order with Tag

    On ExitSignal
    1. Get Entry OrderId using Tag
    2. Check Entry Order Status
    3. If Entry Order Status is COMPLETE (i.e. Position Open), then Place Exit Order else Ignore

    Designing a trading system in VBA/Excel requires professional skill. You may explore our excel templates, where the positions details are updated smoothly in real-time.
Sign In or Register to comment.