Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

multi instrument / multi timeframe strategy - FirstBarOfSession

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

    multi instrument / multi timeframe strategy - FirstBarOfSession

    NT support,

    Could you please help me?

    When I have a multi instrument / multi timeframe strategy – i.e. I have GBPUSD both 1 and 60 min and USDJPY 1 and 60 min.

    In that instance what exactly does property FirstBarOfSession return true when used in the OnBarUpdate method?

    I would suggest an update on the documentation for this, it is silent on the issue unless I’m looking in the wrong spot.

    Thanks and regards,

    drolle

    #2
    Hi drolle,

    FirstBarOfSession relates to a specific bar series. You can access its value for multiseries context using a BarsInProgress filter:

    if (BarsInProgress == 0 && Bars.FirstBarOfSession) { } //Checks for first bar of session during updates to primary series only.

    The rules for the session template used in multiseries scripts are available here:


    See the notes in section:True Event Driven OnBarUpdate() Method

    If a multi-series script adds an additional Bars object that already exists on the chart, the script will use the preexisting series instead of creating a new one to conserve memory. This includes that series' session template as applied from the chart. If the Bars object does not exist on the chart, the session template of the added Bars object will be the session template of the primary Bars object. If the primary Bars object is using the "<Use instrument settings>" session template then the additional Bars objects will use the default session templates as defined for their particular instruments in the Instrument Manager.
    Last edited by NinjaTrader_RyanM1; 08-11-2011, 05:01 PM.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    44 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X