Alert for time between bars on tick chart


0
0

In Sierra chart we can use range per bar -True (in ticks) for intraday charts. These charts are of course not time based but based on range of the bar. The time of each bar varies based on activity and volatility. I want to know when the time between bars is decreasing, that is if the time between the last complete bar (bar 1) and the previous bar (bar 2) is less than, for example 1/2 of the time between the previous bar (bar 2) and the bar previous to that (bar 3). It would be advantageous to be able to change to 1/2 to 40% or 60% as it might vary for different markets. If there could be an audible alert when the condition is enacted that would be preferred.

Thanks

Marked as spam
Posted by (Questions: 2, Answers: 0)
Asked on May 10, 2019 3:18 am
225 views
0
I have updated the title of this question to more accurately reflect the context of your question. "Bar Timing" was simply too vague. We need to make sure the majority of our viewers will be able to search for and identify this post from the title.
( at May 10, 2019 8:14 am)
0
Private answer

I think I can demonstrate this with a single screenshot. Let me know if you have any questions. The screenshot shows two studies loaded to the chart. The lower study is a built-in study named "Bar Time Duration". I did not change any settings. The alert formula will be applied to this study. So don't get confused because the screenshot shows the alert formula has been applied to a second chart study named "Color Bar Based On Alert Condition". I applied the formula to this study to show which bars on the chart will be triggering alerts.

Now this is a very basic formula and it does not do any math. It simply states that the current bar (ID1.SG1) time duration is less than the previous bar (ID1.SG1[-1]) time duration. You may want to perform some math to the previous bar's time duration. Here is a modified version of this formula that will alert only when the current bar's time duration is less than 50% of the previous bar's time duration.

ID1.SG1 < ID1.SG1[-1] * 0.5

 

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on May 15, 2019 10:55 am