Login Page - Create Account

Support Board

Date/Time: Wed, 18 May 2022 12:24:59 +0000

[User Discussion] - SC code to define time period during which a spreadsheet alert i

View Count: 1320

[2013-05-16 01:34:39]
User12819 - Posts: 3
I only want my spreadsheet alert to give signals between 7:45:00 and 14:00:00 on my intraday chart. What SC code should I use to limit "True" condition signals within this time period?
Thank you.
User 12819
[2013-05-16 04:41:57]
tomgilb - Posts: 3270
Try something like this:

[2013-05-18 17:33:24]
User12819 - Posts: 3
If someone else reads this post I would like them to know that using cell "J41" will not work. However,cell "A3" ( which contains the Serial Date-Time Value) DOES work! This is how I used it and it worked great: =AND(YourAlertConditions, A3-INT(A3)>TIMEVALUE("07:45:00"),A3-INT(A3)<TIMEVALUE("14:00:00")) Thanks for the help
[2013-05-18 18:08:16]
tomgilb - Posts: 3270
If you are using this formula in columns K-AX, you need to use the absolute value of J41, like this:


Using J41 is preferred to A3 because J41 is updated many times intrabar, whereas A3 is only updated at bar open. This is particularly true if your bars are a long duration.
Date Time Of Last Edit: 2013-05-18 18:30:24
[2013-05-19 00:39:08]
User12819 - Posts: 3
in your post of 2013-05-16 you did not show using "$" to obtain the absolute value of "J" & "41". It did work when I tried doing it that way. Thank you for the further explanation.

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


Login Page - Create Account