Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator using multiple instruments/timeframes

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

    Indicator using multiple instruments/timeframes

    Hi there,

    I want to write an indicator which requires access to a couple instruments/timeframes.

    Can this be done in a class derived from Indicator ?

    Thanks in advance
    Dominique

    #2
    Originally posted by dom993 View Post
    Hi there,

    I want to write an indicator which requires access to a couple instruments/timeframes.

    Can this be done in a class derived from Indicator ?

    Thanks in advance
    Dominique
    Yes

    http://www.ninjatrader.com/support/h...nstruments.htm

    Comment


      #3
      Thank you Sledge. Although I have several multi-instrument strategies, I didn't realize the same technique could be used in an Indicator.

      Now, to refine the initial question ... when I use an indicator from within a strategy, the strategy decides which instrument/timeframe (BarsArray) is to be used by the indicator as primary timeframe ... is it possible for the strategy to also provide the indicator with the secondary timeframe to be used, instead of the indicator having to find that on its own? (I suppose I can pass the instrument / PeriodType & period value as indicator parameters, but is there a way to pass a BarsArray to be used as secondary timeframe more directly ?)

      Thanks in advance
      Dominique

      Comment


        #4
        Originally posted by dom993 View Post
        Thank you Sledge. Although I have several multi-instrument strategies, I didn't realize the same technique could be used in an Indicator.

        Now, to refine the initial question ... when I use an indicator from within a strategy, the strategy decides which instrument/timeframe (BarsArray) is to be used by the indicator as primary timeframe ... is it possible for the strategy to also provide the indicator with the secondary timeframe to be used, instead of the indicator having to find that on its own? (I suppose I can pass the instrument / PeriodType & period value as indicator parameters, but is there a way to pass a BarsArray to be used as secondary timeframe more directly ?)

        Thanks in advance
        Dominique

        If I'm understanding...

        Isn't this the same as adding an EMA/SMA of 5/10/30/60 minutes to your strategy?

        Or adding 5/10/30/60 minutes and having EMA/SMA compute those, and your strategy can decide which to use?..



        Now if you want to start doing infinite possibilities of 1-1,000,000 of EMA, then you will hit performance issues for sure.

        Comment


          #5
          Although this is not the exact/final use of it, let's say I am building an indicator to compute a price ratio between 2 instruments (in a way that requires access to both instrument OHLCVT series).

          The strategy choose which is instrument #1, and which is instrument #2. Since the strategy already has BarArrays for each instrument, it would be nice to call the indicator providing both BarArrays.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by caacapital, Today, 10:10 AM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Started by DiverG20, Today, 10:23 AM
          0 responses
          21 views
          0 likes
          Last Post DiverG20  
          Started by SuneSorgenfrei, Today, 09:29 AM
          0 responses
          19 views
          0 likes
          Last Post SuneSorgenfrei  
          Started by dodoei, Today, 07:24 AM
          0 responses
          14 views
          0 likes
          Last Post dodoei
          by dodoei
           
          Started by thecashguys, Today, 06:13 AM
          0 responses
          13 views
          0 likes
          Last Post thecashguys  
          Working...
          X