Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Account.Mode

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

    Account.Mode

    Hello

    I'm trying to convert my code from NT7 to NT 8. I'm trying to find a replacement for:

    Account.Mode

    #2
    Bars.MarketData.Connection.Now

    Hello

    I'm trying to convert my code from NT7 to NT 8. I'm trying to find a replacement for:

    Bars.MarketData.Connection.Now

    Comment


      #3
      Account.Connection.Name

      Hello

      I'm trying to convert my code from NT7 to NT 8. I'm trying to find a replacement for:

      Account.Connection.Name

      Comment


        #4
        NinjaTrader.Cbi.Order

        Hello

        I'm trying to convert my code from NT7 to NT 8. I'm trying to find a replacement for:

        NinjaTrader.Cbi.Order

        Comment


          #5
          Order.Error

          Hello

          I'm trying to convert my code from NT7 to NT 8. I'm trying to find a replacement for:

          Order.Error

          Comment


            #6
            OrderState

            Hello

            I'm trying to convert my code from NT7 to NT 8. I'm trying to find a replacement for:

            OrderState.PendingCancel
            OrderState.PendingSubmit
            OrderState.PendingChange

            Comment


              #7
              PositionCollection

              Hello

              I'm trying to convert my code from NT7 to NT 8. I'm trying to find a replacement for:

              NinjaTrader.Cbi.PositionCollection

              Comment


                #8
                Repalce PositionCollection

                Hello

                I'm trying to convert my code from NT7 to NT 8. I'm trying to find a replacement for:

                NinjaTrader.Cbi.PositionCollection

                Comment


                  #9
                  PrintWithTimeStamp

                  Hello

                  I'm trying to convert my code from NT7 to NT 8. I'm trying to find a replacement for:

                  PrintWithTimeStamp

                  Comment


                    #10
                    Cbi.Globals

                    Hello

                    I'm trying to convert my code from NT7 to NT 8. I'm trying to find a replacement for:

                    Cbi.Globals

                    Comment


                      #11
                      Hello kiss987,

                      Thanks for the note.

                      We have merged your questions here to one thread and I will give you the details here in a single post. You can invistigate the undocumented code by using a NinjaScript editor and typing "NinjaTrader.Cbi. " Once you type the dot operator, you will see a list of all avaliable classes and properties at that level.

                      Cbi.Globals -

                      It looks like most of the Items in Globals were moved to NinjaTrader.Cbi.<package name>

                      PrintWithTimeStamp -

                      I am unable to find a method or property named this. If you could provide an example script where it is used I can investigate further.

                      NinjaTrader.Cbi.PositionCollection -

                      I found a Positions array here in the NinjaTrader 8 help guide:

                      https://ninjatrader.com/support/help...ns_account.htm

                      https://ninjatrader.com/support/help...?positions.htm

                      OrderState.PendingCancel-
                      OrderState.PendingSubmit-
                      OrderState.PendingChange-
                      Order.Error-


                      All order states and error codes can be found here on the OnOrderUpdate method or the Order object help guide page:
                      https://ninjatrader.com/support/help...rderupdate.htm
                      https://ninjatrader.com/support/help...-us/?order.htm

                      NinjaTrader.Cbi.Order -

                      This is the Order object in NinjaTrader, it remained the same between NT7 and NT8.
                      https://ninjatrader.com/support/help...-us/?order.htm

                      Account.Connection.Name -

                      This has been changed to :
                      Account.Connection.Options.Name

                      Bars.MarketData.Connection.Now-

                      I was able to find Account.Connection.Now which seems to do the same thing. You can also override OnMarketData to get market data events as they come in.

                      https://ninjatrader.com/support/help...marketdata.htm

                      Account.Mode-

                      This is unsupported, but I found a similar property which shows the license type running in the installation:

                      NinjaTrader.Cbi.LicenseType

                      Please let me know if I may assist any further.
                      Chris L.NinjaTrader Customer Service

                      Comment


                        #12
                        Account.Connection.Now

                        Thank you for your reply, I some further questions

                        1. Account.Mode
                        What I'm trying to accomplish is to find out if my connection is live / demo / Playback connection

                        2. NinjaTrader.Cbi.Order
                        How can I cancel an order?

                        3. Order.Error
                        How can I know on the OnOrderUpdate event if my order has an error

                        4. Cbi.Globals.Accounts
                        I have faile to find something like NinjaTrader.Cbi.Accounts

                        5. PrintWithTimeStamp
                        Although I couldnt find a documintation for it, it is still available on NT7 - StrategyBase.PrintWithTimeStamp

                        Comment


                          #13
                          Hello kiss987,

                          Thanks for the reply.

                          1. The supported way of doing this would be to check the name of the connection through ConnectionStatusUpdate

                          https://ninjatrader.com/support/help...atusupdate.htm

                          2. You will use the CancelOrder() method and pass in the order object.
                          https://ninjatrader.com/support/help...ancelorder.htm

                          3. The ErrorCode parameter in OnOrderUpdate() will be equal to ErrorCode.NoError

                          https://ninjatrader.com/support/help...rderupdate.htm

                          4. The Account class is the only supported and documented way to pull account data. I was unable to find any collection of Account objects in the documentation.

                          https://ninjatrader.com/support/help...gy_account.htm - Account class

                          5. PrintWithTimeStamp might have been removed from the NinjaTrader 8 code base. I am unable to find the method in the NinjaTader 7 documentation. The solution here would be to make a function that appends a timestamp to whatever is being printed.

                          Please let me know if I may answer any additional questions.
                          Chris L.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by frslvr, Today, 04:29 PM
                          0 responses
                          10 views
                          0 likes
                          Last Post frslvr
                          by frslvr
                           
                          Started by wjadevries, Today, 04:18 PM
                          0 responses
                          4 views
                          0 likes
                          Last Post wjadevries  
                          Started by shahabjet1, Today, 03:47 PM
                          2 responses
                          11 views
                          0 likes
                          Last Post shahabjet1  
                          Started by JTizz, Today, 03:21 PM
                          1 response
                          6 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by EB Worx, Today, 02:49 PM
                          1 response
                          10 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Working...
                          X