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 Stanfillirenfro, Today, 07:23 AM
    4 responses
    20 views
    0 likes
    Last Post Stanfillirenfro  
    Started by DayTradingDEMON, Today, 09:28 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by cmtjoancolmenero, Yesterday, 03:58 PM
    8 responses
    31 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by helpwanted, Today, 03:06 AM
    2 responses
    22 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by navyguy06, Today, 09:28 AM
    0 responses
    6 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X