Login Page - Create Account

Support Board


Date/Time: Wed, 23 Apr 2025 03:27:12 +0000



cumulative sum of study for the week!

View Count: 300

[2024-12-15 20:22:41]
User310898 - Posts: 43
Hi do you have a cumulative sum of study function but instead of resetting at the start of each trading day it resets at the start of each trading week? same as you have the same functionality for the vwap ie daily/weekly/monthly etc.

Seems at present it only has an option to reset daily not weekly.

I have seen the summation studies but they specify a number of periods which doesn’t work as I want the sum to reset at the start of every week (ie Sunday night).

I did set another chart to weekly candles and this gave me what I needed but it then only gives a single data point every week - not enough granularity. I need a minute based cumulative sum that resets every week. Alternatively a way to tell the chart the session is sunday night to friday night (ie weekly)!

Is this possible?

Thanks in advance.
Date Time Of Last Edit: 2024-12-15 20:31:11
[2024-12-16 17:24:33]
John - SC Support - Posts: 39428
There is a "Summation of Study Subgraph - Periodic" study that lets you set the number of bars over which to sum. You would just need to ensure that your chart starts on the day you want and then set the number of bars to cover the time period you are wanting. Refer to the following:
Summation of Study Subgraph - Periodic

The other option would be to use the Spreadsheet Study, as you can look at specific days of the week and use that define what gets summed. Refer to the following:
https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#WEEKDAY_Function
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-12-17 20:54:51]
User310898 - Posts: 43
Thank you for your response however it does not appear to do what is needed.

I have attached a 1 min NYSE tick when I use a summation - periodic and set it to 2 it is not summing 2 bars it appears to be summing a lot more. Summation of Study Subgraph - Periodic I am not sure what that is doing it just sums a whole bunch of. It may just be me not understanding what the number in period represents.

I want the chart to sum NYSE TICK for the whole week, resetting every week ie same as the "Weekly" does on all your other studies like VWAP where in the drop down it says Weekly, then the VWAP resets weekly etc.

Is there a straightforward way to set this up? Can you not just add a drop down into Cumulative sum of study that allows a reset daily, weekly, monthly etc. same as VWAP can be daily/weekly monthly etc.

Thanks so much!
Private File
[2024-12-17 21:40:45]
John - SC Support - Posts: 39428
Both of the studies work correctly. They are summing the defined item ("Input Data" or "Study and Subgraph to Reference") over the number of bars defined by "Length".

We just tested both studies to ensure they are working correctly and they are.

For instance, from your image, you have it set to sum the "Last" (or close) of every two bars. So it will take the most recent bar's Last price and add it to the previous bar's Last price to give you the result at the most recent bar. It then goes back 1 bar and adds that Last to the Last for the bar before it, and gives you the result for that bar. And so on.

What exactly is the item you want to sum up? If it is the Last Price of the bars, then you have that set correctly.

In looking at the data for TICK-NYSE, there are 961 1-minute bars in a standard day and 901 1-minute bars in a Friday. Therefore, to cover 1 rolling week, you would need to set the Length to be 4745 (4*961 + 901).

We have noted the request to change the summation study to allow for other time periods, but we can not say when we would get to any particular request.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-12-18 04:42:24]
User310898 - Posts: 43
Thanks so much for the detailed answer. I realise this is a "rolling" summation and does not start at "0" every week.

Is there a work around such that it starts summing from 0 every sunday night when the week opens?

Same as the cumulative sum of study has the option "Reset at Start of Trading Day" which is what seems to be the preferred choice when summing TICK, I guess I need "Reset at Start of Trading Week". Is there some work around for that?

Thanks in advance.
[2024-12-18 14:52:36]
John - SC Support - Posts: 39428
The answer we gave above is the best workaround option.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-12-18 23:01:02]
Sawtooth - Posts: 4209
You could also do it with the Spreadsheet Formula study, with a formula like this in its Formula field:
=IF(AND(WEEKDAY(BARDATE)=1,HOUR(BARTIME)=18),ID1.SG1,ID1.SG1+ID9.SG1[-1])
where ID1.SG1 is the study and subgraph to cumulatively sum, and ID9 is this Spreadsheet Formula study.

This will begin the cumulative summation every Sunday at 18:00.

https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#WEEKDAY_Function
Date Time Of Last Edit: 2024-12-19 01:32:15
[2024-12-19 20:19:57]
User310898 - Posts: 43
Thanks for your assistance Sawtooth

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

Login

Login Page - Create Account