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 cmoran13, 04-16-2026, 01:02 PM
    0 responses
    43 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    26 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    163 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    98 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    158 views
    2 likes
    Last Post CaptainJack  
    Working...
    X