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 sjsj2732, Today, 04:31 AM
    0 responses
    20 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    279 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    279 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    130 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    89 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X