Login Page - Create Account

Support Board


Date/Time: Wed, 19 Mar 2025 04:36:01 +0000



Custom study?

View Count: 355

[2022-10-16 18:35:00]
User207296 - Posts: 4
Hi,

I'm wanting to write up a custom trade alert that is based on multiple conditional statements being true.

For example, say I have a historical chart that's by daily intervals. I have the following studies: 100day SMA, 200day SMA, Yearly VWAP, RSI.

I want a trade alert when the following conditions are all met:
Closing price % deviation from 100daysma < x%
Closing price % deviation from 200daysma < x%
Closing price % deviation from Y-VWAP < x%
RSI<30

Conceptually it should be simple... multiple conditional true/false statements that checks values of closing price agaisnt different study data.
But i'm unsure how to begin- do i need to build a custom study file to do this? Or are there other ways?

Thanks in advanced.
[2022-10-17 15:11:47]
John - SC Support - Posts: 38782
If you just want to be notified when the conditions are met, then you would create an Alert either on the Chart itself or on one of the studies. It really does not matter where you actually put the alert.

In order to string together a series of items like this, you would use the AND() and OR() functions. To get you started, here is what the first two conditions would look like (assuming that you want the Close to be within the bands of the SMA +/- the deviation):
=AND(OR(C < ID1.SG1 * 1.1, C > ID1.SG1 * .9), OR(C < ID2.SG1 * 1.1, C > ID1.SG1 * .9))

Where ID1.SG1 is the ID and Subgraph ID of the 100 Days SMA and ID2.SG1 is the ID and Subgraph of the 200 Days SMA - you would change these to your particular setup. We assumed a 10% deviation, hence the multiplication by 1.1 and .9 - you would change these to whatever you want.

Refer to the information on Alerts at the following link:
Study/Chart Alerts And Scanning
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account