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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    53 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    35 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    103 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    182 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    171 views
    0 likes
    Last Post CarlTrading  
    Working...
    X