Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OrderStatus

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

    OrderStatus

    Dierk,

    Here is my problem:
    I bought the permanent license and started trading live. My Tradestation strategy passes 2 opening orders to my middleware. One long and one short.

    Because of the volatility in the markets, in the same bar, the short got triggered and a position was opened. In the same bar, the long open order, closed my short order. This was obviously wrong. Since Tradestation only cancels the other order at the close of the 2 min bar, there is nothing I can do.

    The other problem is that the Trailing stop, Take Profit and stop loss need to be placed when the order is open and not at the close of the 2 min bar.

    This lead me to implement this functions in my middleware as the NT .Net API does not allow for this functionality.

    Here are the problems:
    1.- NT is not event driven. This means that I have to monitor every order, at least once a second to see when they get filled as well as price to see when to move the stop. There is a need for event driven routines!

    2.- Since I'm creating several orders when a position gets opened, it's Extremely important to know when the position gets closed so that I can cancel ALL the SL, TP and trailing stop orders. NT DOES NOT provide position information functions.

    I don't quite know what to do at this point. I have only seen my losses accumulate due to the lack of functionality and I have also spend at least 200 hrs coding this middleware.

    I need your help here. Some functionality needs to be added to the API.

    Philip

    #2
    1) Correct, ATI is not event driven. You need to poll the order, position etc. status.
    2) You can poll the position status by NTMarketPosition http://www.ninjatrader-support.com/H...Functions.html

    Comment


      #3
      Correct me if I'm wrong but, NTMarketPosition works on a specific instrument. If I have multiple strategies trading the same instrument, this function becomes unuseable. Hence the need to know the status on a per order basis and not on a per instrument basis.

      Comment


        #4
        Correct, this is the account position and not the strategy position.

        Comment


          #5
          That's why I'm asking for your help. Further functionality need to be added to the API

          Comment


            #6
            Thanks for your suggestion. We'll add it to the list of future considerations.

            Comment


              #7
              Dierk,

              I appreciate you putting this up for consideration. I do however need a more clear response as this might preclude me from using NT and hence, returning my license.

              Regards,

              Philip

              Comment


                #8
                Sorry to hear that... but unfortunately there is no ETA. Please contact "sales AT ninjatrader DOT com" for licensing follow up.

                Comment


                  #9
                  Will do, thanks.
                  Is there a way to pay for the Position Status API functionality? I
                  m sure that more than one will find this usefull.

                  Comment


                    #10
                    Unfortunately we don't accept any custom development at this time.

                    Comment


                      #11
                      Dierk,

                      I believe this is a valid request and not an excentricity. Is there any way that you can help me?

                      Comment


                        #12
                        This is a limitation. I don't see a way around it.

                        However
                        a) you could try driving your logic of ATM strategies which can be closed seperately (meaning, their strategy position will be closed): http://www.ninjatrader-support.com/H...arameters.html
                        b) you could try coding all your logic in NinjaScript which provides you a closer control

                        Comment


                          #13
                          hello Philip

                          you might be able to split your volatlity spread event system into 2 systems, ie 1 system for short trades, and 1 system applied to seperate chart for long trades, then you can go long and short in TradeStation at the same time. You could also use Global variables in tradestation so that each strategy in 2 seperate charts can communicate with each other. so when you go long in chart 2, you cancel your short pending position in chart 1. hope this might help!

                          regards

                          Rod

                          Comment


                            #14
                            Rod,

                            Thanks for the idea.
                            I managed to build a middleware that receives my custom commands from Tradestation and creates the SL/TP automatically. It also takes care of managing them.

                            Philip

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Max238, Today, 01:28 AM
                            4 responses
                            33 views
                            0 likes
                            Last Post Max238
                            by Max238
                             
                            Started by r68cervera, Today, 05:29 AM
                            1 response
                            7 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by geddyisodin, Today, 05:20 AM
                            1 response
                            11 views
                            0 likes
                            Last Post NinjaTrader_Gaby  
                            Started by timko, Today, 06:45 AM
                            2 responses
                            13 views
                            0 likes
                            Last Post NinjaTrader_ChristopherJ  
                            Started by habeebft, Today, 07:27 AM
                            0 responses
                            6 views
                            0 likes
                            Last Post habeebft  
                            Working...
                            X