Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 23:54:53 +0000



[Programming Help] - How to reference a symbol name in an Alert Condition?

View Count: 959

[2015-04-28 18:42:22]
Bedhog - Posts: 179
Hello Support,

Is there a way to reference a symbol name in an Alert Condition?

For example:

=or
(
and(Symbol=CLM5-NYMEX,H[-3]-L>0.15),
and(Symbol=YMM5-CBOT,H[-3]-L>15.0)
)

I'd like to use 1 Chartbook and switch between symbols using the Quote Board.

Thank you.

[2015-04-28 19:00:50]
Sierra Chart Engineering - Posts: 104368
There is not support for this.
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
[2023-03-19 15:32:51]
User423915 - Posts: 15
I switch between symbols using the watchlist. Are symbols within alerts still not supported? If not, is there any workaround that achieve a similar result? The alert condition in the chart settings do not seam to support references to studies?

Is the only way to achieve this to code the alert in C++?

Any help is greatly appreciated! Thx!!
[2023-03-20 09:51:50]
User61168 - Posts: 403
It's doable via simple alerts with a little bit of planning and hardcoding. Here's what I have done:
1) Assign a numeric value to each symbol in your watch list. example: 1 for NQ, 2 for ES etc
2) Add a new line study (say ID1.SG1) with a value of nn associated your symbol's numeric value.
pro tip: 1) You can use a line study to act as a "input" parameter to your entire study collection. 2) you could use some value like 999 to ignore symbol i.e apply logic to all symbols or 0 to ignore it completely
3) In your alert condition, hardcode logic pertaining to each symbol. See example below

OR(
AND(ID1.SG1=1,"add conditional logic specific to NQ here"),
AND(ID1.SG1=2,"add conditional logic specific to ES here"),
AND(...)
)

Hope this helps.
Date Time Of Last Edit: 2023-03-20 09:53:19

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

Login

Login Page - Create Account