Login Page - Create Account

Support Board


Date/Time: Sun, 12 May 2024 16:25:34 +0000



[Programming Help] - Trigger Alert if price moves x ticks(or points) within y time (in ms)

View Count: 208

[2023-12-22 21:28:22]
masedi - Posts: 37
Hi Team,
I am trying to trigger an alert for when the price moves a certain number of ticks (or points) within a short amount of time, like 500 ms.

What would be the most accurate / efficient way to achieve that?

My ideas so far:
1) ========================
I found 2 Studies:
[Rate of Change - Points] and [Bar Difference] and was thinking to add one of those studies to a 500 ms candlestick chart, and set the alert trigger to = SG1 >= ABS(x)

2)==========================
Another idea I had would be to use an X tick range chart and trigger an alert if bar start time - bar end time <= 500 ms

------------------------

Is there any better approach or ready study that I could use?

Regards
[2023-12-22 23:21:02]
ertrader - Posts: 645
The studies: "numbers bars calculated values" and "numbers bars calculated values 2" has several velocity related outputs that may help.
[2023-12-23 13:27:21]
masedi - Posts: 37
Thanks, but I couldn't find any study that calculates rate of change over a period of time in those studies.

I am still new to SC so maybe I overlooked something ?
[2023-12-23 16:53:59]
Sawtooth - Posts: 3995
I am trying to trigger an alert for when the price moves a certain number of ticks (or points) within a short amount of time, like 500 ms.
There are no native studies that can capture an intrabar value and then compare it to another.
Is there any better approach or ready study that I could use?
In a word, no.
Either of your two ideas are the best you can do with Simple Alerts, or spreadsheet studies, aside from a custom ACSIL study.
[2023-12-23 17:29:55]
masedi - Posts: 37
Thanks.

Will try the 2 methods
- time bars with bar difference
- range bars with bar start - bar end time
and see how it works.

The only issue I can see with these methods is if the fast move starts in one bar and goes to the next bar, then I wouldn't get the alert, for example:

- I want to alert at 6 ticks over 500ms
- in the first 500ms bar 3 ticks move happens, then in the next 500ms bar the next 3 ticks happen. In that case the individual 500ms bars might be less than the 6 ticks and hence not trigger the alert

Any ideas how to tackle this scenario?
Date Time Of Last Edit: 2023-12-23 22:43:55
[2023-12-23 21:30:31]
ertrader - Posts: 645
It seems like something you will need custom written. ACSIL/C++ is the language SierraChart uses for custom charts rather than something built in. I have had good success working with Geoff at www.twofoxtrading.co.uk .
Date Time Of Last Edit: 2023-12-23 21:30:59
[2023-12-23 21:45:19]
Sawtooth - Posts: 3995
Any ideas how to tackle this scenario?
There is no way to always avoid this, aside from a custom ACSIL study.

I think using a 6 tick range chart with the Bar Time Duration study, who's output is in SerialDateTime format, would be the easiest.
Then compare its output with 0.5/86400 (a half-second) in a formula like this:
=ID1.SG1<=0.5/86400
where ID1 is the Bar Time Duration study.

This also would work:
=ID1.SG1<=500/86400000

Spreadsheet Example Formulas and Usage: Formula Equivalents of Serial Date Time Values

However, this doesn't solve your no-alert-when-overlapping issue, but it might have fewer missed alerts.
Date Time Of Last Edit: 2023-12-24 00:40:03

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

Login

Login Page - Create Account