Login Page - Create Account

Support Board


Date/Time: Sat, 27 Apr 2024 17:36:37 +0000



Time formulas

View Count: 1962

[2017-05-08 08:59:19]
User14683 - Posts: 34
I am having difficulty to use time formulas in my alert formulas for the study " Color Background Based on Alert Condition" indicator. Where can I see examples how to write those for certain BARTIMES?
Also, would I use the same time format for time inputs for cells I85 to I90 on the Spreadsheet for Trading Study, where I want to use these time functions for my auto trading.
Thanks.
[2017-05-09 05:03:13]
Sierra Chart Engineering - Posts: 104368
Tell us what you want to do and we will put together an example.

We have done several documentation updates which should answer your question. They are here:
Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables
Spreadsheet Functions: Serial DateTime Values
https://www.sierrachart.com/index.php?page=doc/SpreadsheetSystemsAlertsAndAutomatedTrading.php#StartTimeForAllowedTimeRange

would I use the same time format for time inputs for cells I85 to I90 on the Spreadsheet for Trading Study, where I want to use these time functions for my auto trading.
Yes.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2017-05-09 05:03:36
[2017-05-09 19:41:33]
User14683 - Posts: 34
I went trough the documentation and have a hard time to get it to work.
Using the Color Background Based on Alert Condition Study, will you please let me know why this does not work"
=BARTIME = ((09*60)/(24*60))
The whole chart gets colored when I use =(09*60)/(24*60)) - just to show that all the other settings are working.
Only something wrong with the formula.
I know you guys do not help with formulas, I just want to be set on my way, please.
[2017-05-09 20:16:30]
Sierra Chart Engineering - Posts: 104368
So do you want to highlight the 9:00:00 bar?
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2017-05-09 20:16:31]
Sierra Chart Engineering - Posts: 104368
So do you want to highlight the 9:00:00 bar?
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2017-05-09 20:27:44]
User14683 - Posts: 34
Yes, I want to highlight the 09:00:00 bar
[2017-05-09 20:50:13]
User14683 - Posts: 34
I want to use other formula also, but thought to first let the simple one work e.g.
=AND(BARTIME >= ((09*60)/(24*60)), BARTIME <= ((14*60)/(24*60)))
This one also shows nothing - I get a message Error: #SYNTAX!
Not sure why.
[2017-05-10 05:19:10]
Sierra Chart Engineering - Posts: 104368
The easiest way to highlight a bar is to use the Time Line study:
https://www.sierrachart.com/index.php?page=doc/StudiesReference.php&ID=181#Time_Line


This is the formula you will want to use:
ABS(BARTIME - TIME( 9, 0, 0)) < TIME(0, 0, 1)

We do not get a syntax error from this:
=AND(BARTIME >= ((09*60)/(24*60)), BARTIME <= ((14*60)/(24*60)))


However, this is not valid to be used on a Spreadsheet if that is where you are trying to enter it. BARTIME is not recognized on a spreadsheet. It can only be used as a Simple Alert Formula:
Study/Chart Alerts And Scanning

Here is the documentation for Spreadsheet functions:
Spreadsheet Functions
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2017-05-10 05:22:49
[2017-05-10 07:15:38]
User14683 - Posts: 34
I will work on your advice.Thanks.

Will you please check WHY I am getting a syntax error when I try to get the following Simple Alert Formula to work:
=AND(BARTIME >= ((09*60)/(24*60)), BARTIME <= ((14*60)/(24*60)))
Attached please find the Alert Log.
Private File
Attachment Deleted.
[2017-05-10 07:17:57]
User14683 - Posts: 34
I am currently using SC 1555
[2017-05-10 12:57:33]
User14683 - Posts: 34
I got it right. No need for help further. Thanks.
[2017-05-10 13:55:05]
Sawtooth - Posts: 3979
It's much easier to use the TIMEVALUE function:

Simple Alerts syntax:
=AND(BARTIME >= TIMEVALUE("09:00:00"), BARTIME <= TIMEVALUE("14:00:00"))

Spreadsheet syntax:
=AND(FRACTIME(A3) >= TIMEVALUE("09:00:00"), FRACTIME(A3) <= TIMEVALUE("14:00:00"))

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

Login

Login Page - Create Account