Login Page - Create Account

Support Board


Date/Time: Tue, 26 Aug 2025 05:37:09 +0000



TAL PnL Error

View Count: 122

[2025-08-16 07:25:22]
Gradient - Posts: 176
Hi,

My system tracks the PnL and Max PnL via below:

  n_ACSIL::s_TradeStatistics TradeStatistics;
  if (sc.GetTradeStatisticsForSymbolV2(n_ACSIL::STATS_TYPE_DAILY_ALL_TRADES, TradeStatistics))
  {

     pnlTotal= TradeStatistics.ClosedTradesProfitLoss;
     tradePnL= TradeStatistics.LastTradeProfitLoss;
     maxPnL= TradeStatistics.MaximumRunup;
  }

These values are stored in subgraphs and used for risk management purposes.

I noticed that the TradeStatistics.MaximumRunup isn't retaining the intraday maximum runup of which is circumventing my risk management system.(e.g. intraday drawdown 3x threshold)

The TradeStatistics.ClosedTradesProfitLoss is at times greater than the TradeStatistics.MaximumRunup.

The attached screenshots display the issue. In the second the Equity Peak is listed as $2935 but the MaxPnL listed in the first screenshot is $1437.50 of which is smaller than the PnL (i.e.ClosedTradesProfitLoss);

Can someone advise concerning this? Thanks
imagePnL Error.png / V - Attached On 2025-08-16 07:14:07 UTC - Size: 6.41 KB - 21 views
imagePnL Error 2.png / V - Attached On 2025-08-16 07:14:13 UTC - Size: 19.53 KB - 20 views
[2025-08-16 15:46:26]
Sierra_Chart Engineering - Posts: 20734
This is not within the scope of our support. Refer to:
Trade Activity Log: Questions About the Trade Activity Log Data

We will simply not get involved in this. This is an immense amount of work for us to analyze including your code and we cannot look at this.

You need to look at all of the fills, which make up these calculations and understand the calculations. The descriptions for each of the values is documented on this page:
Trade Activity Log

To know what the First Fill is, for the Trades list in a chart, look at the Order Fills Start Date-Time on this tab:
Trade Activity Log: Trade Statistics for Charts (Chart Stats) Tab

You can then use the Trade Activity Log, to reproduce calculations and see all of the fills.


We will not answer anything further. Other than to say, the calculations are 100% accurate as described and there cannot be any possibility of a problem. It is impossible. The calculations are 100% stable and durable and we know that for a fact.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2025-08-16 15:47:26
[2025-08-16 16:48:22]
Gradient - Posts: 176
My code isn’t doing anything other than taking those values and storing them in subgraphs.

The output of those subgraphs are visible via the screenshots.

There is no issue with my code as I have shared the extent of the code relative to those values in the prior post of which is in the documentation.

There is no manual computation of PnL.
[2025-08-16 16:50:54]
Gradient - Posts: 176
How can the TradeStatistics.MaximumRunUp differ from Equity Peak? That’s not a side effect my code would even be able to produce.
[2025-08-16 16:57:21]
Gradient - Posts: 176
I physically watched a PnL of 60pts which aligns with the Equity Peak. Then watched the Max PnL decrement from that value which is why I investigated because if TradeStastics.ClosedTradeProfitLoss drops below a certain threshold of TradeStastics.MaxRunUp my system stops trading.

It didn’t stop.

Then I noticed MaximumRunUp was incorrect and less than CloseTradesProfitLoss.

This is how the error was identified.

That has nothing to do with my code.
[2025-08-16 17:04:24]
Sierra_Chart Engineering - Posts: 20734
This is not within the scope of our support and under no circumstances will we spend any time on this. This is just not within the scope of our support. And the definitions for all of these, is documented here:
Trade Activity Log

And you also have to understand, whether you are using the Flat to Flat Trade Statistics as well because the calculations change for some of the variables.

And another thing you do not understand is we cannot accept anything that you say. All of this has to be deeply analyzed, with the actual sequence of fills and the actual fills. This is just not part of our support at all.

And we do not know what you are saying is right or wrong because we have to look at the definitions. We have to look at the sequence of fills. This is not within the scope of our support.

These posts, are immediately rejected by us. And this is our standard policy:
Trade Activity Log: Questions About the Trade Activity Log Data
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2025-08-16 17:05:05
[2025-08-16 18:01:48]
Sierra_Chart Engineering - Posts: 20734
We are going to make some changes, and write up a post about this. The functionality does function as documented but the field names, and the implementation is inherently confusing.


We will put a link to the post here when done.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2025-08-16 18:02:07
[2025-08-16 18:21:11]
Sierra_Chart Engineering - Posts: 20734
See our post here:
What is Sierra Chart Working On
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account