Login Page - Create Account

Support Board


Date/Time: Sun, 12 May 2024 22:55:12 +0000



Simple or impossible alert question

View Count: 4409

[2014-01-25 20:19:20]
mogull - Posts: 40
Hi,

I have this link and information.
http://www.sierrachart.com/index.php?l=doc/doc_AlertCondAndScan.html#EnterAlertOnStudy

I am wondering if I can create an alert for when a stochastic
changes direction? I have it color coded by slope, but I don't
see what to trap on to create the alert?

Thanks

Alan

[2014-01-25 20:45:04]
Sierra Chart Engineering - Posts: 104368
Yes this can be done. Although we do not provide help with alert formulas.
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
[2014-01-25 21:55:51]
mogull - Posts: 40
So I was right both times.

Simple and impossible?

How would you figure out how to do it?
[2014-01-26 16:36:14]
jackw - Posts: 57
Attached is a study collection that contains 2 studies.

The Slow Stochastics study will issue an alert when the slope of SlowD changes direction.

I also included a Color Bar study so that you could match up the colored bars against the change in the direction of the SlowD slope. Once you've confirmed the alert is working correctly, you can delete this study.

attachmentSlopeChange.StdyCollct - Attached On 2014-01-26 16:35:30 UTC - Size: 18.68 KB - 466 views
[2014-01-27 16:28:37]
Sierra Chart Engineering - Posts: 104368
To use the Study Collection attached in post #4. Follow the instructions here:
http://www.sierrachart.com/index.php?l=doc/doc_DLLUsage.html#SC
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
[2014-06-10 17:12:10]
JayShea - Posts: 92
jackw
Thanks for providing the SlopeChange study-collect.

If one wanted to write an alert for the CCI when the 14, 50 and 100 were all sloped up (or sloped down), is there a way that can be done with what you provided?

Thanks
JD
[2014-06-11 00:02:32]
jackw - Posts: 57
Attached is a study collection that contains 4 studies. The first 3 are the 14 period, 50 period and 100 period CCI. The 4th study, Color Bar Based On Alert Condition, contains the alert based on the 3 CCI studies.

The alert triggers when all 3 CCI studies are sloping upward, but you can use the same logic to configure an alert for when all 3 CCI's are sloping downward.

If you want the alerts to trigger, but don't want to color the bars, just hide the color bar study.



attachmentCCIUpSlope.StdyCollct - Attached On 2014-06-11 00:01:49 UTC - Size: 37.28 KB - 403 views
[2014-06-11 01:13:38]
JayShea - Posts: 92
Jack
Thanks very much for taking the time to do that.

I should have been more specific. Because I will overlay the 50-CCI from different Time Frames on a chart (such as on a 10-minute chart overlayed with a 30-minute 50-CCI and a 90-minute 50-CCI), I want to be able to have a candlestick (bar) on the 10-minute chart in which the 14-CCI and 50-CCI on the 10-minute chart as well as the 50-CCI on the 30-minute and 90-minute charts (study-price overlay) are all Yellow (Up).

Please see attached picture with the black vertical line at 9:55-AM indicating the 4-referenced CCI lines as all descending.

Thanks again
JD

http://www.sierrachart.com/image.php?l=1402449123387.png

Date Time Of Last Edit: 2014-06-11 01:14:58
image2014-06-10_2100_Oil.png / V - Attached On 2014-06-11 01:08:24 UTC - Size: 44.02 KB - 464 views
[2014-06-13 13:31:34]
jackw - Posts: 57
Triggering a single alert off of multiple time frames makes things a whole lot more complicated. I outlined what I think is the easiest way below, but its still pretty convoluted. I considered using spreadsheet studies to do this, but it turns out that is just as complicated, and then you have the additional overhead of the spreadsheets. The best way to do this is with a custom study, but you really don't want to invest the time in writing one until you've been using this for a while and you're sure its worth the effort.

I'm assuming your chartbook is laid out as follows:
* It contains 3 charts... 10-min, 30-min and 90 min
* You have added the 14 bar CCI and 50 bar CCI studies to the 10-min chart.
You have added the 50 bar CCI to the 30-min chart, and then used the Study/Price Overlay study to overlay the CCI onto the 10-min chart. On the overlay study, you have set 'Fill Blanks with Last Value' to Yes.
* You have added the 50 bar CCI to the 90-min chart, and then used the Study/Price Overlay study to overlay the CCI onto the 10-min chart. On the overlay study, you have set 'Fill Blanks with Last Value' to Yes.

