Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Time Frame (MTF) Indicator

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

    #31
    Hi ChelseaB,
    right clear. But when both timeseries are 60-min (or the same), it doesn't work because the primary series is processed first (TmpUpBuffer is zero or plot is false)....
    Peter

    Comment


      #32
      Hello Peter,

      If the primary series and secondary series use the same instrument and same interval, then its likely BarsInProgress 0 will run first (this is not guaranteed).
      (I'm not quite sure I understand why there would be an added data series that is the same instrument and interval as the primary series..)

      If the primary series and secondary series do not use the same instrument but use the same interval, then whichever tick is received first will be the first to trigger.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #33
        Hi,
        (I'm not quite sure I understand why there would be an added data series that is the same instrument and interval as the primary series..)
        As I wrote several times before, I want to have global picture (daily view) based on calculation from 60-min. But sometimes I would like to switch indicator view to 60-min for details -> PRIMARY will be equal to SECONDARY.

        It is still connected with your advise to move Plots to BarsInProgress PRIMARY section of my example indicator code. But when I move UpTargetBuffer[0]=TmpUpTargetBuffer[0]
        into PRIMARY section, there will be no values in TmpUpTargetBuffer[0] in case PRIMARY = SECONDARY

        if (BarsInProgress == 1)
        {
        TmpUpTargetBuffer[0]=1845;
        plot = true;
        }

        if (BarsInProgress == 0)
        {
        if(plot == true) Plot[0]=TmpUpTargetBuffer[0];

        Comment


          #34
          Hi Peter Cherry,

          Basically, if you have a primary data series that is equal to the secondary series, you will need different code.

          My suggestion in this situation is that if the primary and secondary dataseries are exactly the same, then have separate code that ignores BarsInProgress 1 and just do all calculations and plotting in BarsInProgress 0.

          (While I generally think plotting in bars in progress 0 is easier to understand and keep in my head, this is just a general tip that makes coding strategies easier but may not work in every situation).
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          581 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          338 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X