Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing the "Status" Field of the Historical Data Records

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

    Accessing the "Status" Field of the Historical Data Records

    What is this field for? Can I use it to store string data that I generate in an indicator? How can I access this field, to write data into it or to read data from it? Can I do it by making a SQL call to the database through a data provider, from the indicator code, or is there an easier way?

    I knew you would ask, so I will reveal that I want to use it to store the string values of the Enum that Gomi uses to characterize each trade, with possible values of Belowbid, Atbid, BetweenBidAndAsk, AtAsk, AboveAsk, etc.

    This would be an easier workaround than the GomRecorderIndicator, to the limitations that now prevent the storage and retrieval of bid and ask data from Ninatrader's native data store.

    #2
    Bid and Ask data files

    Could you please explain why there are three separate folders for bid, ask and last data? Are the bid and ask giving the values from Level 1 of the DOM?

    What is the purpose of the GetCurrentBid() and GetCurrentAsk() methods? When I get the values of Close[0], GetCurrentbid(), and GetCurrentAsk(), all three seem to be return the same value. This is the code I used to populate the Output Window:

    Print(CurrentBar+" Bid ="+CurBid+" Ask ="+CurAsk+" Price = "+Close[0]);

    On every output line that I looked at, all three values were the same.

    Comment


      #3
      In historical data all three are the same by design. You have to add an extra data series if you want bid/ask data. See http://www.ninjatrader-support2.com/...ad.php?t=25036

      In real-time I guess it will depend on your data provider what values you get for bid/ask.

      Comment


        #4
        Originally posted by terenyi View Post
        You have to add an extra data series if you want bid/ask data. See http://www.ninjatrader-support2.com/...ad.php?t=25036
        Posting #3 of that thread give an example of how to code the extra dataseries for historical ask price info, and the historical bid prices are found in a similar fashion.

        Note that the Volumes found that way for Bid and Ask are useless for replacing what Gomi was doing with his recorder, which was what I had been hoping for when I heard that NinjaTrader V7 would have historical bid & ask data available.

        In my opinion, the volume portions of the historical bid & ask dataseries can be consigned to the useless features bin.

        If those volumes reflected the numbers of contracts actually traded at those bid/ask prices, that would seem much more useful to me than seeing what the number of bid and ask limit order numbers were at those prices.

        I guess this can still be determined, but it's going to be a lot more work.

        Comment


          #5
          Reading and writing to the Status Field of the Database

          So far nobody has come up with an answer to Post Number 1.

          Ninjatrader guys, can you help us with this? I want to create my own string data, but store them in what appears to be an unused field in the Ninjatrader database rather than putting them in a separate .dat file.

          I would generate the value of the string based on conditions that would be monitored in real time in the OnMarketData and OnMarketDepth event. But that is not what I am asking. I just want to know how to write to, and read from, the Status Field of the database records.

          Trying to get anything useful out of the GetCurrent methods is a lost cause, but that is not what I want to do.
          Last edited by Ricam; 02-04-2010, 10:21 AM.

          Comment


            #6
            Accessing that field is not supported.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by KBJ View Post
              Posting #3 of that thread give an example of how to code the extra dataseries for historical ask price info, and the historical bid prices are found in a similar fashion.

              Note that the Volumes found that way for Bid and Ask are useless for replacing what Gomi was doing with his recorder, which was what I had been hoping for when I heard that NinjaTrader V7 would have historical bid & ask data available.

              In my opinion, the volume portions of the historical bid & ask dataseries can be consigned to the useless features bin.

              If those volumes reflected the numbers of contracts actually traded at those bid/ask prices, that would seem much more useful to me than seeing what the number of bid and ask limit order numbers were at those prices.

              I guess this can still be determined, but it's going to be a lot more work.

              Broke my heart to see NT getting further behind in regards to volume indicators.

              I waited a year for NT7 only to find out what I wanted most isn't there.

              Displaying historical data of the bid/ask volume indicators.

              I am now currently converting all my Bid/ask volume indicators to run off of Gomi's recorder.

              NT!!! You Slay Me!!!

              RJay
              RJay
              NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

              Comment


                #8
                Originally posted by rt6176 View Post
                Broke my heart to see NT getting further behind in regards to volume indicators.

                I waited a year for NT7 only to find out what I wanted most isn't there.
                Rjay: You don't need to feel lonesome on that score.
                Originally posted by rt6176 View Post
                Displaying historical data of the bid/ask volume indicators.

                I am now currently converting all my Bid/ask volume indicators to run off of Gomi's recorder.
                It's not all bad, at least with V7 there's downloadable replay data that can be used with Gomi's recorder.

                Comment


                  #9
                  The price series are not in database files, are they..

                  It appears that my original question that started this was off base because the files I was trying to access are not SQLServer database files, but some mysterious, proprietary type of flat file with an .ntd file extension, that I can't find any information on. So the idea of our putting useful information into the status field goes out the window for now.

                  It looks like the code that interfaces with these files is buried in dll's in the bin folder of C:\Program Files\Ninatatrader7. For now, I would be very reluctant to tamper with any of that.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  626 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  359 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  105 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  562 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  567 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X