Support Board
Date/Time: Wed, 02 Jul 2025 05:39:51 +0000
Count of Bars that Make New High/Low of Day
View Count: 240
[2024-08-15 14:38:13] |
connordw - Posts: 49 |
Hello, is there a study that would allow me to display a graph that shows the cumulative number of bars that make a new high or low on the day. For example, if bar 1 makes a new high on the day the count would be 1. If bar 2 makes a new high on the day the count would be 2. If bars 3-6 do not make new high of day and then bar 7 makes a new high of the day the count would be 3. Goal is to keep track of the number of new highs made on the day with the goal of helping to identify trend day. Thank you.
|
[2024-08-15 16:23:03] |
John - SC Support - Posts: 40702 |
There is not a direct study that does this, but you can use the Spreadsheet Study to get what you want. Here are the general instructions: - Add the "High/Low for Time Period" study to a chart. Set the times as you want and set the Input for "Display High Low Incrementally" to "Yes". - Add the Spreadsheet Study to the same chart and in the spreadsheet study enter the following in order to get the new high: - Cell K3: =IF(ID1.SG1@3 <> ID1.SG1@4, 1, 0) - Cell L3: =IF(K3, L4 + 1, L4) Where ID1 is the ID of the High/Low for Time Period Study. SG1 is the High subgraph of that study. Note that the above will give you all the high changes for the entire length of the High/Low for Time Period Study. If you want to limit the count to the current day, starting at 08:30:00, then you would enter the following in cell K3: =IF(AND(INTDATE(A3) = TODAY(), FRACTIME(A3) >= TIME(08, 30, 00)), IF(ID1.SG1@3 <> ID1.SG1@4, 1, 0), 0) You would have to modify the above to give you exactly what you are wanting. Also note that you are going to get a count for the first high for the time period (i.e. if you start the count at 08:30:00, you will get a count for the first value at 08:30:00), so you might want to subtract 1 from the count value in order to get the number of counts SINCE that time. But it all depends on what you want. For the most reliable, advanced, and zero cost futures order routing, use 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: