Announcement

Collapse
No announcement yet.

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.

    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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        43 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        124 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        65 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X