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 TraderBCL, Today, 04:38 AM
    2 responses
    16 views
    0 likes
    Last Post TraderBCL  
    Started by martin70, 03-24-2023, 04:58 AM
    14 responses
    106 views
    0 likes
    Last Post martin70  
    Started by Radano, 06-10-2021, 01:40 AM
    19 responses
    609 views
    0 likes
    Last Post Radano
    by Radano
     
    Started by KenneGaray, Today, 03:48 AM
    0 responses
    5 views
    0 likes
    Last Post KenneGaray  
    Started by thanajo, 05-04-2021, 02:11 AM
    4 responses
    471 views
    0 likes
    Last Post tradingnasdaqprueba  
    Working...
    X