Support Board
Date/Time: Fri, 10 Jan 2025 04:20:35 +0000
Bar Time Duration
View Count: 2185
[2015-07-21 01:56:08] |
blknsxy - Posts: 29 |
In this study and the Bar Duration used in the Number Bars Calculated value, what units (Time) are being used? As I wish to code an alert for less than three minutes or some percentage value less than the previous bar. Thanks Kurt |
[2015-07-21 08:49:16] |
Sierra Chart Engineering - Posts: 104368 |
The time values are represented using the SCDateTime format which is documented here: https://www.sierrachart.com/index.php?page=doc/doc_SCDateTime.html 3 minutes is equal to 3.0/1440.0 as an SCDateTime value. 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 |
[2016-08-18 18:26:32] |
Bedhog - Posts: 179 |
Is it possible to reference and compare time in a simple alert? There is a column in the spreadsheet for Numbers Bars Calculated Values [ID1] [ID1.SG30] Bar Duration row1: 0.053796262 displays on the chart as 01:17:28 row2: 0.022801146 displays on the chart as 00:32:50 row3: 0.0021993404 displays on the chart as 00:03:10 I've tried using this in the simple alert expecting it to flag only the 3rd row (i.e. 3m 10s is less than 32m 50s) =ID1.SG30<0.022801146 Thanks. |
[2016-08-18 18:35:25] |
Sierra Chart Engineering - Posts: 104368 |
Yes this will work, but you need to refer to this section about this: http://www.sierrachart.com/index.php?page=doc/StudyChartAlertsAndScanning.php#ValueFormat 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 |
[2016-08-18 19:00:18] |
Bedhog - Posts: 179 |
That is a good document... do I need to use a function to convert the value before making a comparison? The study is 'Color Bar Based on Alert' The Value Format = 'Time' The alert is hard coded to the value found in row2 =(id1.sg30=0.022801146) I've run the decimal place up and down the numbers, and run the Value Format through it's different selections from 1, 0.1, 0.001, etc... and I cannot find a combination to tag the bar. |
[2016-08-19 18:22:23] |
Sierra Chart Engineering - Posts: 104368 |
We need some time to look into this and prepare an example.
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 |
[2016-08-20 01:12:41] |
Sierra Chart Engineering - Posts: 104368 |
We have looked into this. Refer to formula example 30 here: http://www.sierrachart.com/index.php?page=doc/StudyChartAlertsAndScanning.php#FormulaExamples This is a new example we put together which explains how to do this type of comparison in general. 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 |
[2016-08-20 23:39:55] |
Bedhog - Posts: 179 |
This chart is a 500 Delta Volume per Bar. The goal is to identify any candle that closes within the specified time. (ideally it would just be any bar that closes in less than 1 minute). In the attached image, I want to tag the top left bar that closed in 00:06:22 The alert is configured as =AND(SG1 > TIME(0, 6, 0), SG1 < TIME(0, 7, 0)) Date Time Of Last Edit: 2016-08-20 23:40:42
|
barduration.jpg / V - Attached On 2016-08-20 23:39:33 UTC - Size: 104.53 KB - 347 views |
[2016-08-21 00:09:02] |
Sawtooth - Posts: 4147 |
To mark the bar that closes in less than 1 minute, try this: =ID1.SG1<TIMEVALUE("00:01:00") To mark the bar that closes in between 6 and 7 minutes, try this: =AND(ID1.SG1>TIMEVALUE("00:06:00"),ID1.SG1<TIMEVALUE("00:07:00")) Date Time Of Last Edit: 2016-08-21 15:29:53
|
[2016-08-21 16:33:36] |
Bedhog - Posts: 179 |
That makes sense... :) This tags every bar =ID1.SG30<TIMEVALUE("00:07:00") This does not tag any bars =AND(ID1.SG30>TIMEVALUE("00:06:00"),ID1.SG30<TIMEVALUE("00:07:00")) Date Time Of Last Edit: 2016-08-21 16:35:35
|
barduration2.jpg / V - Attached On 2016-08-21 16:32:52 UTC - Size: 204.19 KB - 389 views barduration3.jpg / V - Attached On 2016-08-21 16:32:58 UTC - Size: 113.71 KB - 297 views |
[2016-08-21 18:26:46] |
Sawtooth - Posts: 4147 |
Sorry, I tested these formulas using the Bar Time Duration study, not the Numbers Bars Calculated Values study. They work on the former, but not on the latter. This is the case for the both the TIME and TIMEVALUE versions. They work (using the spreadsheet syntax) in a spreadsheet study when referencing either the Bar Time Duration study or Numbers Bars Calculated Values study, so the format is valid. Why, as Simple Alert formulas, they work using the Bar Time Duration study, but not on the Numbers Bars Calculated Values study, is a question for Support. |
[2016-08-21 19:35:44] |
Bedhog - Posts: 179 |
Excellent - It is working with the Bar Time Duration study. Thank you! This example will find when a 500-delta-volume-bar bar closes less than 3m. =ID42.SG1<TIMEVALUE("00:03:00") |
barduration4.jpg / V - Attached On 2016-08-21 19:35:40 UTC - Size: 94.73 KB - 307 views |
[2016-08-22 00:23:59] |
Sierra Chart Engineering - Posts: 104368 |
Why, as Simple Alert formulas, they work using the Bar Time Duration study, but not on the Numbers Bars Calculated Values study, is a question for Support. You need to make sure the Numbers Bars Calculated Values study has a Value Format setting of "Time" for this type of formula. 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 |
To post a message in this thread, you need to log in with your Sierra Chart account: