Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ISERIAS values when no data exist

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

    ISERIAS values when no data exist

    Hi,

    I'm using AddDataSeries() to add ^TICK. I might be wrong but I've noticed that if there is no data for the TICK (for example when I run historic data), the data series holds the close price of the main series. Is that correct?

    Since I add several data series (from different classes) I'm not sure what's the series index number in the array. How can I reference a data series by its name?

    Thanks

    #2
    Hello ofiramitai,

    Thank you for your post.

    If there is no data for an instrument that is added to your script, OnBarUpdate() would be prevented from being called for that instrument so the instrument would hold no values. It also may prevent the script from running. The added instrument would not hold the Close price of the main series.

    You could open a chart for the added instrument to verify if you have data for that instrument before using the script.

    Added data series cannot be referenced by name. Instead, you would need to use a BarsInProgress check for the added data series. An added series index is referenced in the order that the series was added to your script. If you have 3 added series, the primary series is referenced using BarsInProgress == 0, the first added series would be BarsInProgress == 1, the second added series is referenced with BarsInProgress == 2, and so on.

    For more information about AddDataSeries and BarsInProgress, please see the documentation linked below.
    AddDataSeries - https://ninjatrader.com/support/help...dataseries.htm
    BarsInProgress - https://ninjatrader.com/support/help...inprogress.htm

    Please let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    559 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    546 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X