You will need to add 5 studies to generate an uptrend alert.

Add the 'Color Bar Based On Alert Condition' study to the 30-min chart. On the studies Alerts tab, enter the following condition:
ID?.SG1 > ID?.SG1[-1]
Replace the '?' with the ID# of the CCI study on that chart. (The ID# for each study is listed next to each study name in the Chart Studies dialog box.)
Hide the color bar study.

Add the 'Color Bar Based On Alert Condition' study to the 90-min chart. On the studies Alerts tab, enter the following condition:
ID?.SG1 > ID?.SG1[-1]
Replace the '?' with the ID# of the CCI study on that chart.
Hide the color bar study.

On the 10-min chart, add the 'Study/Price Overlay' study and use it to overlay the 'Color Bar Based On Alert Condition' study from the 30-min chart.
Set 'Fill Blanks with Last Value' to Yes. Hide the study.

On the 10-min chart, add the 'Study/Price Overlay' study and use it to overlay the 'Color Bar Based On Alert Condition' study from the 90-min chart.
Set 'Fill Blanks with Last Value' to Yes. Hide the study.

On the 10-min chart, add the 'Color Bar Based On Alert Condition' study. On the study's Alerts tab, enter the following condition:
AND(ID?.SG1 > ID?.SG1[-1], ID??.SG1 > ID??.SG1[-1], ID???.SG1 = 1, ID????.SG1 = 1)
Replace the '?' with the ID# of the 14 bar CCI study on this chart.
Replace the '??' with the ID# of the 50 bar CCI study on this chart.
Replace the '???' with the ID# of the 'Study/Price Overlay' study you previously added to this chart that referenced the 'Color Bar Based On Alert Condition' study on the 30-min chart.
Replace the '????' with the ID# of the 'Study/Price Overlay' study you previously added to this chart that referenced the 'Color Bar Based On Alert Condition' study on the 90-min chart.

If you've entered everything correctly, the chart bars will be colored when all 4 CCI are trending up. If instead of colored bars, you want actual alerts to be triggered, just add the following condition to the Alerts tab of the Chart Settings dialog box (F5).
ID?.SG1 = 1
Replace '?'with the ID# of the 'Color Bar Based On Alert Condition' study you added in the previous paragraph.

For downtrend alerts, the steps are identical. Just change '>' to '<' in the alert formulas.

If you are unable to get it to work correctly, then post your chartbook, and I'll try to modify if for you.

[2014-06-13 18:53:37]
jackw - Posts: 57
I gave this some additional thought, and realized I could simplify things a bit by using the 'Color Bar Based on Slope Study'. It allows you to add both uptrend and downtrend alerts while requiring only 6 studies. (My previous post above would have required 10.)

Again, I'm assuming your chartbook is laid out as follows:
* It contains 3 charts... 10-min, 30-min and 90 min
* You have added the 14 bar CCI and 50 bar CCI studies to the 10-min chart.
* You have added the 50 bar CCI to the 30-min chart, and then used the Study/Price Overlay study to overlay the CCI onto the 10-min chart. On the overlay study, you have set 'Fill Blanks with Last Value' to Yes.
* You have added the 50 bar CCI to the 90-min chart, and then used the Study/Price Overlay study to overlay the CCI onto the 10-min chart. On the overlay study, you have set 'Fill Blanks with Last Value' to Yes.

Add the 'Color Bar Based On Slope' study to the 30-min chart.
Set the 'Based On:' drop box to 'Commodity Channel Index'
Set 'Input Data' to CCI
Set 'Use +1 and -1' to Yes
Hide the color bar study.

Add the 'Color Bar Based On Slope' study to the 90-min chart.
Set the 'Based On:' drop box to 'Commodity Channel Index'
Set 'Input Data' to CCI
Set 'Use +1 and -1' to Yes
Hide the color bar study.

On the 10-min chart, add the 'Study/Price Overlay' study and use it to overlay the 'Color Bar Based On Slope' study from the 30-min chart.
Set 'Fill Blanks with Last Value' to Yes. Hide the study.

