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 kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    28 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    18 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    26 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    24 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    139 views
    0 likes
    Last Post SalmaTrader  
    Working...
    X