Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar data from GetBars()

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

    Bar data from GetBars()

    Hello,

    GetBar () function return us the bar object that matches the time stamp based on the DateTime parameter passed in. Will these bar be from historical data in data manager or the data provided?

    Thanks,

    #2
    tazz90, the timestamps would always be converted to your local PC timezone, as that's what NinjaTrader would use for all its operations. So if you imported / downloaded data > it would be converted as needed to your target timezone.

    Comment


      #3
      Thank you for replying.

      But I guess I stated my question quite vague. I wanted to ask that does bar data we get from GetBar function belong to our local data (data in data manager) or it is from the data provider ?

      For example:
      I am using the following piece of code to get 1 min bars from 1-1-2013 to 1-2-2013 and if I am connected to some data provider then these 1 month 1 min bars will belong to my local data in Ninja trader or it will be from data provider?

      Bars newBars = Data.Bars.GetBars(Instrument, new Period(PeriodType.Minute, min, MarketDataType.Last), new DateTime(2013, 1, 1),new DateTime(2013, 2, 1), Data.Bars.GetSession(Instrument, ""), Data.Bars.SplitAdjust, Data.Bars.DividendAdjust);


      Thanks,

      Comment


        #4
        tazz90, that would depend what's present in your local data and if the request would trigger NT's reloading rules for historical data. For example it would always reload from your provider if the current day was included in the request.

        All rules would be detailed in the second subsection on this link - http://www.ninjatrader.com/support/h...rical_data.htm

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        164 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        318 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        246 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        350 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X