Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 02:57:24 +0000



Post From: How to reference a symbol name in an Alert Condition?

[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