Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Profil/Loss for few working strategies

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

    Profil/Loss for few working strategies

    Hi guys,

    I have few strategies that works on NT. Each with daily stop loss and take profit as well.
    I would like to create mechanism/script whatever, that will count realized profit/loss from all working strategies and at some point will disable all.
    Generally a tool for global (account level) risk management.
    My brokerage doesn't offer such support so I need to find solution by myself.

    Can you indicate how to bite it ?

    Thank you in advance

    #2
    Hello KingElephant,

    This is not supported by NinjaTrader to do, however, below I am adding a small tip of unsupported code to help nudge you in the right direction.

    Code:
    foreach (Account acct in Cbi.Globals.Accounts)
    {
    if (acct.Positions != null)
    {
    // print information about each position
    PositionCollection positions = acct.Positions;
    foreach (Position pos in positions)
    {
    Print(pos.Account.Name + " " + pos.Instrument + " " + pos.MarketPosition + " " + pos.Quantity + " " + pos.AvgPrice);
    }
    // print information about each order
    OrderCollection orders = acct.Orders;
    foreach (Order ord in orders)
    {
    Print(ord.ToString());
    }
    }
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    144 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    69 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    78 views
    0 likes
    Last Post PaulMohn  
    Working...
    X