• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Method Help Overview

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

    Method Help Overview

    Is there a help page (or can there be) that summarizes by category the methods and their function? I find it very difficult to locate what I am looking for.

    #2
    imported post

    Which version?
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      Version 6

      Comment


        #4
        imported post

        NT6 Help Doc is for NinjaScript is about 70% complete. I assume you have viewed the current information in the Help Doc? Most if not all relevant methods and propertiesthat are in the scopeof NinjaScript is documented.

        Ray
        RayNinjaTrader Customer Service

        Comment


          #5
          imported post

          Yes, I have reviewed it and find it generally to be quite useful. However, I do find it difficult to find which methods I need and think a brief overview would be useful too.

          My current questions are how to get:

          1) close of prior day price

          2) After a bar on a 3 or 1 minute chart has closed, I want to know the next tick valaue. Would I need another chart by ticks to get the open of the next bar immediately and then use FirstTickOfBar? Or is there a better way?

          3)I want to verify one bar is lower than the previous bar and that the colors have changed. There is a green bar and now the next bar is red -- market direction changed. I have NBarsDown(1,false, true, true)[0] Is this the method to use?

          Comment


            #6
            imported post

            a) Next NT6 beta (available in a few days) will support a new method "GetDailyBar(daysAgo)". This will return you a bar for the complete days. It will return null in case there is no data available for the selected day. You'll need to code something along these lines:
            Code:
             if (Bars.GetDailyBar(1) != null)
              Print(Bars.GetDailyBar(1).Close.ToString());
            b) Just set your indicator/strategy to CalculateOnBarClose=false and watch the FirstTickOfBar property. No need to go another chart/data series or so.

            c)
            Code:
             if (Close[0] < Close[1])
              Print("Got it");
            should do the trick

            DierkNinjaTrader Customer Service

            Comment


              #7
              imported post

              Thank you for your help.

              Can I use the GetDailyBar to get the open oftoday's market at a specific time, e.g. 9:30 also?

              Comment


                #8
                imported post

                Yes, as soon as you got the first tick of that day. Just call "Bars.GetSessionBar(0).Open"
                DierkNinjaTrader Customer Service

                Comment


                  #9
                  imported post

                  Is this going to be available soon?

                  Thanks, Suzy

                  Comment


                    #10
                    imported post

                    We aretargeting Monday for next beta update. Method name hasaslo changed to Bars.GetSessionBar().

                    Ray
                    RayNinjaTrader Customer Service

                    Comment


                      #11
                      imported post

                      Ray, I have the new version of NT6 and see this is implemented. I don't understand how to use it to get the yesterday's close at 4:15 pm when the markets close and the open at 9:30 am.

                      The help says, it is virtual and built off the underlying data series and do not represent the actual day. Can you please clarify what I need to store to really get yesterday's information and have it be precise?

                      Thank you. Suzy

                      Comment


                        #12
                        imported post

                        Do you have a data feed that supports historical daily data? If yes, the just add a daily bar series to your strategyand reference this data. See the section on multi instruments and time frames and the Add() method for some guidance.

                        If you do not have a data feed that support daily bars, then you have to use GetSessionBar() which builds (compresses) tick/minute based data into bar that represents sessions based on you session start and end times. You can then acces the OHLC of this session bar.

                        Ray
                        RayNinjaTrader Customer Service

                        Comment


                          #13
                          imported post

                          1) According to the doc, a free Yahoo feed can supply daily historical data though I cannot see daily bars on the chart nor can I import data. Minute increments work fine. I know Ninja Trader doesn't supply the feed, but have you seen this working?

                          2) Can I be connected to one feed, such as Zen-Fire, and getting historical data from Yahoo at the same time by adding an instrument to the chart strategy using Add()? If so, what syntax allows me to designate Yahoo?

                          3) If I understand correctly, GetSessionBar() willreturn the open and close only for the periods of time which I was attached and if I missed a day or certain hours the results will not tell me the opening and closing bell figures.

                          Comment


                            #14
                            imported post

                            1) Yahoo feed does not support futures at this time.

                            2) Internal connection objects are added to an internal connection collection as you connect. What NT does is when a data request is made from the UI, it loops through the connections and checks for the first one that supports the instrument type and the type of data request (real-time or historical) and gets data from there. In your example, this won't work since both Zen and Yahoo provide historical data but one only daily the other intraday. What I suggest is using eSignal. You can get a cheap NT only subscription for aorund $50 permonth via the link at the bottom of this post. Within your Zen account connection, uncheck the Historical data server check box. Connect to Zen first, then to eSignal. NT will then use Zen for real-time data only, eSignal for historical data.

                            3) This is dependant on the provider. Since you use Zen, NT will go to get historical data from the servers so even if you were connected, you will get data. However, Zen historical data is a bonus and not a historical data server that you should rely on if you need to ensure that you have valid data. If the Zen provided historical data server goes down and there is a gap, it will not be filled. Best bet is use the eSignal combo I suggested.

                            http://www.ninjatrader.com/web/eSign...rPromotion.pdf

                            Ray
                            RayNinjaTrader Customer Service

                            Comment


                              #15
                              imported post

                              Is there an alternative if one is unable to use e-signal? I had to cancel my esignal subscription. When i installed a dual-wan port to make my feed more reliable, e-signal stopped working. They check incoming URL's against user identity and if they see two URL's for the same identity, (my dual-wan router multi-tasking between cable and dsl) they immediately shut down the feed for both url's. Not fixable by tech support at e-signal and they don't intend to fix it.

                              I do have Tradestation. Can I backfill historical data with Tradestation as you described for esignal?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Atilla, Today, 04:26 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post Atilla
                              by Atilla
                               
                              Started by FelixMMM, Today, 04:11 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post FelixMMM  
                              Started by TazoTodua, Today, 02:02 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post TazoTodua  
                              Started by rehema, Today, 01:29 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post rehema
                              by rehema
                               
                              Started by Papercut110, Yesterday, 11:25 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post Papercut110  
                              Working...
                              X