Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get account position and order status?

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

    How to get account position and order status?

    I would like to check the positions and active orders I have before I make new orders. Is there any Methord or Function that I can use to check my account position and active orders?

    #2
    atrader,

    A strategy only knows its strategy position. You can check your strategy position by going Position.MarketPosition and Position.Quantity.

    For active orders, you just have to hold onto active IOrder objects for your orders.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh! Since the internet sometimes is not stable,

      the active orders might be filled when the internet is temperarily disconnected. After the internet connection comes back by itself, the strategy will lose its synchronization with the account. That is why I would like to have a method or function to check account position and order status before making any new orders. If it is not possible now, is it planned in the future version of NT?

      Comment


        #4
        NT7 will come with features for you to check account position/quantity.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks again Josh!

          I can let my computer run by itself when NT7 is ready.

          Comment


            #6
            Dear Ninjatrader Support,

            Hi, I have a question.

            Have you come up with a method to get account position / quantity in NT7?
            I would like to know because I have the same problem sometimes.
            (meaning I would need to check the actual account position after reconnection.)

            Look forward to hearing from you.

            Comment


              #7
              hana_maui, I will have someone get back with an answer on Monday.
              AustinNinjaTrader Customer Service

              Comment


                #8
                hana_maui,

                What was possible to be released with NT7 was a way to check your account values. This is done in GetAccountValue(). Unfortunately there is no way to do positions across the strategy. The way to do that would be you have to store global variables across your strategies to be able to calculate your own position/quantity. If you do manual trades though, that would not be included.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Thank you

                  Dear Mr. Josh,

                  Thanks for your kind reply.
                  I understand about GetAccountValue()

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  571 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  331 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  549 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  549 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X