Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT Questions 2

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

    NT Questions 2

    1. Is there an account object that is accessible from a strategy that holds account info?
    Type (1k, 10, 100k), balance, etc

    2. Is there a collection of open positions?

    3. Is there a collection of instruments? I'm looking for margin requirements based on the account type and current commission\spread.

    4. Instrument list: I only trade currencies and I have an instrument list. Can I hide all other markets?

    #2
    Hello GibbsB613, and thank you for your questions.

    1. Is there an account object that is accessible from a strategy that holds account info?
    Type (1k, 10, 100k), balance, etc
    There is. You can learn more about the Account object here,



    Be sure to check out the Get method of the Account object for the type of information you mentioned.

    2. Is there a collection of open positions?
    Yes. The Account object mentioned previously will let you access account-wide position information. For strategy managed positions, you will want to review the Positions member,



    3. Is there a collection of instruments? I'm looking for margin requirements based on the account type and current commission\spread.
    To review instruments currently used by the script, including the information you requested, you will want to review the Instruments member,



    4. Instrument list: I only trade currencies and I have an instrument list. Can I hide all other markets?
    Every one of your instrument lists will always be available from the Instrument Selector. This said, if you would like to remove an instrument from your 6 most recently used instruments section, or remove a pinned instrument, simply hover over it with your mouse and press the delete key on your keyboard.

    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      For question # 2, how do I see open unmanaged positions?

      Another question, how do I add a 4H moving average on a 1H chart? I do have both dataseries on the chart since I'm viewing MTF.

      Thanks,

      Comment


        #4
        Unmanaged positions will need to be tracked by you as the developer. I would like to recommend storing references to order objects in a Dictionary.

        I appreciate your patience, but just so I can make sure I am providing accurate advice, can you explain what is meant by 1H and 4H? I prefer asking and being sure rather than guessing even if I feel as though I may know what these mean.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          No worries, it should've been H1 and H4, which means one hour and four hour charts respectively.

          "I would like to recommend storing references to order objects in a Dictionary." I'm not sure what you mean by this. Does this mean NJ won't have any data on my positions available?

          Comment


            #6
            Thanks for the clarification. Let's say your primary series (the one you passed into your chart) was your 1 hour bars, and the first series you created with AddDataSeries was your 4 hour bars. These then would be your 1 hour and 4 hour SMAs

            SMA(BarsArray[0], period1)
            SMA(BarsArray[1], period2)

            With respect to unmanaged orders, the rational is that once you have decided to manage your orders, Ninja takes a hands off approach. As such, your strategy won't keep track of the positions you've taken. This information is available in other contexts - attached to your Account object, for instance; there are various items such as this item which lets your strategy view your account position directly that you can find searching the help guide



            But as far as having a collection of your strategy's positions made available, this is only something Ninja will do for you if you are using managed order entry. This said, with unmanaged order entry, since you will need to keep reference objects to compare against in OnExecutionUpdate and OnOrderUpdate anyway, you have all the information you need to keep track of these orders and positions however you see fit and you are not restricted by any decisions the NinjaTrader programmers may have made.
            Jessica P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            24 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            120 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            63 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            41 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            45 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X