Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limit the number of position ?

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

    Limit the number of position ?

    Hello,
    I have a system that screens 200 stocks. I run each script on each stock as shown in the picture.

    Unfortunately, since stocks consume cash (I don't use CFDs), I have to limit the number of open positions.

    For example, if I have $100,000 in my account, I can have a maximum of 10 open positions of $10,000 each.

    How can I run my 200 scripts but limit the number of positions to 10? For instance, if I have 10 open positions and a signal is triggered, the new position should not be taken.

    Thanks in advance for your responses
    (I'm still using NT7 on desktop)
    Attached Files

    #2
    Hello Thomas79,

    Thank you for your post.

    There are no supported means of tracking positions across strategies in NT7.

    You can access the Account.Positions collection to get the number of open positions on your account. However please note accessing Account objects is not officially documented or supported for NinjaTrader 7, and unfortunately as such we don't have any documentation/examples for how to do this and are unable to assist with undocumented code.

    This thread will remain open for any members of the community who may want to assist you with undocumented/unsupported methods of accessing Account objects in NT7.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    547 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    323 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    99 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    543 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    545 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X