Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 17:03:24 +0000



Indicator based alert

View Count: 1107

[2020-10-06 16:18:42]
User645832 - Posts: 99
I would like to create and alert that is triggered when an indicator color is changed from red to green or from green to red. The indicator is called 'SuperTrend' (SierraChartStudies_64.scsf_SuperTrendStop), what is the alert condition I need to code?
Thank you!
[2020-10-06 16:42:17]
John - SC Support - Posts: 31318
Refer to the information here:
Study/Chart Alerts And Scanning: Writing Formulas for Studies without Obvious Values
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2020-10-06 16:56:14]
Ackin - Posts: 1865
User645832)



I've made this as an improvement in the past. If you want, register on the forum czsk and download it as a study there (without source code)

Study:SuperTrendStop - improved




contact link:
https://www.sierrachart.com/UserControlPanel.php?page=StudyStore&SCDLLName=zyp_download_free
imagesupertrend improved.png / V - Attached On 2020-10-06 16:52:38 UTC - Size: 80.34 KB - 295 views
[2020-10-06 17:02:08]
User645832 - Posts: 99
John thank you, I did that, but the study has only one value in the subgraph (attached).
Didn't see any color value.
imageST.PNG / V - Attached On 2020-10-06 17:01:01 UTC - Size: 5.07 KB - 230 views
Attachment Deleted.
[2020-10-06 17:09:10]
Ackin - Posts: 1865
John thank you, I did that, but the study has only one value in the subgraph (attached).
Didn't see any color value.

I once had a question to SC support whether the color is stored by default in the Datacolor item ... official answer: No ... in other words for non-programmers: in most studies in the default Sierrachart list you have no chance to detect a color change without modifying the source code. This applies to 70 percent of all studies in the default list. I doubt anything has changed since then. I write this in a good meaning for you and save your time when searching.
Date Time Of Last Edit: 2020-10-06 17:11:04
[2020-10-06 17:20:30]
John - SC Support - Posts: 31318
Ackin is correct, but in the case of the particular study you are asking about, the data is stored in the Subgraph data. You pulled up the Chart Values Window, which only shows the information for the most recent bar. You need to use the Tools Value Window to see the data at each bar.

In this particular case, what you can see is that the data is above the bar in one case and below the bar in another. So you can use that as a reference and create an alert using an AND statement like the following to find the transition from above to below:
=AND(ID1.SG1[-1] > L[-1], ID1.SG1 < L)
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2020-10-06 17:33:59]
User645832 - Posts: 99
Thanks guys, you are both awesome, I'll try that John!
[2020-10-08 10:39:07]
User645832 - Posts: 99
It works, thank again John!

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

Login

Login Page - Create Account