Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order ID on Executions Tab Using Tradestation to NT SMTP

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

    Order ID on Executions Tab Using Tradestation to NT SMTP

    Hi,

    Here's my ongoing problem:

    Everyday I daytrade using TS --> NT SMTP order link.

    Everyday after trading is done, I want to compare my execution prices on ninjatrader/broker with each of my Tradestation strategies' simulated prices for slippage monitoring/tracking.

    What I have been doing, which can take up to an hour each day, is export the execution tab from NT to Excel, and then manually match these executions to the simulated entries/exits that I have written to a .csv file via EasyLanguage code during the day.

    On the executions tab, if I could only see a string "tag" of some sort, kind of like the hidden TS orderID string in TS orders that is used internally to cancel/replace/update stoploss orders, it would save me like 5 hours a week of manual labor.

    Is there anyway on the executions tab I can have NT display a string tag like this, or at least the Order ID of the order that was responsible for each executed trade? It would then be a cinch to write some vba Excel code to loop through and match the orders then to their simulated entries/exits.

    Even if i can't do this, I would like to know if it would be possible to write C# code that responds to an event like "OnLiveTradeExecution()" so that I could then try to obtain the ID of the last strategy or something.

    Example:

    In Tradestation:
    Buy ("breakout123") next bar 1000 stop;

    ::above stop at 1000 is hit and order is filled::

    I want to be able to view or print or access the string "breakout123" tied to the execution of that order.

    I hope this is clear.

    Thank you for your time.
    Attached Files
    Last edited by geoMEAN; 08-14-2009, 05:20 PM. Reason: grammar

    #2
    Hello,


    Are you using signal names with your orders? In the exam in this link you will see the following use of a signal name:


    EnterShort("SMA Cross Entry"); <--within quotes is the signal name

    Also have you tried writing your orders etc. to .csv file?:
    DenNinjaTrader Customer Service

    Comment


      #3
      Thank you for your reply Ben.

      I have tried using order names in my Tradestation orders both when using the SMTP interface and the DLL interface and neither show up on Ninjatrader.

      For example when in Tradestation I write:

      Buy ("breakout123") next bar market;

      "breakout123" does not show up anywhere on the ninjatrader execution tab. I would expect (or desire) it to show up in the "Name" column on the NT executions tab, but it just shows blank/nothing.

      I showed this in my screen captures in my original post.

      I don't think Streamwriter will accomplish what I need because I'm placing orders in Tradestation only. Unless there is a systematic way to detect an actual execution price for a given real account that was NOT executed with a C# / NT strategy, then I don't think a Streamwriter scheme will work.

      Do you have any other suggestions for how I can link a particular TS strategy name to the execution of that strategy's order?

      If not, I would like to add a feature request, which is that the "Name" field on the execution tab in NT show the strategy name (such as "breakout123" in the above example) if that order was executed via a TS to NT link (SMTP or DLL interfaces).

      Thank you.
      Last edited by geoMEAN; 08-16-2009, 10:50 PM.

      Comment


        #4
        geoMEAN, unfortunately this is expected - I'll forward your suggestion to development for consideration.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Is there any way to view the custom ORDER ID in Ninjatrader Control Panel when the ORDER ID was created in Tradestation easy language and then sent to NT via the Tradestation DLL ATI? It seems like my custom order id should show up in the ID, TOKEN, or other columns so it is easier to match my TS strategy orders to my live NT orders.

          This would be great if I could do this because I make my own ORDER IDs named by concatenating key things to make a unique ID:

          myOrderID = Account_StratName_Market_Date_Time ;

          Thanks!

          Comment


            #6
            If you submit via NTCommand I believe it should come through.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              I just tried it multiple ways with NTCommand and the orderID in the Control Center is still some very long obfuscated string of letters and numbers.

              Here's what I tried:

              IN TRADESTATION:
              Code:
              if lastbaronchart then
              begin
                  value1 = NTCommand("Place", "Sim101", "Buy", 1, "Market", 0, 0, "", "", "MyTestOrderID", "", "");
              end;
              And it looks like this: (see attached picture)
              Attached Files
              Last edited by geoMEAN; 11-09-2009, 03:46 PM.

              Comment


                #8
                Unfortunately that may be the case then.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by nandhumca, Today, 03:41 PM
                0 responses
                4 views
                0 likes
                Last Post nandhumca  
                Started by The_Sec, Today, 03:37 PM
                0 responses
                3 views
                0 likes
                Last Post The_Sec
                by The_Sec
                 
                Started by GwFutures1988, Today, 02:48 PM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by ScottWalsh, 04-16-2024, 04:29 PM
                6 responses
                33 views
                0 likes
                Last Post ScottWalsh  
                Started by frankthearm, Today, 09:08 AM
                10 responses
                36 views
                0 likes
                Last Post frankthearm  
                Working...
                X