Support Board
Date/Time: Tue, 11 Mar 2025 17:46:42 +0000
referencing past range of bars by date-time range in alert formulas
View Count: 724
[2022-04-17 10:36:46] |
User12089 - Posts: 365 |
for alert formulas, in the documentation i only saw ways for referencing range of past bars by the bar index e.g. [-1:-200] refers to the last 200 bars in alert formulas, is there any way (direct or indirect) to use a date/time range to specify all past bars which fall inside e.g. [date/time1 : date/time2] ? That would round up ALL bars which fall inside the specified date/time range As bars here can be Range bars ie not just the usual time based bars e.g. 5 mins etc |
[2022-04-18 15:40:52] |
John - SC Support - Posts: 38580 |
There are ways to use the time as you suggest. Refer to the following: Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2022-04-18 16:36:00] |
User12089 - Posts: 365 |
i couldnt see there what i was asking for ie: "in alert formulas, is there any way (direct or indirect) to use a date/time range to specify all past bars which fall inside e.g. [date/time1 : date/time2] ? That would round up ALL bars which fall inside the specified date/time range" for example the expression [-1 : -200] is the range of the last 200 bars i cound not see info that expression like [date/time1 : date/time2] would specify ALL bars (even if they are range bars) falling inside the date range between date 1 and date 2 - that can translate into whatever e.g. [-300 : -890] more attention to detail please Date Time Of Last Edit: 2022-04-18 16:38:08
|
[2022-04-18 17:22:59] |
John - SC Support - Posts: 38580 |
Take a look at Example #11 here: Study/Chart Alerts And Scanning: Alert Formula Examples For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2022-04-23 11:32:47] |
User12089 - Posts: 365 |
no my friend, you dont get the essence of the question objective - this is point 11 as u suggested: aking an Alert Condition Formula Function During Certain Times: In this example the alert will only function between 5:30:00 and 22:20:00. =AND((Your Alert Condition Formula), BARTIME >= TIME(5, 30, 0), BARTIME <= TIME(22, 20, 0)) the original question is NOT about constraining during what time periods a formula will work/fire, BUT getting the Bar Indicies OF ALL BARS (even if they are of type range bars) falling / residing inside a specified time period this is SC formula range expression [bar index 1: bar index2] the question was whether such expression is ALSO supported - [date/time1 : date/time2] - it would specify ALL bars (even if they are range bars) falling inside the date range between date 1 and date 2 - that in turn can translate into whatever bar index range e.g. [-300 : -890] as the net outcome/result the thus determined ranges of bars are then used in bigger formula expressions like AND(MAX(V[time1:time2]), MAX(AV[time3:time4])) etc i would strongly advise forwarding this to your technical team also forward to them this (another type of RANGE formula expression still without answer) - referencing common global variable in alert formulas ps: i am already convinced that the answer to BOTH is NO it is not supported by the SC formula language for alerts Date Time Of Last Edit: 2022-04-23 12:11:20
|
[2022-04-23 12:36:02] |
Sawtooth - Posts: 4182 |
the question was whether such expression is ALSO supported - [date/time1 : date/time2]
This is apparently not supported with Simple Alerts.However, you can do it with a spreadsheet study, using a modification of this example: https://www.sawtoothtrade.com/example-10.html Date Time Of Last Edit: 2022-04-23 12:41:12
|
[2022-05-01 14:29:58] |
User12089 - Posts: 365 |
smashing, thanks Tom, not only understood what was asked here but also provided a solution great web site btw |
To post a message in this thread, you need to log in with your Sierra Chart account: