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

    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.

        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.

            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 jclose, Today, 09:37 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post jclose
                              by jclose
                               
                              Started by WeyldFalcon, 08-07-2020, 06:13 AM
                              10 responses
                              1,413 views
                              0 likes
                              Last Post Traderontheroad  
                              Started by firefoxforum12, Today, 08:53 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post firefoxforum12  
                              Started by stafe, Today, 08:34 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post stafe
                              by stafe
                               
                              Started by sastrades, 01-31-2024, 10:19 PM
                              11 responses
                              169 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X