Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EasyLanguage to NinjaScript

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

    is there a recommended way of loading data? If the chart is started in the middle of the trading day I have to use the last function otherwise I use historical manager. I am trying to do it with minimal user input which is why I cant use Historical manager.

    Comment


      Hello RobinT,

      We would not have any resources on automating the historical data import.

      Comment


        Can you tell me how to get bar data by bar number?

        This is all happening at bar 1 so i cant use barsago, or High[1].

        if ( BarsInProgress == 0 & CurrentBar == 1 )
        {
        I get the bar number

        dt = Bars.GetTime(Bars.Count-1) ;
        barno = Bars.GetBar(dt) ;

        so how do I get the bar data using barno ? High, Low ?

        Comment


          Hello RobinT,

          Thank you for your post.

          Which bar's data are you trying to get? The current bar calling OnBarUpdate() or the right most bar on the chart (Count)?

          Comment


            I am trying to get all the bars in the last trading day, so its the right most bar, ie close and the bar before that, all the way back to the open. I am trying to make a checksum so I can verify the data otherwise I will tell the user to do a Historical update.

            Comment


              You can use other items like Bars.GetClose, Bars.GetOpen, etc.

              Comment


                after your suggetion I looked around and found Bars.GetHigh(barno) which should do the trick. Thanks.

                Comment


                  worked perfectly. Thanks again.

                  Comment


                    I use a special session template (which is NYSE hours plus 1 minute). How do I send that template and where I can I find it?

                    Comment


                      also, how do you set a chart not to display holidays. I have a big space from yesterday.

                      Comment


                        Hello RobinT,
                        Thanks for writing in.
                        You cannot send just a custom session. You would need to send your entire database file which includes the following and would replace these items for the other user.
                        ATM Strategy templates, Session templates, Instrument Lists / Custom Instruments, historical trade execution data, and various other NinjaTrader things
                        The database file is named ninjatrader.sdf and is located under Documents\NinjaTrader 7\db
                        There is not an option to exclude holidays in NinjaTrader 7. This feature has been added to NinjaTrader 8.

                        Comment


                          TimeZone

                          I want to get the NYSE start time in local time.

                          I use

                          Bars.Session.GetNextBeginEnd(BarsArray[0], 0, out sessionBegin, out sessionEnd);

                          in the OnStartUp()

                          but the time varies depending on the UK summer time for the first bar on the chart.

                          How do I get this information for today.

                          Comment


                            I put it in firstbarof session ok.

                            but I need it for currentbar = 1 as I am trying to do some calculations on the data before the day starts.

                            Comment


                              the problem is that from 3/12//16 for two weeks the time difference is 6 hours instead of the normal 5 hrs.

                              Comment


                                One solution is to always have the chart in EST. How do do that? I use the US Equities RTH session.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                605 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                351 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                105 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                560 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                561 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X