Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NTMarketPosition suddenly returned a wrong value

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

    NTMarketPosition suddenly returned a wrong value

    Hi,

    I'm using eSignal with NT and real IB account. My EFS script checks the NTMarketPosition every time it has a trading signal and makes a trade only if I'm flat. It was working fine for a couple of weeks, but suddenly I've got a double size of my possition (I was not flat and additional trade happened). It could happened only if NTMarketPosition returned a wrong value. Any ideas?

    Thanks!

    #2
    imported post

    Hi,

    Please send an email directly from within NT5 under Help--> Mail to Support and refer to this topic.

    Vince
    Vince B.NinjaTrader Customer Service

    Comment


      #3
      imported post

      Hi Vince,

      It says: "Failed to send mail. The transport failed to connect to the server".

      Then, I swithced off the XP Firewall, but got the same result. I have a hardware router, but I can bypass it only in the evening. (if that is the problem)

      Comment


        #4
        imported post

        Hi,

        Please send a normal email to support and then attach the log.

        The log can be found here:

        C disk--> Program Files--> NinjaTrader5--> Log--> log.20060130

        Don't forget to refer to this topic!

        Vince.
        Vince B.NinjaTrader Customer Service

        Comment


          #5
          imported post

          I've sent the log.

          Thanks!

          Comment


            #6
            imported post

            Thank you. I've also replied to it.



            Vince
            Vince B.NinjaTrader Customer Service

            Comment


              #7
              imported post

              Hi,
              Does NTMarketPosition uses files that have today's
              date as a name(or part of it) to store its information?
              The mentioned below problem occures when NT was started prev day then reloaded the next day with open position. It seems that in this case it is just "forgets" about the possition because it's in another file.
              Thanks.

              Comment


                #8
                imported post

                The issue has to deal with limitations of the ATI and how accouns are mapped internally. If you carry a position overnight, you need to initialize the ATI. The only way this can be done is by placing and order. I suggest placing an order well below the market and then cancelling it. Then the NTMarketPosition() will return the value you are looking for.

                This is on our list to address with no ETA at this time.

                Ray
                RayNinjaTrader Customer Service

                Comment


                  #9
                  imported post

                  Should this order be placed through ATI only or I can do it manually in NT?

                  Thanks.

                  Comment


                    #10
                    imported post

                    Through ATI.
                    RayNinjaTrader Customer Service

                    Comment


                      #11
                      imported post

                      Does this initialization need to be done for each position or will initializing with one order take care of all?

                      Thanks.


                      Comment


                        #12
                        imported post

                        No, only for each account that you plan to trade against.

                        Ray
                        RayNinjaTrader Customer Service

                        Comment


                          #13
                          imported post

                          Have you fixed it in Verstion 5.1.1.4 Beta? I saw the following: "Fixed: ATI information was not available immediately when DLL was loaded for TradeStation/eSignal integration" or it's something else?
                          Thanks.

                          Comment


                            #14
                            imported post

                            Not related, you must still initialize.
                            RayNinjaTrader Customer Service

                            Comment


                              #15
                              imported post

                              I am finding that most of my positions come back correctly from NTMarketPosition(), but that some do not. This is even after orders have been filled in otherstocks in that account. The number of shares owned will come back correctly once an order is filled in that particular stock, but not if an order is placed and then cancelledfor that stock. It does not seem to be not limited to a particular set of stocks as after a restart a different set may be incorrect. I am running the latest NT version.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by junkone, Today, 11:37 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post junkone
                              by junkone
                               
                              Started by quantismo, 04-17-2024, 05:13 PM
                              5 responses
                              35 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by proptrade13, Today, 11:06 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Started by love2code2trade, 04-17-2024, 01:45 PM
                              4 responses
                              34 views
                              0 likes
                              Last Post love2code2trade  
                              Started by cls71, Today, 04:45 AM
                              2 responses
                              10 views
                              0 likes
                              Last Post eDanny
                              by eDanny
                               
                              Working...
                              X