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

Loading lots of data

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

    Loading lots of data

    Hi all,

    I have a problem of loading time with one indicator.
    This indicator needs a primary data (15 minutes) and I have to load also BidAsk data.

    It means that I have to add this to the initialize method :

    Code:
    Add(Instrument.FullName,PeriodType.Tick,1, MarketDataType.Last);
    Add(Instrument.FullName,PeriodType.Tick,1, MarketDataType.Ask);
    Add(Instrument.FullName,PeriodType.Tick,1, MarketDataType.Bid);
    I have to load 50 days to apply the indicator.

    It takes a lot of time ... many minutes to load !

    Is there a faster way to load all this data ?

    Thank you

    #2
    blar58,

    50 days of 1 tick data is HUGE, and you're calling it 3 times for no real reason, that I can see.
    MarketDataType, is for real-time processing. You shouldn't be calling it for historical bars.

    If you need 50 days worth of 1 tick data, then just call it once, that will get your data in a 1/3rd the amount of time. But don't use the MarketDataType in the call.

    VT
    Last edited by VTtrader; 09-28-2011, 07:47 PM.

    Comment


      #3
      Thank you VTTrader for your response

      But if you look at intellisense you will see that you have access
      to a method : Add(Instrument, periodtype, period, marketdatatype)

      What I am trying to do here is to get the historical bid, ask and last so that
      I can manipulate them to get the historical delta.

      Am I on the wrong path ?

      Comment


        #4
        Sorry Blar58, I didn't mean to mislead you, I was thinking back in the days of NT6.5, when there wasn't the support for historical bid/ask data.

        That said, 50 days is an enormous amount of tick data, just for the Last price, and the Bid/Ask series would be far larger. I'm not sure what you're trading but if it's an active instrument, that's a ton of data. Perhaps a better approach would be to calculate in smaller chunks and write/append it to a file. Then read the results of your calculations from the file.

        You may also run into some alignment issues, since the bid/ask values will change more frequently than the last price, it will be tricky to sync them together accurately.

        VT

        Comment


          #5
          Thank you VTrader

          Yes I know about the sync issue.


          I think that unfortunately this problem cannot be really resolved.
          I would dream of the day that we can load 50 days of tick data in seconds !




          Cheers

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by xiinteractive, 04-09-2024, 08:08 AM
          4 responses
          12 views
          0 likes
          Last Post xiinteractive  
          Started by Mupulen, Today, 11:26 AM
          0 responses
          1 view
          0 likes
          Last Post Mupulen
          by Mupulen
           
          Started by Sparkyboy, Today, 10:57 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by swestendorf, Today, 11:14 AM
          2 responses
          4 views
          0 likes
          Last Post NinjaTrader_Kimberly  
          Started by TheMarlin801, 10-13-2020, 01:40 AM
          21 responses
          3,917 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Working...
          X