Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Identify higher timeframe session open and close

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

    Identify higher timeframe session open and close

    Hi - I am working on code that uses multiple timeframes. As an example, I have a 60m chart with a weekly data series added in code. If need to find accurate datetime of the weekly 'bar' open and close, correctly accounting for market holidays and partial holidays, is there a recommended approach that works for all instruments?

    I'm trying to use Instrument.MasterInstrument.TradingHours.Sessions, along with ActualSessionBegin/ActualSessionEnd. The first to identify the correct trading days and the second to find the accurate start/end times.

    Are these the best methods for this task?

    #2
    Hello john_44573,

    Thank you for your post.

    Both are fine to use for what you're looking for. Instrument.MasterInstrument will work well especially if all the added series are using the same instrument, if they're not you may need to filter by BarsInProgress. ActualSessionBegin/End will also work well as long as you supply the correct bars object to the SessionIterator, you can use BarsArray for that.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X