Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem when adding secondary ticks data series (with tick replay mode)

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

    Problem when adding secondary ticks data series (with tick replay mode)

    Hi,
    After adding ticks dataseries in the OnStateChange method we get the exception listed below. It is happening only while loading the chart.

    In OnStateChanged we add the dataseries using the following line:
    AddDataSeries(BarsPeriodType.Tick, 1);

    We test this in replay mode. It is working on two PCs but on the third PC we get data out of the range of the chart, and this is why it is throwing the exception below.
    It is strange that if we use 32 days back chart it is not throwing the exception, but if we are using 30 days back chart we get the exception... While the 32 days chart has more bars than the 30 days chart.

    I want to note that we have tick replay data for 3 days back, all other 27 days are loaded historically (for them we do not have tick data in the NT8 DB)

    I am suspecting that this is DB/data issue, but decided to ask you and to see what you will suggest

    P.S.
    Even if we delete the tick replay data and download it again, the exception continues to exist.
    I get the current tick/bar closing price using - Closes[1][0]
    Two lines after that I am getting the prior tick bar close using
    if (p > Closes[1][1]) {...}
    and here it is the place where I get the exception. What is worrying me is that on one of the computers we get the following exception (on the other two test PCs we do not have this issue)

    Parameter name: index
    at System.ThrowHelper.ThrowArgumentOutOfRangeExceptio n(ExceptionArgument argument, ExceptionResource resource)
    at NinjaTrader.Data.BarsSeries.GetOpen(Int32 index)
    at NinjaTrader.Data.BarsSeries.GetClose(Int32 index)
    at NinjaTrader.Data.Bars.GetClose(Int32 index)
    at NinjaTrader.NinjaScript.PriceSeries.get_Item(Int32 barsAgo)
    at NinjaTrader.NinjaScript.Indicators.DValueAreaFinal _NoUI.OnBarUpdate() in c:\Users\abubi\Documents\NinjaTrader 8\bin\Custom\Indicators\DValueAreaFinal_NoUI.cs:li ne 1374

    #2
    Hello vlaladim,

    Thank you for your post.

    It certainly could be a data issue.

    To confirm, are you using the same type of connection on all three PCs? Who is your data provider? And the script tested is the same on all three computers as well?

    Would you be able to supply a reduced version of the code with all code unnecessary to reproduce removed? I'd like to see if I get the same on my end.

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Hi Kate,
      Yes the tests are absolutely the same on all three computers. We are using Interactive Brokers as data provider.
      But this problem shows up only when we use replay data, and is happening only while it is processing Historical data, once the chart is updated and is with non historical state
      Attached Files

      Comment


        #4
        Hell vlaladim,

        Thank you for your reply.

        So this is occurring in Playback using Market Replay before it gets to the actual data being played back, is that correct?

        Can you confirm that this PC has historical tick data downloaded for the entire historical time period being loaded prior to starting playback? It's worth noting that the data loaded on the chart prior to beginning playback is loading from your historical data, and IB does not provide historical tick data. You can check the available tick data by going to the Historical Data window and expanding the Historical section and drilling down to the tick level.

        Thanks in advance; I look forward to assisting you further.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        62 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        134 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X