Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATI issue when strategy enabled

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

    ATI issue when strategy enabled

    When I enable my TradeStation strategy on a given market, I am getting an oddball order placement in another market even though no other market is loaded or strategy applied.

    The attached graphic explains what is happening. In a nutshell, I have a 55t @ES chart with a strategy that I've updated to use the NT DLL interface. I have all of the necessary code in place to make sure that no trades get placed before the last bar of the chart *and* until all of the trade logic is setup correctly. Once all is in place, the limit order(s) are placed accordingly. However, I am getting a weird order generated to buy the ER2 market as well at the same @ES limit price.

    Again, please see the attached graphic.

    I believe this to be an NT bug.

    I am running the latest 6.1000.2 build.
    Attached Files

    #2
    Please check a few things -

    - In NT Instrument Manager, is the external symbol mapping for the ER2 instrument configured for ES?
    - Your EL function call for placing orders, are there any references to ER2 anywhere along the link of function calls?
    RayNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Ray View Post
      In NT Instrument Manager, is the external symbol mapping for the ER2 instrument configured for ES?
      No. I verified this twice. All are set correct.

      Originally posted by NinjaTrader_Ray View Post
      Your EL function call for placing orders, are there any references to ER2 anywhere along the link of function calls?
      I hadn't checked this but I have now and nothing at all referencing any hard coded symbol names.

      What I find interesting is that this order got placed without the NTCommand function printing any statements referencing the ER2 market at all. I had updated the NTCommand function to print out EVERY command sent to it and that is what you see in the TradeStation Output window. There are only ES commands placed. Therefore, I believe this order came from the NinjaTrader ATI itself.

      Comment


        #4
        You can look at the log tab where this order was placed, it should show you a log showing that it came from a call to our ATI. If not, let me know.
        RayNinjaTrader Customer Service

        Comment


          #5
          Yes, the order is coming from the ATI according to the log. However, looking at the attached log snapshot, there appears to be some "early" orders being placed before the actual ATI order. It appears different than the order placed by the correct order on the @ES market.

          See snapshot.

          Thanks again.
          Attached Files

          Comment


            #6
            This looks fine to me. What it does show is that the ER2 order was placed external from NT. Somewhere an order was placed for the ER2.
            RayNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Ray View Post
              This looks fine to me. What it does show is that the ER2 order was placed external from NT. Somewhere an order was placed for the ER2.
              I disabled the SMTP server in NT. I will see if that has anything to do with this the next time I load the strategy.

              Thanks for all of the help Ray.

              Comment


                #8
                OK. Now I KNOW it is not me here. In the last 5 minutes, I've disabled and enabled a strategy on an ER2 chart and had NQ, ES and ER2 orders placed on the different strategy startups. I don't even have an NQ chart loaded.

                I AM checking for LastBarOnChart. In each of the occurrences of an incorrect market showing up, the limit price on the order is the price of the ER2 market. I am using the standard, NinjaTrader supplied TradeStation functions for all of my calls. I have verified that the symbol mapping is correct in NinjaTrader.

                I don't know what else to try next. Do you guys have some other ideas on how to troubleshoot this? It seems to me that the correct symbol is not being passed back from TS to NT. I am using continuous contracts in TS and I have them mapped to automatic nearest contracts in NT (not directly tied to a particular contract). I have tried it both ways with same results.

                Comment


                  #9
                  I recall someone had posted (possibly in this forum) that there are situations where TS does not submit the correct information based on how the many strings.

                  What you can do is in your strategy, override the functions and include a parameter where you have to pass in the actual instrument name. So for ES, you could pass in "ES 06-07".
                  RayNinjaTrader Customer Service

                  Comment


                    #10
                    [QUOTE=ThePatientOne;10146]OK. Now I KNOW it is not me here. In the last 5 minutes, I've disabled and enabled a strategy on an ER2 chart and had NQ, ES and ER2 orders placed on the different strategy startups. I don't even have an NQ chart loaded.QUOTE]

                    Here is a snapshot of what I am talking about. Getting frustrating not knowing what is going on. Could it be a bug in TradeStation not getting the correct symbol name at this point? It seems as if NT is simply cycling through the list of instruments in my instrument list.
                    Attached Files

                    Comment


                      #11
                      I meant to say how TS handles string management. As per my last post, hard code the instrument name in all order functions.
                      RayNinjaTrader Customer Service

                      Comment


                        #12
                        I got this resolved.

                        1) Changing the NT functions to require passing the symbol name did not make it work correctly yet.

                        2) I had to create my own timing function to prevent any orders from being generated until TradeStation was "ready". There appears to be an unstable period during TradeStation's strategy "history" processing that caused extra orders and incomplete variable initialization.

                        All is well now.

                        Thanks again for your help.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by arvidvanstaey, Today, 02:19 PM
                        4 responses
                        11 views
                        0 likes
                        Last Post arvidvanstaey  
                        Started by samish18, 04-17-2024, 08:57 AM
                        16 responses
                        61 views
                        0 likes
                        Last Post samish18  
                        Started by jordanq2, Today, 03:10 PM
                        2 responses
                        9 views
                        0 likes
                        Last Post jordanq2  
                        Started by traderqz, Today, 12:06 AM
                        10 responses
                        18 views
                        0 likes
                        Last Post traderqz  
                        Started by algospoke, 04-17-2024, 06:40 PM
                        5 responses
                        48 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Working...
                        X