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

Historical Data not enough

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

    Historical Data not enough


    Hello,

    I developed this strategy which has ES and VX instruments as input data series , although it operates on ES. On May 4 opened a position on ES 06-20 contract.
    This was all ok until I had to close NinjaTrader, reopen it, connect to Kinetick and IB Gateway, and enable all my strategies again.
    This strategy's position was lost. So I checked on several aspects and noticed that this strategy was reading historical data starting on May 7.
    What is really weird to me is that if I open the exact same data series using the exact same parameters as the strategy on a Chart, I can see the account position on May 4.
    Another thing I noticed is that when this first happened the historical data loaded started on May 7 2020 1:00 am but the last time I checked (aprox 22h later) historical data started on May 7 2020 11:00 pm.
    Why does the strategy reads starting on May 7 and not '50 days to load' which is the setting I'm using?
    Can you help me please? I need this strategy to get back to its real position.

    Thanks in advance

    #2
    Hi lismartin, thanks for your question.

    By "The strategy's position was lost" do you mean the strategy took a position on the real time data, but when you enable the strategy again on the historical data that position is not calculated any more? If you right-click the chart>Reload all historical data do you get the missing data back? A good benchmark to check if things are working properly would be to test the SampleMACrossover strategy, make this take a position, disable it, then set your startup behavior to Immediately submit and re-enable the strategy. In this scenario, the strategy should detect it should be in a position from the historical data and close the position on the next order.

    I look forward to hearing from you.

    Chris L.NinjaTrader Customer Service

    Comment


      #3

      Hello, thanks for replying.

      Q1: "By 'The strategy's position was lost' do you mean the strategy took a position on the real time data, but when you enable the strategy again on the historical data that position is not calculated any more?"
      A1: Yes, the strategy does not calculate the position anymore on historical data when ebnabling it again.

      Q2: "If you right-click the chart>Reload all historical data do you get the missing data back?"
      A2: My strategy object is created from Strategies Tab and not from a Chart. When I open a new Chart on that particular instrument I can see all data I requested and I can even see the account order on May 4.

      The thing is I need my strategy to get enough historical data for it to read the date when the order was made.
      Thank you in advance

      Comment


        #4
        Hi lismartin, thanks for your reply.

        It sounds like you might be running this strategy on bars that require Tick data. During market hours kinetick will limit the amount of tick data you can request. When requesting tick data between the hours of 9:30am ET to 4:30pm ET you will have access to 8 days of historical tick data.

        If the data series is tick based, try requesting the data after market hours and of course make sure you have enough days to load on the chart.

        I look forward to hearing from you.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hello Chris, thanks for replying.

          My strategy is not using tick data, it operates on bar close based on 3 hours bars.
          Here's the settings panel for this particular strategy.
          Is there any other case that may be happening that I have not considerered?

          Comment


            #6
            Hello lismartin, thanks for your patience.

            How are you confirming the max data loaded when loading the strategy through the Strategies tab? I would guess you are printing the Time[0] value on every bar close, correct? e.g. Print(Time[0]);

            If you do get less data than a chart even though the data series settings are exactly the same I would like to test out your strategy on my end to see if the problem is reproducible. You may Export it and send it to platformsupport at ninjatrader.com and reference "AttnChrisL 2555509"

            I look forward to hearing from you.
            Chris L.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ZenCortexCLICK, Today, 04:58 AM
            0 responses
            2 views
            0 likes
            Last Post ZenCortexCLICK  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            172 responses
            2,280 views
            0 likes
            Last Post sidlercom80  
            Started by Irukandji, Yesterday, 02:53 AM
            2 responses
            17 views
            0 likes
            Last Post Irukandji  
            Started by adeelshahzad, Today, 03:54 AM
            0 responses
            4 views
            0 likes
            Last Post adeelshahzad  
            Started by Barry Milan, Yesterday, 10:35 PM
            3 responses
            13 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X