Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Possibel BUG OnMarketData()

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

    Possibel BUG OnMarketData()

    I never noticed this until tonight but the dom and the Time and sales bid and ask aren't complying with each other. Something i built that uses onmarketdata driven events is agreeing with the time and sales but not he dom.

    The ES seems ok but not the YM. The bid and ask size is even wrong almost like it is using a different provider or something. I cant seem to figure it out

    I am using

    Code:
    if(e.MarketDataType==MarketDataType.Ask)
            {
                    LatestAskPrice1 = e.Price;
    for my window , which seems to be the same info the time and sales is getting which is not what the dom is showing.

    Let me know

    Tim
    Attached Files

    #2
    Timmy, if you compare the Level 2 window with the OnMarketDepth() updates - would that be more in sync?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Tim,

      - What provider(s) are you connected to
      - Can you send us a workspace where you are able to reproduce this
      - Does this happen frequently, meaning, easy to spot a moment in time where this occurs

      We will investigate to see what is happening.
      RayNinjaTrader Customer Service

      Comment


        #4
        Tim,

        Also, please send full logs and traces via Help > Mail To Support, Attention Bert. Thanks.
        RayNinjaTrader Customer Service

        Comment


          #5
          Tim,

          In looking closer at your image, you will see the following:

          - YM 03-11 Time & Sales has a time stamp of 7:13:04
          - This is about 11 minutes behind the current market time (as seen in the Level II window and the ES 03-11 Time & Sales window)
          - The likely issue is that you have a coding bug in your custom OnMarketData() form that throws an exception before your custom form can be updated with the most recent tick also preventing the Time & Sales window from receiving this update
          - You can confirm this by just removing your custom form from the mix
          - I believe the logs/trace files will show some sort of exception error
          RayNinjaTrader Customer Service

          Comment


            #6
            I was not home today, but will work on it tonight and see if it persists, I rebooted ninja and it still did it then i removed the data feeds, then re-added them and it fixed itself. There was no errors in the log that i remember when i checked. Will update you tonight

            Comment


              #7
              Had a min so checked things out. I seen a failed to initialize method in log. So i closed all chart and opened a new chart that's blank with no indicators and i still have ym not being right in time and sales. What is even more odd is the indicator that said failed to use initialize method wasn't on any chart in the first place. So unsure how that is occurring . I don't have much more time right now but I will check tonight and email what reports are needed and explain any further testing. as u can see today it is doing the same thing again
              Attached Files

              Comment


                #8
                Sent everything to Bert just now will be back later

                Comment


                  #9
                  Tim, I tried to locate the files you sent for reproducing - did you get a ticket # assigned from our system? Can you please let me know which one?

                  Thanks,
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    Steps To load

                    Started ninja DTN iqfeed auto connects

                    Manually Connect to Zenfire feed

                    Ninja goes to not responding (typical usually does for about 10 seconds while laoding zenfire)

                    Attached screenshot shows error in log file. But at this time there is no strategy's etc running, not even a chart is open.

                    With no charts or anything but control panel open I load 2 doms, one with ES one with YM.

                    Then load two time and sales, 1 ES and 1 YM

                    YM and Dom do now agree and I get an error in the log book saying I do not have live data feed for YM. (which i dont understand due to having zenfire)

                    Posted screenshots showing the above.

                    Hope I explained my steps well enough

                    will also resend data files to Bert

                    P.S ninja is trying to send log files but is not responding and has been 2 minutes, will let it be and see if it sends

                    P.S file sent
                    Attached Files
                    Last edited by timmyb; 01-25-2011, 03:52 PM.

                    Comment


                      #11
                      Thanks for the steps and files, I will look into reproducing here on our end.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Thanks Tim - here's what happens in your case -

                        You're not subscribed to real time data for the YM at your primary used connection IQFeed -

                        1/25/2011 12:41:40 AM|1|4|'YM 03-11' market data is delayed since your account does not have a real time subscription for the exchange this market trades on

                        This is of consequence for the Level 1 window, since it would then display you the about 10 mins delayed data.

                        You do not see this happening on the Level 2 / DOM window as those are 'grabbing' the data from the second connected ZenFire conection which is realtime (case being that you've not subscribed to Level 2 data from IQFeed).

                        Please try to connect the other way around, so ZenFire first and then IQFeed, so both YM and ES Level 1 and Level 2 datastreams would be realtime - you would then still be able to get other instrument categories such as indices and FX from IQFeed as ZenFire would not offer them.

                        Best,

                        Bertrand
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          Ok I will try, this would be detrimental to what I am doing tho. i track Bid and Ask data, and in order to have my charts be fed with that data I need to use Iqfeed. If i do not use iqfeed i do not have accurate bid/ask data so i assumed I need iqfeed to connect first. let me know if this is the case.

                          But on that note I do not subscribe to level two data for ES from iqfeed either. So kinda curious how that one is working right but not YM. I have no level two data feed from iqfeed that I subscribe to.

                          On another side o f this coin, Since this indicator i built seems to be working right in the way ninja works since it agrees with time and sales. Why is the level two correct?? I guess i am confused as to how the dom gets its data compared to level two or onmarketdata. Id there a line i can use in onmarketdata to receive the correct data from the secondary provider??

                          Basically what in onmarketdata do i have to use to get the correct feed. Since apparently the onmarketdata i use is getting the delayed feed. while the dom and level tow in ninja do not.

                          As another note this is not occurring on NQ etc. only YM. so it kinda seems like a bug still.

                          I hope these questions make sense

                          I will attach the .cs of the custom indicator and perhaps u can let me know if it is coded correctly. I will attach it to a email via ninja.
                          Last edited by timmyb; 01-25-2011, 05:01 PM.

                          Comment


                            #14
                            The DOM and L2 window check your IQFeed connection first to see if the instrument type and market depth data is supported. In your case, the answer is no and thus NT rolls to your Zen-Fire connection that does support it.

                            Both Time & Sales windows also go to IQFeed first, ask if Level 1 for the instrument type you request data for is supported, the answer is yes so data from IQFeed is pulled. You have ES real time entitlement so the T&S is in real time. You do not have YM entitlement so you get delayed data.

                            I *believe* if you got a YM entitlement on your IQFeed, it will work as you expect.
                            RayNinjaTrader Customer Service

                            Comment


                              #15
                              Ok i understand, I figured that since i had it on zenfire it would roll to that to populate. I will see what i have to do to get cbot on DTN. I assumed since one feed had it it would by default not use the one that is delayed. Is this a feature that could be requested in the future??

                              thanks for the speedy and professional help.

                              Tim

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Haiasi, 04-25-2024, 06:53 PM
                              2 responses
                              16 views
                              0 likes
                              Last Post Massinisa  
                              Started by Creamers, Today, 05:32 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post Creamers  
                              Started by Segwin, 05-07-2018, 02:15 PM
                              12 responses
                              1,785 views
                              0 likes
                              Last Post Leafcutter  
                              Started by poplagelu, Today, 05:00 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post poplagelu  
                              Started by fx.practic, 10-15-2013, 12:53 AM
                              5 responses
                              5,407 views
                              0 likes
                              Last Post Bidder
                              by Bidder
                               
                              Working...
                              X