Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

2 Questions

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

    2 Questions

    I have a question with regards to how the strategy session time works. If I have a session start at 8:30 on the 3 minute time frame, and I call the Close[1] right at the start, will the strategy see the 8:27 bar or the bar from the previous session? If I set it to 8:30-15:00, would it use the 15:00 bar for the Close[1]?

    Also, if I have strategy A that has an Open position and calls a helper method in strategy B, and strategy B calls MarketPosition.Position == Position.Flat, will it see the position as flat or would it recognize the open position and act accordingly?

    Thanks

    #2
    On the close of the 8:33 bar (1st bar of the session), Close[1] will return the last bar of the prior session. If you session time ended at 3:15 PM, it would reference the last bar of around that time.

    Position only returns the position of that strategy, not the underlying account.
    RayNinjaTrader Customer Service

    Comment


      #3
      So in order to avoid using the bar from the previous session, I need to do something like
      if (Bars.BarsSinceSession > 1){return;}?

      Comment


        #4
        Yes, that approach would work.
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        561 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        325 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
        547 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