Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how Position object is managed

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

    how Position object is managed

    if i have 2 positions using iorder methods
    private IOrder EntryOrderPosition1;
    private IOrder EntryOrderPosition2;

    what would the Position methods reflect. would it use the net profit or loss across both orders

    for eg.EntryOrderPosition1 is filled and in trade
    EntryOrderPosition2. is filled and in trade

    if i close EntryOrderPosition1, would the

    Position.GetProfitLoss(double marketPrice, PerformanceUnit performanceUnit)

    factor in teh profits/losses of teh EntryOrderPosition1 when EntryOrderPosition2 is in trade?

    #2
    There is no differentiation between the orders. Position shows the position of the instrument.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      so would it be just the open poistions and not include any partial or complete historical positions?

      Comment


        #4
        GetProfitLoss is only unrealized PnL. Closed trades do not have any unrealized PnL.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X