Strategy PnL Indicator

I’ve spent the morning working on this and looking for code examples. None does what I’m looking for.

I want to plot a simple PnL indicator on a chart where the PnL is reported:

  1. for the current session/day using an inputted time for the start
  2. for the applied strategy on the chart only.

That’s it.

This seems exceedingly hard to do for such a simple concept. It seems as though the only solution is to make the order names specific/unique so the indicator can filter them. This “solution” would require going in and manually editing hundreds of strategies.

Any help on this? I must be missing something because this should be dead-simple.

I just want to report the day’s PnL for the applied strategy on a chart. :face_with_diagonal_mouth:

There is an object that can provide that info.
SystemPerformance.AllTrades.TradesPerformance.GrossProfit.ToString();
SystemPerformance.AllTrades.TradesPerformance.NetProfit.ToString();

The numbers are from the current session.