Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy's Position Size for Short and Long Trades

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

    Strategy's Position Size for Short and Long Trades

    Hi There,

    Need to get the value of Strategy's Position Size for Short or Long Trades. Then use it in an IF condition. Whats the script to get number of Long positions currently open with strategy? (or short)

    Thanks pro's.

    #2
    Fix: I mean the number of trades in each direction, not the value.

    Comment


      #3
      Hello shahabjet1,

      The strategy position size can be found with Position.Quantity.
      https://ninjatrader.com/support/help...n_quantity.htm

      For the number of trades of the day I would recommend using a counter that is incremented on each new entry order submission, and then reset when IsFirstBarOfSession is true.

      https://ninjatrader.com/support/foru...260#post812260
      https://ninjatrader.com/support/foru...ples#post93881
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      113 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      60 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      40 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      43 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      81 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X