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

Bar data loading issue

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

    Bar data loading issue

    Why does this indicator load bar sets with conflicting data?

    The indicator makes two requests for bar data. The requests are identical except for the start date.

    Once both bar sets are loaded, the indicator extracts all bars from a particular day that both bar sets have in common, and dumps them to file. From a visual inspection of the file, we can see that while timestamp and volume information agrees, the close values conflict.

    The data differences are screenshotted below with red boxes indicating different data areas.

    The code is screenshotted below and also attached as a file below.

    The output shown is from a test on NQ 09-18 on 22 August 2018.
    The bar requests are for 1-tick bars.
    My NT7 data options are set to "Merge Back Adjust"
    Data provider is CQG.

    The conflicting results are duplicable regardless of whether the data source is connected or not, and are identical after a complete restart of NT7 including a flush of the /db/ data folders.



    Attached Files
    Last edited by bboyle1234; 08-22-2018, 11:20 PM.

    #2
    Hello bboyle1234,

    Thank you for your post.

    The Bars.GetBars() functions is not supported and should not be used to compare data loading sets.

    What were you attempting to achieve that led you to Bars.GetBars()?

    I look forward to your response.

    Comment


      #3
      Hi Patrick,
      I was attempting to load historical tick data in order to fill in volume profile information.
      Loading the tick data as a secondary data series for the indicator is not an option.
      Thank you,
      Ben

      Comment


        #4
        Hello bboyle1234,

        Thank you for your response.

        May I ask why loading the Tick data as a secondary series is not desired? Loading a secondary series for 1 Tick is what is used in the Order Flow + tools for NinjaTrader 8 and serves what I suspect is your purpose as well.

        I look forward to your response.

        Comment


          #5
          Hi Patrick, it's too slow. Here's why.
          For live trading, our users only need to show a few days back on their charts. With each chart loading only ten days back, for example, workspace loading can be very quick. However, our indicators require data aggregated from months of historical tick data. If the historical tick data is only available as a secondary chart series, then we are forcing the users to load charts with months of data back instead of just a few days.
          When you apply this requirement to several indicators on many charts, as we have done, we have users with workspaces taking over half an hour to load, with NT7 unresponsive the entire time.
          Therefore I aim to download the historical tick data separately, process it and provide results to the indicators.
          Thank you for taking the time to understand, and I appreciate your help in obtaining an accurate supply of historical tick data information.

          Comment


            #6
            Hello bboyle1234,

            Thank you for your response.

            There would not be a supported means to work around the loading of data as intended for the NinjaTrader 7 platform.

            BarsRequests are supported in NinjaTrader 8 for Add On development. This could be an option to allow for your custom data load and then supply that to your indicators. You can find more details at the following link: https://ninjatrader.com/support/help...arsrequest.htm

            Please let me know if you have any questions.

            Comment


              #7
              I managed to obtain consistent data by using calls to bars.GetClose(i), bars.GetVolume(i), bars.GetTime(i) etc instead of Bars.GetBar(i)

              Comment


                #8
                Originally posted by NinjaTrader_PatrickH View Post
                Hello bboyle1234,

                Thank you for your response.

                There would not be a supported means to work around the loading of data as intended for the NinjaTrader 7 platform.

                BarsRequests are supported in NinjaTrader 8 for Add On development. This could be
                mycfavisit an option to allow for your custom data load and then supply that to your indicators. You can find more details at the following link: https://ninjatrader.com/support/help...arsrequest.htm

                Please let me know if you have any questions.
                However, our indicators require data aggregated from months of historical tick data. If the historical tick data is only available as a secondary chart series, then we are forcing the users to load charts with months of data back instead of just a few days.

                When you apply this requirement to several indicators on many charts, as we have done, we have users with workspaces taking over half an hour to load, with NT7 unresponsive the entire time.

                Comment


                  #9
                  Hello Denis399, thanks for your post, and welcome to the forums.

                  NinjaTrader 7 is out of the development cycle. NinjaTrader 8 now fully supports bars requests. See here for documentation:



                  There is a full example of a full featured addon here:



                  Please let me know if I can assist any further.
                  Chris L.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by TraderBCL, Today, 04:38 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post TraderBCL  
                  Started by Radano, 06-10-2021, 01:40 AM
                  19 responses
                  606 views
                  0 likes
                  Last Post Radano
                  by Radano
                   
                  Started by KenneGaray, Today, 03:48 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post KenneGaray  
                  Started by thanajo, 05-04-2021, 02:11 AM
                  4 responses
                  470 views
                  0 likes
                  Last Post tradingnasdaqprueba  
                  Started by aa731, Today, 02:54 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post aa731
                  by aa731
                   
                  Working...
                  X