Support Board
Date/Time: Sun, 19 Jan 2025 12:38:55 +0000
Cumulative Sum of Study
View Count: 1339
[2018-04-09 21:06:44] |
RonW - Posts: 105 |
http://www.sierrachart.com/image.php?Image=1523307677455.png Chart region 1: 5 minute candles of NQ futures day session Chart region 2: Color Bar based on Alert Condition, set to Output 1 when True, 0 when False, and draw the 0 values. The Alert Condition is simple: AND(H>H[-1],L>L[-1],C>C[-1]) Chart Region 3: Cumulative Sum of Study based on the Color Bar, reset at start of trading day, basically, count how many times per day the condition is true. Nothing draws in region 3. Error message: Chart: F.US.ENQM18 5 Min #6 | Study: Cumulative Sum Of Study | Subgraph array being referenced is empty. | 2018-04-09 17:04:46 * I tried it first with the Color Bar on the default "Do not draw zero values" That didn't work either. Am I doing something wrong? Thanks. |
[2018-04-10 19:12:38] |
Sierra Chart Engineering - Posts: 104368 |
This is a calculation precedence issue. The Color Bar Based on Alert condition has a lower calculation precedence than Cumulative Sum of Study. You can modify Cumulative Sum of Study to have a very low calculation precedence which will solve the issue. Refer to: How to Build an Advanced Custom Study from Source Code Another way to approach this problem would be to use the Spreadsheet Study. You can enter your condition in Column K to get the 1s and 0s, and then add them up in another column. How to setup the rest of the formulas is beyond the scope of our support, so you will need to work with the data to determine how to sum up the data as you want. 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 Date Time Of Last Edit: 2018-04-10 19:12:53
|
To post a message in this thread, you need to log in with your Sierra Chart account: