Login Page - Create Account

Support Board


Date/Time: Tue, 18 Jun 2019 17:55:22 +0000



Count Bars Since Alert Condition

Support Request:
[2019-03-11 08:58:00]
User993113 - Posts: 52
I need to count the number of bars since the last time an Alert Condition occured.
Is there a way to do this with a study or a spreadsheet formula?

Thank You
[2019-03-11 13:14:36]
tomgilb - Posts: 2176
You can do it with a spreadsheet study. Here's an example:
https://www.sierrachart.com/index.php?page=doc/SpreadsheetExampleFormulasAndUsage.php#CountBarsSinceAnEvent
[2019-03-11 18:40:32]
jenda3 - Posts: 20
Or you can use Spredsheet study with this formula IF(ID16.SG1>0,ID11.SG1[-1]+1,0) ID16 is Alert condition and ID11 is Spredsheet study. And for Spredsheet study subgraph use draw stlye: line
[2019-03-13 09:37:58]
User993113 - Posts: 52
tomgilb and jenda3 thank you , it's working.

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

Login

Login Page - Create Account