Login Page - Create Account

Support Board


Date/Time: Fri, 07 Feb 2025 14:57:03 +0000



Post From: Bar Time Duration study

[2019-11-14 18:56:10]
kvcornie - Posts: 2
I am trying to do something very similar to the original question, in this thread, however I'm not creating a custom study.

My goal is to highlight Bar Time Duration bars that are Less than a certain duration i.e. 90 seconds.

I'm attempting this using the "Color Bar Based On alert Condition" study which is applied to the "Bar Time Duration" Study

Maybe this can't be done because the necessary TIME, as a duration, Function doesn't exist i.e. the solution above was to create a class which I assume can only be done in ACSIL/Custom Studies. (please excuse an naivety in this statement, I am new to Sierra and an EXTREMELY novice programmer)

If this is not possible there is no need to read on, as that is only to demonstrate the solutions I tried prior to posting in the support board. Please just let me know if there is a workaround. Thanks!





Though, I thought maybe Alert criteria written in decimal format might work given that I've applied the "Horizontal Lines" study to the chart and entered Decimal values which draw lines correctly even though the Y axis is formatted with standard time format and that study is also based on the Bar Time Duration Study.

So far I have gotten the following results. Please note that I have the Bar Time Duration study using a Maximum Duration of 00:02:15 or 135 seconds.

"=True" evaluates to "TRUE" as expected (all bars change color) evidenced by the Bar Time Duration Study Bars changing to the expected color

"= SG4 < 1" evaluates to “TRUE” as expected (all bars change color) since this would be MUCH greater than 2 min and 15 seconds in Serial DateTime values.


What I don’t understand:

“=SG4 > 0” evaluates to “FALSE” – I assuming these values have to be greater than 0 regardless of the format used or again, do I need the proper time class.

“SG4 < 0.0010416” evaluates to “TRUE” evidenced by ALL of the bars changing color. However, a time of 90 seconds/86,400 = 0.0010416 should have only some of the bars changing color as I have many bars that are greater than 90 seconds

Also, changing the Value Format of the “Color Bar Based On alert Condition study” to “Time” from “Inherited” does not work either.



I also tried this syntax which I found in another thread and it still colored all the bars.

=SG4<TIMEVALUE("00:01:30")

AND these which I derived from #30 of your formula examples on the forum.

=SG4 < (TIME(0, 1, 31) - TIME(0, 1, 29))
=SG4 < TIMEVALUE( (TIME(0, 1, 31) - TIME(0, 1, 29)))