Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access strategy B from strategy A

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

    Access strategy B from strategy A

    Hi,

    Can strategies access the positions of each other?

    for example if i'm long APPL in strategy A, i don't want to go long APPL in strategy B?

    Ideally i want to be trading many markets and many strategies.

    should i have one NT strategy that trades all markets, or many NT strategies?
    I need the strategies to be aware of what positions the other strategies are in.

    Cheers

    #2
    Hello pipsalottle,

    Thank you for your post.

    Strategies would not have a method or function to access other strategies positions.

    You can use unsupported means to pull the account positions though. For example:
    Code:
    foreach (Account acct in Cbi.Globals.Accounts)
    {
    if (acct.Positions != null)
    {
    PositionCollection positions = acct.Positions;
    foreach (Position pos in positions)
    {
    Print(pos.Account.Name + " " + pos.Instrument + " " + pos.MarketPosition + " " + pos.Quantity + " " + pos.AvgPrice);
    }
    }

    Comment

    Latest Posts

    Collapse

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