Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get ISeries from BarSeries in Add-On

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

    Get ISeries from BarSeries in Add-On

    I am developing an add-on in which I am defining two bar series using BarsRequest.

    I would like to find an EMA value of the Highs for each of the two bar series.

    How do I get an ISeries (which I can use in the EMA function) from a BarSeries?

    Thanks!


    #2
    Hello kenconcannon,

    Thanks for your post.

    So I may accurately assist, could you please provide a brief description of what exactly you are wanting to accomplish?

    For example, are you wanting to get the EMA value in a script similar to getting the high value using BarSeries.GetHigh(index)?

    I look forward to assisting 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


      #3
      Hi Brandon,

      I am trying to create an add-on which determines the trend and correlation of multiple instruments.

      I want to be able to use functions that require I pass it an ISeries (such as High, Low, Typical, etc.)

      I know I can use the GetHigh() for an individual bar with the BarRequest object, I was hoping to get the same ISeries that I would use in a strategy or indicator. Currently I am thinking that I have to create the list by going through each bar on the BarRequest object and populating the ISeries list that I would create.

      Before I went down this route I thought I would inquire if there was a better way.

      Comment


        #4
        Hello kenconcannon,

        Thanks for the clarification.

        No, BarRequest returns an array of data and subscribed to the market data. ISeries are part of indicators, strategies chart objects, etc. An addon has no concept of "bar" you would need to write your own logic that does your own math based on the array of data that is available to do an EMA.

        Since there is no concept of a series<T> in an addon, you would need to just use regular math based on the data available.

        Series<T> requires being configured in a specific way from chart scripts so you wouldn't be able to use that type. You could manually calculate what you need but you cannot pass that data to existing indicators or anything that takes a series.

        Please let me know if I 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
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X