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

Secondary Series Stop Working

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

    Secondary Series Stop Working

    So I have ran into this issue a few times, where in, processing that occurs in my strategy within secondary time series stops executing. Hook up the debugger and the BarsArray[] Entries for the secondary series stay empty, and I am at a loss for why this happens. CurrentBars on the secondary series stay at -1. This script was functioning just fine a few days ago....

    I have verified that my data connection is connected, so I am not sure what the problem is here. The primary series loads and processes, but none of the secondary series are firing.

    After some digging it appears that my secondary series that are larger time frames then the primary are working fine, its the tick based series that isnt functioning at all.

    Something is definitely off, because if I try to run a tick series as the primary, I cant hit a break point on the entry of OnBarUpdate(). Is OnBarUpdate only called for time series bars?
    Last edited by BraisedInBlue; 12-09-2020, 04:01 PM.

    #2
    Hello BraisedInBlue,

    This is likely an issue with loading data.

    What is the line of code you are using for AddDataSeries()?

    Are you able to open a chart to the same instrument, bar type, and interval on a chart?

    Do any errors appear on the Log tab of the Control Center when enabling the script?

    OnBarUpdate() is called for all series added to the script for every bar update (such as a bar close) for all of the historical data loaded and in real-time.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      AddDataSeries(BarsPeriodType.Tick, 128);
      AddDataSeries(BarsPeriodType.Day, 1);
      AddDataSeries(BarsPeriodType.Week, 1);

      But I think I figured out the issue. Apparently the data back in 2007-2009 doesn't support tick replay. I am not sure what the resolution of data is from CQG going back that far, but it doesnt seem to support ticks.

      Comment


        #4
        Hello BraisedInBlue,

        Tick Replay requires historical Tick data.

        You have opened the Historical Data window and confirmed that for this instrument the tick data is available between those dates?

        I was not able to confirm, are you able to open a tick chart to the same instrument and see the tick data between those dates?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          If I attempt to load a chart in roughly the same time range, nothing populates.

          Comment


            #6
            Hello BraisedInBlue,

            Thanks for replying back.

            This would mean the tick data is not present and could not be used in a Tick Replay data series.

            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by terofs, Yesterday, 04:18 PM
            1 response
            21 views
            0 likes
            Last Post terofs
            by terofs
             
            Started by CommonWhale, Today, 09:55 AM
            1 response
            3 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by Gerik, Today, 09:40 AM
            2 responses
            7 views
            0 likes
            Last Post Gerik
            by Gerik
             
            Started by RookieTrader, Today, 09:37 AM
            2 responses
            12 views
            0 likes
            Last Post RookieTrader  
            Started by alifarahani, Today, 09:40 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X