On the 10-min chart, add the 'Study/Price Overlay' study and use it to overlay the 'Color Bar Based On Slope' study from the 90-min chart.
Set 'Fill Blanks with Last Value' to Yes. Hide the study.

On the 10-min chart, add the 'Color Bar Based On Alert Condition' study. On the study's Alerts tab, enter the following condition:
AND(ID?.SG1 > ID?.SG1[-1], ID??.SG1 > ID??.SG1[-1], ID???.SG1 = 1, ID????.SG1 = 1)
Replace the '?' with the ID# of the 14 bar CCI study on this chart.
Replace the '??' with the ID# of the 50 bar CCI study on this chart.
Replace the '???' with the ID# of the 'Study/Price Overlay' study you previously added to this chart that referenced the 'Color Bar Based On Slope' study on the 30-min chart.
Replace the '????' with the ID# of the 'Study/Price Overlay' study you previously added to this chart that referenced the 'Color Bar Based On Slope' study on the 90-min chart.
The study will color the chart bars when all 4 CCI are trending up. Set the color you want the bars to be.

On the 10-min chart, add the 'Color Bar Based On Alert Condition' study. On the study's Alerts tab, enter the following condition:
AND(ID?.SG1 < ID?.SG1[-1], ID??.SG1 < ID??.SG1[-1], ID???.SG1 = -1, ID????.SG1 = -1)
Replace the '?' with the ID# of the 14 bar CCI study on this chart.
Replace the '??' with the ID# of the 50 bar CCI study on this chart.
Replace the '???' with the ID# of the 'Study/Price Overlay' study you previously added to this chart that referenced the 'Color Bar Based On Slope' study on the 30-min chart.
Replace the '????' with the ID# of the 'Study/Price Overlay' study you previously added to this chart that referenced the 'Color Bar Based On Slope' study on the 90-min chart.
The study will color the chart bars when all 4 CCI are trending down. Set the color you want the bars to be.

Again, if you are unable to get it to work correctly, post your chartbook, and I'll try to modify if for you.

[2014-06-14 17:08:31]
jsoviero - Posts: 84
Sincere thanks to MoGull, JayShea, and especially jackw for this discussion. I have learned much implementing the instructions on various chart combinations. Thanks for sharing your work.
[2014-07-06 07:44:11]
JayShea - Posts: 92
Jack
I apologize for not having acknowledged your kind response before now. My wife and I have been hiking in the Alps for the last month and when we get back in two weeks I'll be able to test your solution. I'm looking forward to sharing the results. I won't tell my wife I wish we could go home now.

Warm regards as we move on to Africa,
JD
[2014-07-14 16:15:01]
JayShea - Posts: 92
JackW
Back from the hard life of travel. 30-hours ago I was having mint tea with disreputable types in the casbah of Tangier.

I implemented your terrific alerts etc. Two alterations so far: 1) I replaced a color-bar with color-background, and 2) I required the 14-CCI of the main chart to have the previous bar as plus 75 or minus 75 subject to Selling or Buying (relatively).

It would have taken me a long time (and I'm being kind to myself) to have understood to create slope alerts in the 'longer' time frames, as well as make the main chart alert include plus-1 and minus-1 requirements for the 'longer' time frames.

If you're ever in the Raleigh area, gratitude will be cheerfully shown.

Kind regards,
JD

http://www.sierrachart.com/image.php?l=1405353768513.png
[2014-09-20 17:57:59]
User75277 - Posts: 33
Hi I tried to use the Slope Change Study above ---> SlopeChange.StdyCollct <-- but it does not work all the time on a Range or Renko (Flexticks) or ticks per bar charts. seems to only work on a volume per bar chart. On a ticks per bar chart (144 ticks) it does not work at all.

The attached picture shows some times where it is not working. Other pictures how it working most of the time. Any idea what is wrong? Thanks in advance for your help and comments.
Attachment Deleted.
imageCHART OF SLOPE CHANGE STUDY COLLECTION WHICH DOES NOT WORK O.png / V - Attached On 2014-09-20 17:57:41 UTC - Size: 74.98 KB - 494 views
[2014-09-20 18:16:20]
JayShea - Posts: 92
75277
I only use Range Bars but have had no problem with Slope Changes. I modified Jack's StudyCollect to incorporate 15-30 and 60-minute equivalent of Range Bars. My PNG from Message #13 above is Range Bars.

It sure makes it easy to compare different 'time frames'.

Hope you figure out how to make it work for you.
JD
[2014-09-20 18:55:13]
jackw - Posts: 57
Found 2 problems with the original study collection that were creating your issue:

1) The Value format on the Stochastics study was set to 1. Because of this, when the alert formula on the color bar referenced the %D value, the value it was getting was being rounded to a whole number. So, when the change in %D from bar to bar was less than 1, the alert would fail.

