Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Profit loss by each instrument per day

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

    Profit loss by each instrument per day

    I am trying to calculate the PL by each instrument.

    TradeCollection tradesCollection = new TradeCollection(true, true);

    foreach (Trade trade in SystemPerformance.AllTrades)
    if (trade.Entry.Instrument == this.Instrument && trade.Entry.Time >= startOfTradingDay)
    tradesCollection.Add(trade);​

    double totalProfit = tradesCollection.TradesPerformance.Currency.CumPro fit;
    My question is trade.Entry.time represents local timezone or Market timezone? How to check this?

    #2
    Hello sambathraj,

    Thanks for your post.

    trade.Entry.Time would represent the local time on your PC.

    Note that NinjaTrader converts all data to your local time zone.

    TradeCollection:https://ninjatrader.com/support/help...collection.htm
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    71 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    43 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    25 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    28 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    56 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X