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
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ChartTourist, Today, 08:22 AM
    0 responses
    4 views
    0 likes
    Last Post ChartTourist  
    Started by LiamTwine, Today, 08:10 AM
    0 responses
    2 views
    0 likes
    Last Post LiamTwine  
    Started by Balage0922, Today, 07:38 AM
    0 responses
    5 views
    0 likes
    Last Post Balage0922  
    Started by JoMoon2024, Today, 06:56 AM
    0 responses
    6 views
    0 likes
    Last Post JoMoon2024  
    Started by Haiasi, 04-25-2024, 06:53 PM
    2 responses
    19 views
    0 likes
    Last Post Massinisa  
    Working...
    X