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 sidlercom80, Today, 02:40 AM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by b16_aln, Today, 01:52 AM
          0 responses
          14 views
          0 likes
          Last Post b16_aln
          by b16_aln
           
          Started by junkone, Yesterday, 08:55 PM
          2 responses
          12 views
          0 likes
          Last Post junkone
          by junkone
           
          Started by adaeiqendqw, 01-16-2021, 02:56 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by [email protected], Yesterday, 06:10 PM
          5 responses
          17 views
          0 likes
          Last Post NinjaTrader_ChrisSch  
          Working...
          X