• 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

getDouble name parameter

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

    getDouble name parameter

    I am using the NTDirect.dll. A couple questions on using it:

    1) Can you please provide a list of the supported values that the GetDouble(name) method recognizes/supports for the 'name' parameter?
    Likewise for the GetInt(name) method?

    2) Is there a way to get the date/time of the most recent tick received for a given instrument?


    Thanks,
    Gary

    #2
    Hello Gary,

    Thank you for your post.

    The Get methods pull a variable by it's string (name), this is used to call the value of the given variable. And there is no method to pull the time stamp of the last tick for any given instrument.

    eSignal sample code can be found at the following link: http://www.ninjatrader.com/support/h...tsub=getdouble

    Please let me know if I may be of further assistance.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Your answer suggest that the GetDouble and GetInt methods are only valid in the eSignal environment. Is that true?

      Also, since you did not provide a list of recognized 'name' parameters, that suggests that there are corresponding SetDouble/SetInt methods where the caller can set a variable and then later get it. Is that true?

      I would sure like to see more features exposed in the NTDirect (or similar) dll interface that allow a client program to do more. Perhaps you can open this up for version 8?
      Specifically, I would like:
      - Access to most recent values of an instrument: (Open,High,Low,Close,Time,Volume)
      - Ability to get data from historical bars on chart. Not asking for unlimited historical data.
      - Available funds in account

      Thanks,
      Gary

      Comment


        #4
        Hello GaryAlbers,

        Thank you for your response.

        NTGetDouble and NTGetInt are used in the eSignal sample at the following link: http://www.ninjatrader.com/support/h...lightsub=ntget

        Regardless of where it is used it returns the value of the requested type, so GetDouble(myDouble) returns the value of the double named myDouble. You create the double, the valid names that can be used are doubles that you have created or any double that can be accessed.

        I recommend reviewing the Functions for the DLL at the following link: http://www.ninjatrader.com/support/h.../functions.htm

        You will find the double BuyingPower(string account) and double CashValue(string account) among the functions available.

        What are you looking for as far as Open, High, Low and Close? Is this the OHLC of the bar type and how would the bar type be defined? Or is this the OHLC of the session and how would you define the session?

        NinjaTrader does not provide historical data, you would need to connect to a data feed provider in NinjaTrader that supports historical data. You can then export that data and import it through your own custom program. For information on exporting historical data in NinjaTrader please visit the following link: http://www.ninjatrader.com/support/h.../exporting.htm

        I look forward to your response.
        Last edited by NinjaTrader_PatrickH; 12-10-2013, 08:59 AM. Reason: Typos
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          There appears to be no corresponding SetDouble(name, value) method and the eSignal example does not show how a value can be set.

          Please explain what method a user of the NTDirect dll could call to set a value that could be retrieved by GetDouble or GetInt.

          Thanks,
          Gary

          Comment


            #6
            Hello Gary,

            Thank you for your response.

            The answer is actually in your questions, GetDouble() will pull the value of a double. So look for doubles like the two previously provided: double BuyingPower(string account) and double CashValue(string account)

            Please let me know if I may be of further assistance.
            Patrick H.NinjaTrader Customer Service

            Comment


              #7
              Patrick,

              You have not really answered the question about GetDouble(string name), which is:
              What values will Ninja provide an answer for?
              You elude to 'BuyingPower' and 'CashValue' as two examples that would work. Those values are owned by Ninja and therefore Ninja is making those values available. My original question is what is the entire list of 'names' that Ninja makes available?

              Your previous answers also elude to the possibility that my code could set a value which could be returned by the GetDouble or GetInt. If so, then what method on the dll would I call to make this value available to subsequent callers? There are no SetDouble or SetInt methods!

              Gary

              Comment


                #8
                Hello Gary,

                Thank you for your response.

                There is no list of the doubles that can be pulled or ints. You can however find the Functions available from the DLL which list several ints and doubles at the following links:
                How are you using the NTDirect.dll? Where are you building your application? Or are you building this in EasyLanguage or through eSignal? I can provide specifics if you can provide how and where you are using the NTDirect.dll.

                I look forward to your response.
                Patrick H.NinjaTrader Customer Service

                Comment


                  #9
                  Patrick,

                  I use NTDirect.dll from standalone C# apps I have built where I need to code something that is outside the intent of an indicator or strategy. For example, I built a specialized DOM for pairs trading where the values on the DOM are displayed in terms of the spread between the two instruments.

                  Currently, I am summarizing information from multiple instruments and displaying the output graphically.
                  I see why the MarketData method is limited to just returning latest value of subscribed datastream. So, since getting the data I need from MarketData is not supported, I was hoping for another option.
                  It would solve my problem if there was a way that my indicator code could use NTDirect.dll to make user defined data available to callers outside of ninja. That is why I keep asking if there is a way for a caller to set a value, i.e., SetDouble(name, double).

                  Gary

                  Comment


                    #10
                    Hello GaryAlbers,

                    Thank you for your response.

                    The GetDouble is used in C# based on the information at the following link: http://msdn.microsoft.com/en-us/libr...v=vs.100).aspx

                    Whether we use GetDouble(int i) or NTGetDouble(name) we are calling a variable by it's name and pulling it's double value, however the value must already be a double as no conversion of the value itself. This being said there is no list of these as these are called based on the name given to them in the code.

                    An example is if I define int "i" and then pull it's double value with GetDouble(). For NTGetDouble() if would be the name of the variable that you call to retrieve it's double value. Once again, there is no list of names as the names are given in the code by the programmer.

                    Please let me know if I may be of further assistance.
                    Patrick H.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by iq200, Today, 09:57 AM
                    1 response
                    16 views
                    0 likes
                    Last Post NinjaTrader_ChristopherD  
                    Started by _Zero_, Today, 09:19 AM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_Jim  
                    Started by GLFX005, Today, 09:05 AM
                    3 responses
                    23 views
                    0 likes
                    Last Post NinjaTrader_RyanS  
                    Started by meandthetrio, Today, 09:03 AM
                    1 response
                    5 views
                    0 likes
                    Last Post NinjaTrader_PatrickG  
                    Started by peakythomas, Today, 08:34 AM
                    1 response
                    6 views
                    0 likes
                    Last Post NinjaTrader_Tyler  
                    Working...
                    X