Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

API function "Last"

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

    API function "Last"

    I am new to NT though I have used it to create automatic application to send trade.

    Now, I was trying to see if I can access the trade price and size for that traded price. I couldn't find anything. The only function that I can use is "Last" but was not sure what it is for.

    What exactly this function is used for. What would I do with this function? What price and size parameter values should I pass?

    int Last(string instrument, double price, int size)
    Sets the last price and size for the specified instrument. A return value of 0 indicates success and -1 indicates an error.

    -Nitin

    #2
    Hi Nitin, Welcome to the NinjaTrader support forum!

    If you want to access symbol price data, you would use SubscribeMarketData() first and then MarketData() to access the last, bid or ask price of the instrument.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks! I understand the "MarketData" function.

      What I want to know is the trade size for the instrument, so that I can create Times and Sales data.

      Also, want to understand what is the use of function "Last". What should I pass in the parameters. What is the price and size parameter value that I should pass? Why would a user want to set the last price?

      I am asking this question because I want to get the raw price and size data for the last traded price. Please let me know if I am clear.

      Thanks again.

      Comment


        #4
        Hi Nitin,

        Unfortunately it is not possible to access the bid / ask / last volume with the API.

        You can take a look at this NinjaScript reference sample - http://www.ninjatrader-support2.com/...ead.php?t=3478




        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks Again! That is great help.

          What if I want to use the NinjaTrader.Data object from outside Ninja Trader and not as Ninja Traderscript, is that possible? Or I have to limit myself to the script that can be used inside the Ninja trader.

          In other words, if I have my own application and I am using Ninja Trader to access the level II data, it that possible. Please let me know.

          Comment


            #6
            Hi Nitin, unfortunately this is not supported - so to use OnMarketData() and OnMarketDepth() you would need to stay in the NinjaScript environment, for a good start please see - http://www.ninjatrader-support.com/H...verview18.html

            These are our reference samples - http://www.ninjatrader-support2.com/...splay.php?f=30
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Hello Bertrand,

              I have a question regarding Ninjatrader API. Is it possible to write a connection to other broker than you currently oficially support? I have a friend that currently trading via hedge fund proprietary system and would like to purchase lifetime licence for ninjatrader, providing that their programmer will have enough information about ninja API to connect to their system.
              That system has some level of integration with Esignal.

              I would appriciate any information.

              Thank you.

              Comment


                #8
                Hi xtrender, unfortunately this is not supported. We do not offer a full blown API for integration, but a versatile Automated Trading Interface (ATI) to execute trade signals from other platforms. Here's an overview what one can do with it - http://www.ninjatrader-support.com/H...heConcept.html
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Thank you for quick response.

                  I am still somewhat confused about your answer, is it a yes or no?
                  The question is if I generate a signal from a strategy within NinjaTrader will I be able to send (enter)live order to proprietary execution system?

                  All indicators and strategies within Ninja in C Sharp and Ninja Script language, while DLL and COM is VB or C based. Do you have any examples on how you have had integrated Ninja automated trading with brokers that you do support or this is propriatary info?

                  Would any Ninja consultant be able to address this question or they also do not posess the expertise to write a proprietary link to non supported execution system?

                  Comment


                    #10
                    Hi xtrender, unfortunately this is not supported.
                    BertrandNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by TheWhiteDragon, 01-21-2019, 12:44 PM
                    4 responses
                    542 views
                    0 likes
                    Last Post PaulMohn  
                    Started by GLFX005, Today, 03:23 AM
                    0 responses
                    3 views
                    0 likes
                    Last Post GLFX005
                    by GLFX005
                     
                    Started by XXtrader, Yesterday, 11:30 PM
                    2 responses
                    11 views
                    0 likes
                    Last Post XXtrader  
                    Started by Waxavi, Today, 02:10 AM
                    0 responses
                    7 views
                    0 likes
                    Last Post Waxavi
                    by Waxavi
                     
                    Started by TradeForge, Today, 02:09 AM
                    0 responses
                    14 views
                    0 likes
                    Last Post TradeForge  
                    Working...
                    X