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

AddDataSeries with Tick INdex does not provide any data

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

    AddDataSeries with Tick INdex does not provide any data

    Hi
    I have attached my strategy to the ESH0 chart and am trying to get hold of the 5 minutes Tick (^TICK) values. But it seems there is no data provided when i try to access the dataseries with Closes[1][0]. See below. So what am I doing wrong ?

    Best Regards,
    Sune

    #2
    Hello SuneSorgenfrei,

    Thanks for your post.

    Please check the log tab of the Control Center for any errors received by the script. Please also confirm that you can open a chart to receive data for that symbol. Ensure that the symbol entered in AddDataSeries matches the symbol name in a chart's Instrument Selector. The symbol which should be used is "^TICK"

    I look forward to assisting.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Again
      I have changes the Symbol to ^TICK and it seems that i get data when testing with Closes[1].Count, but I keep getting the error below
      Strategy 'TickFade': Error on calling 'OnBarUpdate' method on bar 0: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
      Which I do not understand as i am only refering to Closes[1][0], which in my understanding should be the secondary dataseries and the current value.

      Comment


        #4
        Hello SuneSorgenfrei,

        Your script is referencing Closes[1][0], but it is not known if the the strategy has processed the secondary bar first, or processed the primary bar first and is trying to access the secondary bar before it has been processed.

        I suggest checking that the strategy has processed 1 bar on the secondary data series before making the reference for Closes[1][0]. I.E.

        Code:
        if (CurrentBars[1] < 1)
            return;
        This leads off of the advice we provide for making sure there are enough bars in the data series you are accessing. See below.



        For a complete information on working with Multi Time Frame scripts please see here - https://ninjatrader.com/support/help...nstruments.htm

        I look forward to being of further assistance.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cocoescala, 10-12-2018, 11:02 PM
        6 responses
        939 views
        0 likes
        Last Post Jquiroz1975  
        Started by gbourque, Today, 06:39 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by benmarkal, Yesterday, 12:52 PM
        3 responses
        23 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by helpwanted, Today, 03:06 AM
        1 response
        20 views
        0 likes
        Last Post sarafuenonly123  
        Working...
        X