Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars used in Multi-Time frame

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

    Bars used in Multi-Time frame

    I have a strategy that is run on a 10 minute chart. I am trying to use an indicator on a 2 minute basis, on the 10 min chart. All works well with Add() 2 min bars object and BarsInProgress ==0 except:

    If I use the MIN function to confirm that the MIN value of an indicator on a 2Min basis is less then a certain value for x periods, the software uses the 10 minute periods rather then the 2 minute periods.

    Here is the code:

    // Conservative go long condition. 10Min RSI 0.50 or above, 2Min R+R swing low
    if (BarsInProgress == 0)
    {
    if (DmRSI(Period)[0] > 0.48
    && DmREIplusRSI(BarsArray[1], 8)[0] > DmREIplusRSI(BarsArray[1], 8)[1]
    && DmREIplusRSI(BarsArray[1], 8)[1] < DmREIplusRSI(BarsArray[1], 8)[2]
    && MIN(DmREIplusRSI(BarsArray[1], 8),3)[0] < 35.0)
    {
    DrawArrowUp("GoLong1" + CurrentBar, true, 1, Low[0] + -5 * TickSize, Color.Gold);
    }
    }

    See the MIN(DmREIplusRSI(BarsArray[1], 8),3)[0], the calculation is done using the 10 minute bars rather then the 2 minute bars.

    What do I need to code to make it use the 2 minute bars here? This condition has to include both 10 minute and 2 minute statements.

    Thanks

    #2
    Hello gDavis,

    Thank you for your note.

    How do you know the MIN is only working for the 10 minute bars? Have you printed out the values and compared them on the chart?

    The current setup is taking the MIN value of the last three bars for the DataSeries input that you are passing through it, which is an Indicator using the 2 Minute Bars.
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    649 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    573 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    576 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X