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

What is the difference between these 2 variables from a US market perspective?

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

    What is the difference between these 2 variables from a US market perspective?

    Hi,

    What is the difference between the following from a US market data perspective:-

    Low[1] and Bars.GetDayBar(1).Low
    High[1] and Bars.GetDayBar(1).High
    Close[2] and Bars.GetDayBar(2).Close
    Open[0] and CurrentDayOHL().CurrentOpen[0]

    The variables seem to differ in value and hence my values in my indicator seem to differ as well

    Regards
    Kay Wai

    #2
    Low[1] is the previous bar's value of whatever time frame you have on the chart (or host window such as Market Analyzer). This is subject to the Trading Hours you have selected for intraday bars, so it is quite likely you could get a previous bar's set of OHLC values different from the previous entire session's values.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hi Bruce,

      Thanks for your reply.
      I was using Low[1] on daily charts and Bars.GetDayBar(1).Low on intraday charts.

      My intraday chart hours are regular trading hours. Could that be the reason? How do I get regular trading hour values on a daily chart?

      Regards
      Kay Wai

      Comment


        #4
        Yes. Most likely you will find that your daily bars are ETH. To get regular trading hours on a daily chart try instead making it a minute bar chart (1440 minutes, which is a full 24-hour period) and then picking the trading hours from the dropdown that you want to use. It won't include all 24 hours - only the times included in your trading hours. In this way, you can make a daily bar chart of any trading hours.
        Bruce DeVault
        QuantKey Trading Vendor Services
        NinjaTrader Ecosystem Vendor - QuantKey

        Comment


          #5
          This is where the data provider is an issue. If I pulled 1440 min bar for 365 days with TWS, that will take forever to load. I had that problem at 240 min bars. It was a nightmare!

          Comment


            #6
            Yes, Interactive Brokers is not a suitable data feed. You'll want to pick up a paid data feed if you're going to be working with a lot of data. IB's data is okay for real-time usage, assuming they have what you need, but they do not really want to be in the historical data business so they only provide historical data with a lot of limits, including pacing and limited lookback, and these limits make them hard to use as a sole source for historical data if you're back-testing for doing research that involves looking very far back, or if you need historical data for a lot of instruments.
            Bruce DeVault
            QuantKey Trading Vendor Services
            NinjaTrader Ecosystem Vendor - QuantKey

            Comment


              #7
              Hello kaywai,

              Thanks for your notes.

              QuantKey_Bruce has provided some great information on this topic.

              You could take their advice into consideration regarding this inquiry.
              Brandon H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by fx.practic, 10-15-2013, 12:53 AM
              5 responses
              5,404 views
              0 likes
              Last Post Bidder
              by Bidder
               
              Started by Shai Samuel, 07-02-2022, 02:46 PM
              4 responses
              95 views
              0 likes
              Last Post Bidder
              by Bidder
               
              Started by DJ888, Yesterday, 10:57 PM
              0 responses
              8 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by MacDad, 02-25-2024, 11:48 PM
              7 responses
              159 views
              0 likes
              Last Post loganjarosz123  
              Started by Belfortbucks, Yesterday, 09:29 PM
              0 responses
              8 views
              0 likes
              Last Post Belfortbucks  
              Working...
              X