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

BarsInProgress

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

    BarsInProgress

    I would like to know what happens when an indicator is derived from another indicator which has many Time Series.

    Example :

    Indicator1 : Indicator
    Indicator 2 : Indicator1

    Indicator1 has 2 BarsArray (ProgressBar == 1 1 tick and ProgressBar ==0 30 minutes)
    Do I have to Add 1 tick period to Indicator2 if I don't need it...


    Thanks

    #2
    Hi blar58,

    Values generated from other series are available without having to add the series. The series, themselves are not available from the calling indicator unless you add them.

    Example.
    Indicator 1 calls Indicator 2

    Indicator 2 has added series and plots a value based on these added series. You can access the value of this plot from indicator 1, but not the series unless you add it.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ryan

      Here is my situation :

      Code:
      Indicator1 : Indicator
      
      Initialize()
      Add(PeriodType.Tick,1);
      
      OnBarUpdate()
           if(BarsInProgress ==1)
            indicator2OnMarketData(volume)
      
      
      Indicator2 : Indicator1
      Initialize()
      .....
      
      indicator2OnMarketData(volume)
      // do stuff
      Tick dataseries has been added to Indicator 1 only. When I called BarsInProgress == 1
      and I called a method that belongs to indicator 2 which has only the primary bar series
      does the indicator2OnMarketData(volume) method is being executed with tick data series ?

      Thanks

      Comment


        #4
        Indicator 2 offers only the BIP that the series is applied to, since no other series has been added. You can access values generated from Indicator 1, even if the values are based on another series.

        If you need to do calculations on other series within indicator 2 then all these series must be added.

        Attached are two scripts that illustrate this. Indicator 2 is getting a value that is derived from the added series in indicator 1. This is available, but the series itself is not available unless you add it.
        Attached Files
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        942 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        9 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        4 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        28 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        33 views
        0 likes
        Last Post wzgy0920  
        Working...
        X