Login Page - Create Account

Support Board


Date/Time: Sun, 08 Sep 2024 02:15:39 +0000



Post From: Help with Color bar based on alert condition

[2024-02-12 14:41:36]
Sawtooth - Posts: 4083
I just can’t seem to find information on the formula to use to evaluate this condition.
The Bar Time Duration study, and SG30 of the Numbers Bar Calculated Values study, both output the bar duration in SCDateTime format.
If you use SG30, then follow these instructions from the documentation:
Bar Duration: This is the time duration of the chart bar. The actual numeric value is a SCDateTime. This value can also be referenced in an Alert Condition Formula. This particular Numbers Bars Calculated Value is Subgraph 30. An example Alert Formula is SG30 < TIME(0, 0, 30). This means when the Bar duration is less than 30 seconds return TRUE. For this to be properly evaluated it is necessary to enable the Use Full Precision when Evaluating Alert Formula Alert Option.
Numbers Bars: Numbers Bars Calculated Values Subgraph Descriptions

If you use the Bar Time Duration study, then you could use the same formula:
=ID1.SG1 < TIME(0, 0, 10)
where ID1 is Bar Time Duration study.
Or this:
ID1.SG1*86400 < 10
Spreadsheet Example Formulas and Usage: Formula Equivalents of Serial Date Time Values