Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-time current bar open price

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

    Multi-time current bar open price

    In a multi-timeframe strategy,
    how can the opening price of the currently building bar of another timeframe be accessed?

    For example:
    barsSeriesIndex 0 is a 1 minute PeriodType
    barsSeriesIndex 1 is a 1 week PeriodType

    When in the BarUpdate method and BarsInProgress=0, how can the opening price of the currently building weekly bar be obtained?

    Opens[1][0] returns the open of the last completed bar, not the open of the currently building bar.

    #2
    There is no currently building bar when you are backtesting. Backtest is pure snapshots. Weekly bars come in at the end of each week. There is nothing inbetween.

    In real-time you have to use CalculateOnBarClose = false and then you can access the weekly bar via Opens[1][0]
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    160 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    307 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    245 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    349 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    178 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X