Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to solve the intraday volume data problem

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

    How to solve the intraday volume data problem

    I'm using (a newly purchased!) NT licence on Interactive Broker to implement a strategy live. The strategy needs volume data on intraday bars. Now that I have live connection to IB, I found out that the volume data is inaccurate when NT gets data from IB! Perhaps other users have been through this before and can share with me some possible solutions?

    1. The problem goes away when NT is forced to acquire historical intraday data from IB via the 'reload data' command. Can the ninjascript strategy invoke something similar and refresh the last few bars before getting into / at the beginning of OnBarUpdate?
    2. NT helpguide http://www.ninjatrader.com/support/h...rical_data.htm said "To minimize the need to load data and to speed up chart load times, NinjaTrader maintains an internal cache of your prior accessed data. When data is in this cache, NinjaTrader will use it to populate your charts instead of loading from your data provider."... is there a way not to populate that cache or flush that cache?
    If I don't open any chart and simply enable the strategy with calculateonbarclose = true in the control panel, would that make NT not subscribe to that snapshot stream from IB but instead rely on reload data?
    3. How can i see what data exactly is my strategy getting? To my surprise the Print() function that used to work for debugging into Output window in Strategy Analyzer no longer works when enabled in live trading! What can i do to see what my strategy is seeing in live trading?

    Thank you very much. Any inputs to any part of the puzzle are appreciated...

    #2
    Welcome to our forums here -

    1. Unfortunately there's no programmatic reload call available via NinjaScript.

    2. The cache is maintained automatically by NT - you could 'flush' it via deleting the subfolders in Documents\NinjaTrader 7\db\cache

    NT will always attempt to reload the current, all cases for a reload are listed and explained here :

    http://www.ninjatrader.com/support/h...rical_data.htm (second section please)

    3. The Print() should work either way, perhaps you're conditions are not triggering as expected live. Please just try printing for example the CurrentBar, Close and Volume at the OnBarUpdate() start.

    For more data consistency and higher performance, we would recommend using Kinetick to fullfill your NinjaTrader data needs - www.kinetick.com

    Free end of day data is provided by Kinetick per default with NT7 (File > Connect > Kinetick End of Day).
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,

      Thank you very much for your response. You are correct about Print(), obviously.

      Deleting those files every few minutes will be a worse option for me than hitting 'reload data' on the barchart. Is there anything inside the strategy code that i can do to enforce reload of historical intraday bars from IB?

      without some way out here my strategy is basically unusable on NT with IB. Kinetick doesn't have the product that I trade so i'm quite stuck with IB. please see if there is anything worth trying...

      thank you.

      Comment


        #4
        You're welcome - what products / markets do you trade?

        I believe you would work out a custom way to refresh data, but we could not support coding in this area - please have for example a look at the Pivots indicator and how it would asynchronously load data, perhaps you can modify / extend the concept for your use as well.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Why not fix the actual problem, which seemed to be:
          Not getting correct volume for intraday bars
          ?

          Comment


            #6
            This is unfortunately a current limitation of the TWS API that we would have no means to workaround from the NT side.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by funk10101, Today, 09:43 PM
            0 responses
            6 views
            0 likes
            Last Post funk10101  
            Started by pkefal, 04-11-2024, 07:39 AM
            11 responses
            37 views
            0 likes
            Last Post jeronymite  
            Started by bill2023, Yesterday, 08:51 AM
            8 responses
            44 views
            0 likes
            Last Post bill2023  
            Started by yertle, Today, 08:38 AM
            6 responses
            26 views
            0 likes
            Last Post ryjoga
            by ryjoga
             
            Started by algospoke, Yesterday, 06:40 PM
            2 responses
            24 views
            0 likes
            Last Post algospoke  
            Working...
            X