Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

A server-side ATM via a Strategy or Indicator

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

    A server-side ATM via a Strategy or Indicator

    I have tried multiple combinations and I cannot find a way where I can do the following where the TP and stop are "Suspended" orders sitting on Tradovate:

    1. Buy Stop entry above price that has a stop and TP.

    This is possible if you use NinjaTrader gui, select an ATM with a stop and TP, and then right-click the Chart and "Buy Stop Market 1 XXXXX". This mechanism, it behaves as intended. Note I have the server side ATM checkbox enabled.

    I cannot find a way to utilise Order class to do this, nor SubmitOrderUnmanaged, nor any combination of SetProfitTarget, SetStopLoss, EnterLongStopMarket functions.

    I am flexible here, but the goal ultimately is to create TP and stop BEFORE the entry is executed on the market.

    Greatly appreciate any advice / techniques. The purpose of this is to catch super fast moving news events. If NinjaTrader does it, there is Internet lag.



    #2
    To clarify: Ninja Trader simply creates the local approach of creating stop and TP AFTER the entry hits the market when I try to do a serverside ATM via Ninjascript. The only way I've managed to make it do what I want is if I physically use my mouse and the chart which is not the goal. So server side ATMs are indeed possible, but I need help to do it via code.

    Thanks

    Comment


      #3
      Hello firefoxforum12,

      This is correct, unfortunately server side Atms are not supported with NinjaScript and only the local Atms can be used in NinjaScript.

      Below is a link to where this is stated in the help guide.
      Operations > Advanced Trade Management (ATM) > Server Side vs Local ATMs > Miscellaneous differences
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Thanks for reply.

        Some questions:
        1. Are there plans for this to be improved so code is also supported server side?
        2. With Ninjascript local ATMs, can you please confirm that NinjaTrader is constantly polling for an Entry to fired, which it will then manually send to server, the TP and Stop?
          1. Is there knowledge of where Tradovate exists so perhaps I can buy a server in their location to run NInja Trader off that, to mitigate the problem here of speed, somewhat?

        Comment


          #5
          Hello firefoxforum12,

          Unfortunately, I would not be able to speak of future plans for NinjaTrader.

          It is event based. When the entry execution occurs (which also triggers OnExecutionUpdate()) the stop and target are submitted.

          The brokerage servers are located in Chicago.
          Search trading apps & services to cusomize your NinjaTrader platform with trading indicators, signals and strategies.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Hi, by "Event based", could you please specify how Ninja Trader is knowing the entry execution occurs? Does Tradovate (who I am using) TELL ninja trader over the Internet that the entry has fired, or is Ninja Trader using its live price feed to Assume its entered?

            Basically I am identifying if the Internet lag is involved to communicate to NT that the entry happened or if Ninja is just assuming it did and immediately firing the stop and TP orders ?

            Sort of nit picky question but thats how important it is for me... thank you for digging into this one for me. I appreciate its not a common question!

            Comment


              #7
              Hello firefoxforum12,

              NinjaTrader receives order update and execution update messages from the brokerage from the connection. When the message is processed this triggers an event which runs any subscribers such as strategy OnOrderUpdate() and OnExecutionUpdate() methods.
              You can see these messages getting received from the Log tab of the Control Center.

              Yes, if the brokerage is Tradovate then this brokerage would be sending order update messages to NinjaTrader through the connection to brokerage.
              No, NinjaTrader does not progress live orders on a brokerage from any assumptions.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Thank you. Last question: Is this a UDP connection (as in its constantly streaming data down to Ninja Trader, and now on as "As needed" basis) and back up to the brokerage? Sort of like how multiplayer games operate? Again asking regarding speed of receiving execution updates from broker and speed to send back TP and stop additional entries.

                Comment


                  #9
                  Hello firefoxforum12,

                  While I am not able to provide details on the protocols used, I can say that the connection is intended to be in constant communication.

                  Data and order updates will be flowing back and forth between your computer and the server.

                  The speed these are received will be affected by latency (the amount of time it takes for packets to be sent and received through the internet) and is affected by distance to the servers.
                  Chelsea B.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Jimmyk, 01-26-2018, 05:19 AM
                  8 responses
                  863 views
                  0 likes
                  Last Post emuns
                  by emuns
                   
                  Started by giulyko00, 04-24-2024, 12:03 PM
                  6 responses
                  29 views
                  0 likes
                  Last Post giulyko00  
                  Started by 00nevest, 04-27-2024, 02:27 PM
                  3 responses
                  27 views
                  0 likes
                  Last Post 00nevest  
                  Started by Newtrader101, Today, 07:36 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post Newtrader101  
                  Started by 21laienoch, Today, 07:25 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post 21laienoch  
                  Working...
                  X