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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    149 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    301 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    243 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    343 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    174 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X