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 NullPointStrategies, Today, 05:17 AM
    0 responses
    39 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    64 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X