Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is MarketPosition global or per strategy?

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

    Is MarketPosition global or per strategy?

    If I have 2 strategies running simultaneously, and one enters a long position, will the other strategy see the market in a long position, or does the second strategy evaluate the market strictly from its own point of view, viz, that it the second strategy is still flat, so that, as far as it is concerned the account is not long?

    #2
    koganam, MarketPosition is per strategy. Strategies are completely independent of each other.
    AustinNinjaTrader Customer Service

    Comment


      #3
      If I have multiple strategies running. How can i get my total long/short position? i.e across all strategies. Thanks.
      Tony

      Comment


        #4
        Hi Tony,

        The position info applies only to the strategy accessing it. There are not available properties to check positions at the account level.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Hi Ryan,

          Won't the function below do it? I am not sure what is the difference between these NTDirect functions and the usual NT methods. Thanks.

          int MarketPosition(stringinstrument, stringaccount)
          Gets the market position for an instrument/account combination. Returns 0 for flat, negative value for short positive value for long.

          Comment


            #6
            Those are not NinjaScript functions. They're designed for the Automated Trading Interface, which would take signals from an external source and then execute through NinjaTrader. This is a separate environment from NS.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            105 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            52 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            34 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            38 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            74 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X