NexusFi: Find Your Edge


Home Menu

 





Help with Cumulative Sum please!


Discussion in Sierra Chart

Updated
    1. trending_up 777 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 deejaynv 
london
 
Experience: Intermediate
Platform: ninjatrader
Trading: YM
Posts: 12 since Jul 2016
Thanks Given: 1
Thanks Received: 5

Hi Community!!

I wonder if you could help me.

I am trying to replicate the cumulative sum study @Big Mike used to use on his Sierra Chart setup to get Cumulative TICK for the week. I have asked him he said he no longer uses Sierra Chart so asking here. Was also told to tag @aslan

I know to get ctick / cumulative tick on a daily basis I use the Cumulative Sum of Study and set the option to Reset at Start of Trading Day to "Yes". All good.

I can't seem to find anything that would "Reset at Start of Trading Week" so it starts summing from 0 every Sunday night or whenever the week opens. I know it is possible as @Big Mike had cum tick starting at zero on his chart every start of week. It would sum till end of week then start at 0 again at the new week.

Anyone that can guide me much appreciated (I have asked Sierra but going round in circles a bit there).

Have a great week!


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
April 2026 Jobs Report: +115k vs +65k Expected
Traders Hideout
March Jobs Report Update: 178K Beat vs 59K Expected, Wag …
Traders Hideout
Hormuz Surges From 14% to 26.5% Intraday as Irans Answer …
Prediction Markets & Event Contracts
CME Lists U.S. Election Event Contracts as 2028 Democrat …
Prediction Markets & Event Contracts
Energy Futures Shatter All-Time Daily Volume: 8.3 Millio …
Commodities
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
20 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Hello Im new here
5 thanks
  #2 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 249 since Jun 2011
Thanks Given: 29
Thanks Received: 367

SC has a is weekend method for a date time value. So assuming that your instrument opens on Sunday and does not trades on Saturday this should work.
https://www.sierrachart.com/index.php?page=doc/SCDateTime.html

 
Code
float& SumValue= sc.GetPersistentFloat(0);


if (sc.BaseDateTimeIn[sc.Index].IsSunday() && !sc.BaseDateTimeIn[sc.Index-1].IsSunday())
{
    SumValue = 0;
}

// do your cumulative calculation here to SumValue. Note you will probably want to do this on bar close.


Follow me on X Reply With Quote
Thanked by:
  #3 (permalink)
 Sawtooth 
Prescott AZ USA
 
Experience: Advanced
Platform: SierraChart
Broker: EdgeClear, FCM:Phillip, Data:Denali, Routing:Teton
Trading: YM RTY ES NQ
Posts: 480 since Nov 2009
Thanks Given: 222
Thanks Received: 608



Quoting 
I can't seem to find anything that would "Reset at Start of Trading Week" so it starts summing from 0 every Sunday night or whenever the week opens.

You could 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


Reply With Quote
Thanked by:
  #4 (permalink)
 deejaynv 
london
 
Experience: Intermediate
Platform: ninjatrader
Trading: YM
Posts: 12 since Jul 2016
Thanks Given: 1
Thanks Received: 5

Thanks so much for all your help!


Started this thread Reply With Quote




Last Updated on December 22, 2024


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts