Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 04:02:48 +0000



Issue getting stats back for daily close profit and loss

View Count: 359

[2021-03-01 21:23:27]
flyboy615 - Posts: 56
Hi,
I had traditionally use the following chunk of code to get the daily profit and loss for the symbol where the study was running.

s_ACSTradeStatistics DailyStats;
sc.GetTradeStatisticsForSymbol(0, true, DailyStats);
double DailyPL = DailyStats.ClosedProfitLoss();

I had always believed that it return the stats for the current day/symbol. It would now seem that for some reason it is returning the stats for the previous day. In this case Friday's trade stats. I've tried to switch over to the new V2 function but seem to get the same results. Is there a setting somewhere I've missed?

Thanks
[2021-03-01 21:54:37]
Sierra Chart Engineering - Posts: 104368
It depends upon what order fills are loaded in the chart. And whether there has been a reset.

You need to look at the fills that are actually loaded by displaying them on the chart:
Chart Trading and the Chart DOM: Displaying Order Fills on the Chart
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, *change* to 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