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

How to calc daily bars from intra-bar data

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

    How to calc daily bars from intra-bar data

    My data provider does not provide daily bar data for the ES (emini S&P500). I would like to be able to calculate a 14 day ATR for use in a strategy.
    Does anyone have code that can generate daily bar data and store it in a way that it can then be input to an indicator?

    Thanks.

    #2
    zacharydw00, please try running your ATR calcs on 1440 min charts / series then as workaround.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Using a 1440 min bar on a 24hr chart doesn't give the correct results. Is it possible to store the (end of market) 4:00pm EST bar's closing price to an arraylist or some other list type, and then feed the list to the ATR indicator? I don't think I can use a DataSeries, because there is only 1 element of data per day. Thanks for any suggestion on how to approach this.

      Comment


        #4
        If you look for the cash session closing value, best would be to use a 390 min chart then and set session times to your 9:30 AM - 4:00 PM, this should replicate the chart you need.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          My strategy requires a 24hr chart. Restricting the session times is not possible. So, back to my last question, is it possible to store the (end of market) 4:00pm EST bar's closing price to an arraylist or some other list type, and then feed the list to the ATR indicator?

          Comment


            #6
            zacharydw00, yes you could store the 4:00 PM price to an arraylist and then calculate your own ATR on that, but unfortunately this is outside of what we can support. It would easier to connect to a third party feed first that would allow you to access the daily historical data you need.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Aviram Y, Today, 05:29 AM
            0 responses
            1 view
            0 likes
            Last Post Aviram Y  
            Started by quantismo, 04-17-2024, 05:13 PM
            3 responses
            25 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by ScottWalsh, 04-16-2024, 04:29 PM
            7 responses
            34 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cls71, Today, 04:45 AM
            0 responses
            6 views
            0 likes
            Last Post cls71
            by cls71
             
            Started by mjairg, 07-20-2023, 11:57 PM
            3 responses
            216 views
            1 like
            Last Post PaulMohn  
            Working...
            X