Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

getting proper OrderID

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

    #16
    Hello ballboy11,

    Thank you for your response.

    I need to clarify on the following:
    • Position.MarketPosition is the position of the strategy and not the account.
    • GetAtmStrategyMarketPosition() is the position of the specific instance of the ATM Strategy template as initialized through the NinjaScript strategy.

    What you want are the following from the Account:
    Please make sure to reviewed the details at these links and review the examples to understand their use.

    Comment


      #17
      Thanks that helped. I got it working but had to do some massaging. Last question how does the event handlers work in NT8? in your manual your event handler is this.

      private void OnOrderUpdate(object sender, OrderEventArgs e)

      {
      }

      but the NTrader8 when creating a new indicator the event handler is this

      protected override void OnOrderUpdate(Cbi.Order order, double limitPrice, double stopPrice,
      int quantity, int filled, double averageFillPrice,
      Cbi.OrderState orderState, DateTime time, Cbi.ErrorCode error, string comment)
      {

      }

      Comment


        #18
        Hello ballboy11,

        Thank you for your response.

        In the specific case of the OnOrderUpdate() we removed the need for the IOrder container and gave direct access to the order object. We also allow you to pull the events in sequence via the the order update parameters such as limitPrice, stopPrice, etc. And you can pull the current information of the order via the 'order' parameter.

        So we allow for direct access to the objects but still provide the update sequence and the properties that would update.

        Please let me know if you have any questions.

        Comment


          #19
          Originally posted by NinjaTrader_PatrickH View Post
          Hello ballboy11,

          Thank you for your post.

          You can use the Account class to pull the Orders collection. Please visit the following link for more information: https://ninjatrader.com/support/help...ount_class.htm

          Please let me know if you have any questions.
          I can't open this page...where I can find the orderld???

          Comment


            #20
            Originally posted by ushuaia View Post
            I can't open this page...where I can find the orderld???
            That page opens fine for me.
            Attached Files

            Comment


              #21
              can you telling me ...what is this????
              I'm asking where I can find the orderld number.... can you tell me where you see this number here???
              thanks
              Leo
              Attached Files

              Comment


                #22
                Hello Leo,

                order.OrderId


                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by BarzTrading, Today, 07:25 AM
                2 responses
                15 views
                1 like
                Last Post BarzTrading  
                Started by devatechnologies, 04-14-2024, 02:58 PM
                3 responses
                20 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by tkaboris, Today, 08:01 AM
                0 responses
                4 views
                0 likes
                Last Post tkaboris  
                Started by EB Worx, 04-04-2023, 02:34 AM
                7 responses
                163 views
                0 likes
                Last Post VFI26
                by VFI26
                 
                Started by Mizzouman1, Today, 07:35 AM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X