Support Board
Date/Time: Sat, 23 Nov 2024 02:52:41 +0000
Post From: ACSIL Restart cumulative measurement with each new session
[2024-09-24 05:13:23] |
Tony - Posts: 516 |
yeah, I had similar issues quite a while ago (forget what it was), I got around it by doing this: SCDateTime _6h {SCDateTime::HOURS(6)}; if ((sc.BaseDateTimeIn[sc.Index]+_6h).GetDate() != (sc.BaseDateTimeIn[sc.Index-1]+_6h).GetDate()) { my_custom_cumulative_measurement = 0; } so, for the if() condition, we moved New York 6 time zones (6 hours) to the east, and session starts right at middle of the night, instead of 6pm, it fixed all my issues. You may need to change "sc.Index" to something else, if my_custom_cumulative_measurement is plotted the whole chart over multiple sessions, something like this: SCDateTime _6h {SCDateTime::HOURS(6)}; for (int IndexCount{sc.Index}; IndexCount>0; IndexCount--) { if ((sc.BaseDateTimeIn[IndexCount]+_6h).GetDate() != (sc.BaseDateTimeIn[IndexCount-1]+_6h).GetDate()) { my_custom_cumulative_measurement = 0; } } Date Time Of Last Edit: 2024-09-24 05:34:00
|