Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calling another indicator with different TimeFrames

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

    Calling another indicator with different TimeFrames

    Hi,

    I have an Indicator (A) where I call another indicator (B).
    This B indicator gives a signal through a Plot.
    This B indicator has 2 TimeFrames.

    My question is: must I load these 2 TF from indicator B in the "State.Configure" from my indicator A?
    The B indicator is, of course, loading its own 2 TF in its "State.Configure" -> indicator B works properly from alone.

    How does it work?

    Thanks!​

    #2
    Hello artson,

    Yes, both indicators must have the same calls to AddDataSeries() in State.Configure.

    "Should your script be the host for other scripts that are creating indicators and series dependent resources in State.DataLoaded, please make sure that the host is doing the same AddDataSeries() calls as those hosted scripts would. For further reference, please also review the 2nd example below and the 'Adding additional Bars Objects to NinjaScript' section in Multi-Time Frame & Instruments​"

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Ok, thanks,

      And must be these AddDataSeries() in State.Configure in both indicators in the same order?

      Imagine this time, I have a master indicator A, calling to 2 different "slave" indicators B and C.
      B has 2 TF and C has 2 other different TFs.

      Must I load the AddDataSeries() in State.Configure in A in an order, or is indifferent?

      Comment


        #4
        Hello artson,

        The calls to AddDataSeries don't have to be in the same order, they just need to be added to both.

        Indicator A would need to have all 4 data series added.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks Chelsea!!

          Comment


            #6
            Ok, and one more question

            If in Indicator A I want the result from Indicator B in TF 2 (lets say 15 min), which is the TF from indicator A, when I should call this indicator B?, the TF from A corresponding to 15 min?

            or inside the indicator A, I allways call to B from TF 0 (default TF) because the indicator B will automathicaly calculate it inside it?
            (difficult to explain)

            Comment


              #7
              Hello artson,

              Any public plot series from an indicator will be synchronized to the primary data series. While you can add a data series and use this for calculations, the plots themselves that would be returning information to a host would be doing so when the primary series updates. The added secondary data series could be setting plot values, but those values will be updated for the host when the primary series updates.

              An example of using a higher time frame data series to set values for a lower time frame primary series may clarify.
              HigherTimeFrameIndicatorPlotExample - https://ninjatrader.com/support/foru...196#post820196
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by michelz, 02-18-2025, 08:30 AM
              18 responses
              370 views
              0 likes
              Last Post neveral0n3  
              Started by laketrader, 03-10-2025, 07:20 AM
              4 responses
              34 views
              0 likes
              Last Post laketrader  
              Started by owensd, 04-21-2024, 11:34 PM
              19 responses
              190 views
              0 likes
              Last Post Leeroy_Jenkins  
              Started by bokorb, 03-14-2025, 02:45 PM
              2 responses
              26 views
              0 likes
              Last Post bokorb
              by bokorb
               
              Started by Schools, 03-14-2025, 03:32 PM
              1 response
              26 views
              0 likes
              Last Post Schools
              by Schools
               
              Working...
              X