Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to build existing indicator on bars from BarsRequest?

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

    How to build existing indicator on bars from BarsRequest?

    Hello.
    I need to make the script that makes BarsRequest, and then take existed indicator and built it on requested bars and update it on each new requested bar.

    I tried once to create own list, that implemented ISeries interface. But, as for as I remember - I failed to use it as input for the standard indicators.

    Maybe there is another way?

    Thank you.
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Hello fx.practic,

    The BarsRequest is not intended to be used in this way. It does not provide its result in a Series<T> which your indicators are expecting. There is also not a specific way to format the data as a series from that context. You should instead use AddDataSeries from the script which calls the indicator or from the indicator its self.

    If you specifically need to use the bars request data you would need to just loop over the data and do your calculation in that way without calling indicators or passing the data. The BarsRequest is intended to give a live data subscription to the tool which uses it however it does also request a historical set of bars. The reason the bars are not in Series form is that this is generally used from the Addon context where there is no concept of "Chart" "Series" or "Indicators". In an addon you are not working with a chart or using Series so that type of synchronized result would not make sense in that use case.



    Please let me know if I may be of further assistance.

    Comment


      #3
      Hello, Jesse.
      That's clear.
      I was almost sure about it.
      And now I am sure 100% )

      Thank you.
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X