Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SubscribeMarketData()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SubscribeMarketData()

    Using the ATI DLL.

    My question deals with provider disconnects and re-connects.
    It seems that subscriptions to data feeds halt in the case of provider disconnect/reconnect.

    I have a program running that first subscribes to a data stream like such:

    oClient.SubscribeMarketData(i.Item("Instrument"))

    Then I get data like such:

    LastPrice = oClient.MarketData(CStr(NTPrices.Item(x)), 0)
    BidPrice = oClient.MarketData(
    CStr(NTPrices.Item(x)), 1)
    AskPrice = oClient.MarketData(
    CStr(NTPrices.Item(x)), 2)

    It seems that the feed gives me stale prices ... they are not updating after the disconnect/reconnect happens. In fact when I do this:
    oClient.UnsubscribeMarketData(CStr(NTPrices.Item(y)))

    Then re-subscribe the data remains the stale data ... not the typical values of 0,0,0 Ask,Last,Bid until a fresh piece of data comes in ... so if last price gets an update ... the value does update.

    The question is this:
    Is there a way to know if the subscription is vaild or needs unsubscribe/subscribe?

    It would be great if the data provider would be exposed alittle more to know if in fact the ATI is not talking to a dead/non existant feed.

    -Lars

    #2
    Sorry, we are not familiar with "CStr" or the like nor other aspects of the sample code you provided.

    As you disconnect NT from a provider any subscription will be canceled.

    Comment


      #3
      And thus needs to be resubscribed to?

      When a disconnect from provider happens does one need to unsubscribe and re-subscribe?

      Also it seems when subscribing to prices recently when testing it stops working after some time. The Super DOM shows no activity on the ticker the ATI is subscribing to. Have you seen this issue happen. I did it with two different symbols.

      I am wary of using the MarketData functions now that I see these issues ...

      Do you have any input about these issues?

      -Lars

      Comment


        #4
        As you manually disconnect NT from a provider any subscription will be canceled.

        If there is temporary loss of connection, e.g. due to internet outage, then NT will try to recover the connection and market data streams will start flowing again.

        Please contact your provider if data stops flowing in NT while a connection is established.

        Comment


          #5
          MarketData

          Again about ATI freezing the proper function of other price information within Ninja ... is this a known issue?

          When ATI subscribes/unsubscribes is it a known issue that it affects non ATI price flow for symbols that ATI has subscribed to?

          I see this issue, I was just wondering if others have had this issue.

          The interesting thing is that the SuperDom shows market depth of only one deep and the market does not move at all. I have had this happen with both ZB and ES symbols ... fairly active tickers.

          Please answer that question as well.

          -Lars

          Comment


            #6
            >> Again about ATI freezing the proper function of other price information within Ninja ... is this a known issue?
            Not sure what you mean by "other price info". ATI does not stop any non ATI market data subscription in NT

            Please contact your provider if you don't see market depth data on the DOM as you should.

            Comment


              #7
              ATI ... SuperDOM.

              There is ATI ... one can subscribe to marketdata ... get ask,last,bid prices place order ... programatically.

              There is NinjaTrader GUI application, SuperDom, Charting ... etc.

              So this is what I did.
              Subscribed to ZB 12-08 using ATI code.
              Request Price information each second.

              Hours later ... the price using ATI code shows no change.
              Also price is not changing in NinjaTrader GUI application.
              I have two NinjaTrader applications ... connected to Zen-fire feed.

              Charting does load the symbol correctly even when the pricing is frozen. The chart however does not update at all.

              So it seems that this is a direct result of using ATI code to subscribe to these sybmols ... other symbols for which I did not subscribe continue to function without issue.

              -Lars

              Comment


                #8
                ATI does not stop any non ATI market data subscription in NT. It must have been a different reason.

                Comment


                  #9
                  More information on ATI MarketData calls.

                  It seems that when placing orders in Sim101 account and using the MarketData calls ... the price freezes, stays the same as just before placing Sim101 orders.

                  The price freezes for both ATI and NinjaTrader GUI, stays the same as just before placing Sim101 orders.

                  If I am not placing orders into Sim101 ... the prices continue to update as normal.

                  This is reproducable.

                  Steps to reproduce.
                  Subscribe to market data.
                  Place order in Sim101 account for instrument that is being subscribed to.
                  Keep requesting MarketData ... the price will NOT change.

                  My setup:
                  Zen-Fire feed, Mirus Broker, XP workstation.

                  -Lars

                  Comment


                    #10
                    To clarify, you can reproduce by:
                    - start NT
                    - select ES 12-08 in the control center
                    - connect to ZenFire
                    - connect via TradeStation ATI and request MarketData -> it would be updated
                    - place a market order for ES 12-08 on Sim101 in the control center
                    - on the control center the prices or ES 12-08 are still updated
                    - as you now request market data via ATI it would not be updated

                    We would need exact (!) steps in order to reproduce. Please make corrections as required. Thanks

                    Comment


                      #11
                      Originally posted by NinjaTrader_Dierk View Post
                      To clarify, you can reproduce by:
                      - start NT
                      - select ES 12-08 in the control center
                      - connect to ZenFire
                      - connect via TradeStation ATI and request MarketData -> it would be updated
                      - place a market order for ES 12-08 on Sim101 in the control center
                      - on the control center the prices or ES 12-08 are still updated
                      - as you now request market data via ATI it would not be updated

                      We would need exact (!) steps in order to reproduce. Please make corrections as required. Thanks
                      Start NT
                      Add ES 12-08 Via instrument Manager
                      Connect to ZF
                      Enable ATI
                      Start Custom program (.NET vb.net ... uses Ninjatrader.Client class)
                      Program subscribes to market data.
                      Program requests marketdata, every 1 second ... timered.
                      Program places a buy market order in Sim101 account.
                      Order is filled.
                      Program places Sell Limit Order 10 min price moves away from filled buy order.
                      All price updates stop, both in Control Center, Super DOM, Program ...
                      Control Center "Positions" tab shows open position ... PnL column does not update either ... showing complete freeze in price updates.
                      Done.


                      Thanks.

                      -Lars

                      Comment


                        #12
                        >> Program places Sell Limit Order 10 min price moves away from filled buy order.
                        Sorry, I don't understand what that means.

                        a) are there any error messages in the log?
                        b) please provide a simple as possible VB .NET sample which demonstrates your observation

                        Comment


                          #13
                          Reproduction Application attached.

                          Attached zip contains vb.net app which can reproduce problem.

                          It turns out that subscribing to more than one symbole is needed to reproduce the entire behaviour. Placing an order in SIM account is also needed.

                          Let me know what the issue is.


                          BTW, This only happens with Zen-fire feed .... NOT "Simulated Data Feed" just so you don't say "Hey tried it here .... no problems"

                          -Lars
                          Attached Files
                          Last edited by ltemme; 10-21-2008, 03:35 PM. Reason: More details ...

                          Comment


                            #14
                            a) are there any error messages in the log?
                            b) I''ll check it out on Zen as markets are open. Did you experience any trouble against sim feed?

                            Comment


                              #15
                              I tried to reproduce:
                              - started NT
                              - connected Zen
                              - opened a new market analyzer (no template) and added the 4 instrument in question -> bid/ask/last are updated
                              - started you sample app, I saw 2 orders being placed -> bid/ask/last are still updated

                              All works as expected

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by NullPointStrategies, Today, 05:17 AM
                              0 responses
                              44 views
                              0 likes
                              Last Post NullPointStrategies  
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              126 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              65 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              42 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              46 views
                              0 likes
                              Last Post TheRealMorford  
                              Working...
                              X