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 chbruno, Today, 04:10 PM
    0 responses
    3 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    436 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    6 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by frslvr, 04-11-2024, 07:26 AM
    9 responses
    127 views
    1 like
    Last Post caryc123  
    Working...
    X