Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

High/Low since session start

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

    High/Low since session start

    Hi,

    I'm developing a multi-instrument stocks 5m intraday strategy on US session.
    I want to find out for each instrument the High/Low points since the session start.
    For example for stocks XYZ 2 hours from the start of the trading day(9:30EST) I want to know what was the High point and the low point.
    I thought about using the Max/Min function and to give them the number of bars since the session started something like that:
    Code:
    max = MAX(Highs[5], BarsSinceSession)[0];
    My problem is that I don't know how many bars there are for each instrument, Maybe the primary BIP has more bars since the other BIP.
    What do you think is the best approach to solve this?

    TX,
    Roy

    #2
    Originally posted by freewind View Post
    Hi,

    I'm developing a multi-instrument stocks 5m intraday strategy on US session.
    I want to find out for each instrument the High/Low points since the session start.
    For example for stocks XYZ 2 hours from the start of the trading day(9:30EST) I want to know what was the High point and the low point.
    I thought about using the Max/Min function and to give them the number of bars since the session started something like that:
    Code:
    max = MAX(Highs[5], BarsSinceSession)[0];
    My problem is that I don't know how many bars there are for each instrument, Maybe the primary BIP has more bars since the other BIP.
    What do you think is the best approach to solve this?

    TX,
    Roy
    Reference specific bar series by either;
    Using a BarsInProgess filter when needed: http://www.ninjatrader.com/support/h...inprogress.htm,
    or by specifying the bar series with an index: http://www.ninjatrader.com/support/h...html?highs.htm

    Comment


      #3
      If I understood what you meant the BarsSinceSession is tight to the BIP the called the OnBarUpdate(), am I correct?

      Comment


        #4
        Originally posted by freewind View Post
        If I understood what you meant the BarsSinceSession is tight to the BIP the called the OnBarUpdate(), am I correct?
        Not quite. You said that you want to find when each instrument in a multi-instrument ...

        The BarsInProgress will filter calculations to the instrument which matches its BarsInProgress index, and exclude the other instruments.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        650 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
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        577 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X