Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by arvidvanstaey, Today, 02:19 PM
        4 responses
        11 views
        0 likes
        Last Post arvidvanstaey  
        Started by samish18, 04-17-2024, 08:57 AM
        16 responses
        61 views
        0 likes
        Last Post samish18  
        Started by jordanq2, Today, 03:10 PM
        2 responses
        9 views
        0 likes
        Last Post jordanq2  
        Started by traderqz, Today, 12:06 AM
        10 responses
        18 views
        0 likes
        Last Post traderqz  
        Started by algospoke, 04-17-2024, 06:40 PM
        5 responses
        48 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X