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 CortexZenUSA, Today, 12:53 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by CortexZenUSA, Today, 12:46 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by usazencortex, Today, 12:43 AM
    0 responses
    5 views
    0 likes
    Last Post usazencortex  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    168 responses
    2,265 views
    0 likes
    Last Post sidlercom80  
    Started by Barry Milan, Yesterday, 10:35 PM
    3 responses
    11 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X