2) Though it happens rarely, if the %D value is the same value 2 bars in a row, the alert would fail.

Made the following changes to the study collection:
1) Changed the Value format on the Stochastics study from 1 to .01.
2) In the alert formulas, changed the operator from '<' to '<='

The revised study collection is attached. Let me know if you still see a problem.

attachmentSlopeChange.StdyCollct - Attached On 2014-09-20 18:54:19 UTC - Size: 18.68 KB - 430 views
[2014-09-20 19:16:51]
JayShea - Posts: 92
I used CCI so didn't have a question with the original StudyCollect.

I don't understand the equation but am looking forward to learning from this new assistance from JackW.

Thanks
JD
[2014-09-20 19:41:52]
User75277 - Posts: 33
Jack, I see your changes in the newly downloaded study you provided, but it still misses some slope changes mostly when the Stochastic is flatish on either side of the slope change. For tick charts (144) it does not seem to color bars at all. I can not see what is wrong.
Date Time Of Last Edit: 2014-09-20 19:47:29
[2014-09-20 20:05:57]
User75277 - Posts: 33
Jack, assuming that some change in the formula will fix that the "flatness Stochastic" bar-coloring will be fixed.

(1) How can I test for slope change from up to down and vice-versa?
(2) How can I test if this up-to-down or down-to-up condition is true on another price chart (my main chart)?
(3) What if on my main chart I want to test if the up-to-down and vice-versa is true in two or more charts that have this slope change study in them?

Thanks for you help in advance. I really wish I could send you some money.
[2014-09-20 22:41:39]
jackw - Posts: 57
User75277,

I applied the study collection to a 144 tick chart of GCZ4. I was unable to find any errors.

One other thought. Make sure that the Stochastic study shows as ID:1 when you call up the list of studies [F6]. If not, you will need to change the alert formula in the color bar study to reflect the correct ID#.

If that's not it, then try replacing the alert formula in the color bar study with the following. It's the same logic, just a different way of getting there.

OR(AND(ID1.SG2 < ID1.SG2[-1] , ID1.SG2[-1] >= ID1.SG2[-2]) , AND(ID1.SG2 > ID1.SG2[-1] , ID1.SG2[-1] <= ID1.SG2[-2]))

If that doesn't fix it, then please post with the following attached:
1) a picture of your chart with the bars that appear to be wrong marked
2) the chartbook that contains that chart


[2014-10-13 15:02:20]
Matt654 - Posts: 73

Hi can anyone give me the Subgraph alert formula for P&F turning green and then another one for turning red. Matt
[2014-10-13 16:01:17]
Matt654 - Posts: 73


Hi Support could you post the formula for the Subgraph alert for Point & Figure turning green and then another one for turning red. Matt
[2014-10-13 18:21:00]
Matt654 - Posts: 73
Maybe you could point me in the right direction to somewhere I could find out about writing the Formula myself. Ah! just remembered its bank holiday in US, could be why there I am not getting a reply.
[2014-10-14 14:16:59]
Matt654 - Posts: 73
Hi Support is there anyone there.

Maybe you could point me in the right direction to somewhere I could find out about writing the Formula myself. Ah! just remembered its bank holiday in US, could be why there I am not getting a reply.
[2014-10-15 09:07:29]
Matt654 - Posts: 73

Hi Support its been days now and still no reply.

Sierra Chart Engineering continuously monitors the Support Board and it is given the highest priority.

Hi Support could you post the formula for the Subgraph alert for Point & Figure turning green and then another one for turning red. Matt

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

Login

Login Page - Create Account