Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator on other time frame

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

    Indicator on other time frame

    How do I apply an indicator to a secondary time frame chart? I thought
    it was merely to do it like the following pseudo code:

    Add(other time frame); // becoming the BarsArray[1] Bars object
    Add( indicator( BarsArray[1],... );

    But when running that, it tells me I can't use BarsArray in the Initialize method.

    I have browsed the manual pages for a solution, but not been able to find one. Please help me.

    #2
    Unfortunately indicators only run on 1 (!) data series. Only strategies support multiple data series (which wold allow you to code your issues there).

    Comment


      #3
      Hmm; I did try this within a strategy.? My logic involves one indicator on the main chart, and another indicator on a secondary chart. Basically it involves two charts with separate indicators that I want to read off and combine through this magic formulae.

      Comment


        #4
        - unfortunately you can not cross reference indicators on different charts
        - please check out SampleMultiInstrument strategy for how to work with indicators on different series

        Comment


          #5
          Thanks. Good. Right. So I just apply the secondary chart indicator on the fly. I assume this primarily means that my strategy does not receive events from the secondary indicator, which is totally fine.
          But, are there performance implications? E.g., is the secondary indicator re-created for each usage?

          Comment


            #6
            Indicator on secondary series has the same performance impact as indicato on primary series. Just give it try.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            51 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            142 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            160 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            96 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            275 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X