• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DLL position limitations

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

    DLL position limitations

    The way functions such as NTMarketPosition fail to work when NT is closed and reopened (overnight) means that I cannot trade from eSignal using NT.

    I must therefore consider a move to internal NT scripting.

    Do the NT internal functions such as Position.MarketPosition persist if NT is closed and reopened?

    #2
    imported post

    No they do not. Please read more here: http://ninjatrader.mywowbb.com/view_...marketposition
    DierkNinjaTrader Customer Service

    Comment


      #3
      imported post

      That's actually one of my posts, so I have read it and it still provides no solution.

      I have complex automated strategies that must be able to determine if a position exist, what its size is.

      In restart/reboot situations I can be in a position which I want to stay in, not exit. The program needs to know that (obviously). So when initialising the Stratgy needs to check long/short/flat and it must persist across all time scales and system situations. The idea that this information is not available means that NTs capabailities to handle Automated Trading are pure fantasy.

      Please clarify that what you are saying is that current portfolio positions are only available so long as NT is continuously running.

      Thanks

      Comment


        #4
        imported post

        Your understanding is correct.
        DierkNinjaTrader Customer Service

        Comment


          #5
          imported post

          LMAO

          I suggest you remove all references to Automated Systems Trading from your documentation and website.

          The only thing NinjaTrader can to is put trades on or off. It cannot, even to the slightest degree, manage open positions because it has no idea what those open positions are. Highly disappointing.

          Comment


            #6
            imported post

            You may consider using the file based ATI. Due to the nature if information trasnfer through files it may do what you are looking for.
            DierkNinjaTrader Customer Service

            Comment


              #7
              imported post

              Oli,

              As you now know, the DLL interface has a limitation regarding positions between sessions. What others do that require overnight handling is use the File interface information update files:

              http://www.ninjatrader-support.com/H...helpguide.html

              to retreive position information.

              Ray
              RayNinjaTrader Customer Service

              Comment


                #8
                imported post

                was my reply removed for a reason?

                Comment


                  #9
                  imported post

                  Surely with NinjaScript, Interactive Brokers or PATSystems can be querried for current position status which can then be accessed by code. Right?

                  This whole discussion is just concening the DLL interface. Right?

                  Comment


                    #10
                    imported post

                    No it is not.

                    Comment


                      #11
                      imported post

                      see the reply from Herr Droth below - we are talking NinjaScript functionality

                      Comment


                        #12
                        imported post

                        For complete clarity:

                        We are only referring to the function call NTMarketPosition() in the DLL interface. The limitation is that the position size returned between NT sessions is not persisted. As a workaround, one can access the File based interface to retrieve current position size. This is when using external application to feed orders through NinjaTrader's Automated Trading Interface.

                        Shawnj, you are correct. NinjaScript provides access to the current position held by your strategy or your account. NinjaTrader maintains position information from all brokers we connect to.

                        Ray
                        RayNinjaTrader Customer Service

                        Comment


                          #13
                          imported post

                          Ray,

                          I wish you had said this earlier - Dierk Droth has made a grave error here. Please read my first post:

                          "I must therefore consider a move to internal NT scripting.

                          Do the NT internal functions such as Position.MarketPosition persist if NT is closed and reopened?"

                          I mean "intenal NT scripting" is clear and "Position.MarketPosition" is a NinjaScript function!

                          You are now saying unequivacbly "yes" to this, while the first response was no (admittedly not from yourself).

                          I believe there is some terrible miscommunication here. I thought I was clearly understanding what was being said, for any part of mine in the misunderstaning I apologize but in my defense I think that my original post has been badly misunderstood.

                          Comment


                            #14
                            imported post

                            Oli,

                            I will post what I sent you in private message.

                            NinjaScript strategies hold the strategy position size. If you disconnect/shutdown NT, the strategy will terminate (since you are no longer connected) and upon reconnect you will have to re-apply your strategy to the chart. NT will then historically calculate the current virtual strategy position size and optionally submit orders to protect this position. Your live account position may or may not match the reported strategy position. Because of this, you must manually synchronize the two if this makes sense.

                            It may not make sense since you may have multiple strategies that you are running and/or you may be manually trading in which case the strategy position may never need to sync with the real account position since there is not a one to one relationship.

                            Most products, such as TradeStation will also get out of sync but our approach is by design since we provide complete flexibility on trading both in automation and manually on the same market in the same account simultaneously.

                            Ray
                            RayNinjaTrader Customer Service

                            Comment


                              #15
                              imported post

                              Ray,

                              so Position.MarketPosition from NinjaScript will always return at least a correct value for long (>0), short (<0), flat(0)? This is regardless of if I shut NT down, have the power go out mid session or anything else that interupts the running of the program?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by mohdqallaf, Today, 12:55 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post mohdqallaf  
                              Started by dvcpro4, Yesterday, 07:08 PM
                              2 responses
                              23 views
                              0 likes
                              Last Post NT-Roland  
                              Started by chrismcdermut, Yesterday, 01:46 PM
                              3 responses
                              19 views
                              0 likes
                              Last Post MojoJojo  
                              Started by Bricolico, Yesterday, 09:28 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post Bricolico  
                              Started by Tradwell385, Yesterday, 08:51 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post Tradwell385  
                              Working...
                              X