Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Substitute for ^ADD Index

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

    #16
    Hello PN720,

    BarsInProgress 0 is the primary series.

    Are you asking how to run the logic when BarsInProgress is 0?

    If you want to run the logic every 1 minute and the primary series is not 1 minute, you can add a 1 minute series with AddDataSeries() and then run on that specific BarsInProgress.


    The AdvanceDecline indicator adds a 1 tick ^ADV and 1 tick ^DECL for its calculations. To call this indicator from a host script, you must add those 1 tick series to your script as well.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      I thought the Support Document states that if you are running a strategy which uses an indicator which has secondary dataseries' you must add those same dataseries within the strategy. If this is true, wouldn't we have to add the ^ADV and the ^Decl dataseries within a strategy we are using it in?

      quote: (From Educational Resources/Multi TimeFrame & Instruments)

      Note: To maximize data loading performance, any NinjaScript object (indicator or strategy as host) which references a multi-series indicator which calls AddDataSeries must include it's own calls to AddDataSeries(). For example, if the code above was included in an indicator, and that indicator was referenced in a NinjaScript strategy, then the hosting strategy will need to include the same calls to AddDataSeries(). When the strategy adds the additional Bars objects, the calls to AddDataSeries() within the indicator will be ignored. If the Bars objects are not added by the strategy in such cases, and error will be thrown in the Log tab of the Control Center that would read - "A hosted indicator tried to load additional data. All data must first be loaded by the hosting NinjaScript in its configure state."

      Jim-Boulder
      NinjaTrader Ecosystem Vendor - Elephant Tracks

      Comment


        #18
        Hello Jim-Boulder,

        Yes you need to add the series that the indicator uses when its hosted. Chelsea had mentioned that in his reply:


        The AdvanceDecline indicator adds a 1 tick ^ADV and 1 tick ^DECL for its calculations. To call this indicator from a host script, you must add those 1 tick series to your script as well.​
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,607 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        9 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        19 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        6 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        16 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X