Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Interact with Ninjatrader from an external application

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

    Interact with Ninjatrader from an external application

    I would like to know if there is any mechanism to interact with Ninjatrader 8 from an external application.

    I have developed an application outside of Ninjatrader, and I would like to forward order requests to Ninjatrader 8.

    Basically, having Ninjatrader 8 connected to an account, I would like to click a button in my other application and have an order forwarded to be placed within Ninjatrader.

    Does Ninjatrader allow this? Is there an API or something one can use for this?

    Thank you.

    #2
    Hello blunt,

    NinjaTrader does have an API. Support for the API is limited.

    Below is a link to a forum post with information about using the API.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea.

      For what I can understand from the documentation here:




      You can place an order using the following method exposed in the DLL:

      int Command(string command, string account, string instrument, string action, int quantity, string orderType, double limitPrice, double stopPrice,
      string timeInForce, string oco, string orderId, string strategy, string strategyId)
      Function for submitting, cancelling and changing orders, positions and strategies. Refer to the Commands and Valid Parameters section for detailed information. A return value of 0 indicates success and -1 indicates an error. The Log tab will list context sensitive error information.

      Am I understanding the documentation correctly?


      What about order placement confirmation and / or fill information?

      Do I need to poll this for getting updated order information until the order gets placed and same thing for filled?


      string OrderStatus(string orderId)
      Gets the order state (see definitions) for the orderId. Returns an empty string if the order ID value provided does not return an order.

      Comment


        #4
        Hello blunt,

        Yes, the Command method allows orders to be submitted, cancelled, or changed.

        Also, all methods you must call for calling information. There are no events from the API that you can add handlers to.
        The Orders() method is used to get a list of IDs. The OrderStatus() method is used to get the status of an order with a specified ID.

        Below is a link to the available methods.

        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by JonesJoker, 04-22-2024, 12:23 PM
        8 responses
        41 views
        0 likes
        Last Post JonesJoker  
        Started by timko, Today, 06:45 AM
        0 responses
        3 views
        0 likes
        Last Post timko
        by timko
         
        Started by Waxavi, 04-19-2024, 02:10 AM
        2 responses
        37 views
        0 likes
        Last Post poeds
        by poeds
         
        Started by chbruno, Yesterday, 04:10 PM
        1 response
        44 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Max238, Today, 01:28 AM
        1 response
        25 views
        0 likes
        Last Post CactusMan  
        Working...
        X