Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 15:47:59 +0000



[User Discussion] - Trying to create visual alert on RSI study crossover

View Count: 968

[2020-08-03 18:33:15]
gjockey - Posts: 47
Hello, I have an intraday stock chart with an RSI study with 1 plot and 2 lines RSI (SG1) | Line1 (SG2) | Line2 (SG3). I want the RSI study subgraph background to turn red when the RSI (SG1) crosses (SG2) OR (SG3). I read thru

Color Bar Based on Alert Condition
Color Bar Based on Alert Condition

Alert Formula Examples
Study/Chart Alerts And Scanning: Alert Formula Examples

I thought I had it where I got the RSI subgraph to turn red but it stays red independent of any crossover. I guess there's any number of things I could have done wrong, but I'll start with the formula I used and troubleshoot from there.

As the links instructed, I added the "Color Bar Based on Alert Condition" study to the chart and moved the study right below the RSI study in the "Studies to Graph" list.

In the Alerts tab of the "Color Bar Based on Alert Condition", I entered this as my Alert formula on separate lines as shown.

=CROSSOVER(SG1, SG2)
=CROSSOVER(SG1, SG3)

Is this formula all wrong? I want the alert to trigger on SG1 crossing SG2 or SG1 crossing SG3.


Thank You.
[2020-08-03 23:33:56]
Sawtooth - Posts: 3992
Try this:
=OR(CROSSOVER(SG1, SG2), CROSSOVER(SG1, SG3))
[2020-08-04 23:34:53]
gjockey - Posts: 47
@tomgilb, Thanks so much for that. You are a lifesaver. It, along with another piece I left out, did the trick.

I forgot to do this part "Remember that if you want to make reference to other studies in your Alert Condition formula, that you must specify the study's ID before the study Subgraph you are referencing. Example: ID1.SG2"

My RSI study was "ID:1" so this is the formula that finally worked in the Alerts tab of the "Color Bar Based on Alert Condition" Study

=OR(CROSSOVER(ID:1.SG1, ID:1.SG2), CROSSOVER(ID:1.SG1, ID:1.SG3))

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

Login

Login Page - Create Account