Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 07:56:53 +0000



[User Discussion] - Need code for the following alarm.

View Count: 2623

[2014-04-15 10:26:42]
RQ - Posts: 50
I would like to combine two indicators to generate one alarm. Is this possible?
[2014-04-15 17:28:23]
Sierra Chart Engineering - Posts: 104368
Yes this is possible. You will need to use the Simple Alert feature and write an Alert Condition formula which references more than one study. This is the specific documentation for this:
http://www.sierrachart.com/index.php?l=doc/doc_AlertCondAndScan.html#ReferencingOtherStudies
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
Date Time Of Last Edit: 2014-05-24 20:02:31
[2014-04-15 20:15:38]
RQ - Posts: 50
Guys, that's good news. Now for the next step would you provide me with the code for the alarm based on the formula below? If you need payment for the job that's fine, please just let me know.

Alarm criteria: we will be using the volume and the ATR indicators

Volume must be higher than the last bar and ATR indicator must be lower than the last bar = alarm. The alarm should show up in the alert window confirming the chart and timeframe.

If possible the alarm should put a triangle on the chart on top of the price bar the criteria was confirmed (size and colour variable). If this is not possible that's ok; I can do without it if I have to.

Date Time Of Last Edit: 2014-04-15 20:18:37
[2014-04-15 21:44:02]
M5amhan - Posts: 468
=AND(V>V[-1], ID1.SG1<ID1.SG1[-1]) is the code you can use in the alert tab of the study called "Color Bar Based On Alert Condition"

Make sure the ATR indicator is ID:1 (or change the code for the appropriate ID)

Then set the draw style of the color bar study to "point on high"

This is the result: http://www.sierrachart.com/image.php?l=1397598232843.png
[2014-04-16 12:07:23]
RQ - Posts: 50
M5amhan, a first class job. It's working great. Thanks
[2014-05-24 16:18:08]
RQ - Posts: 50
M5amhan, I am hoping you can help me out with code for an alarm.

I use two Bollinger bands; the length setting (bars back) is different. For purposes of this discussion let's say the small Bollinger band length is 10 and the large Bollinger band length is 50.

I am not interested in the middle band; I focus on the upper and lower bands.

Alarm condition if the upper band on the small Bollinger crosses above the upper band on the large Bollinger I need an alert and I would like (if possible) to be able to change the background colour of the chart; and the background should stay coloured until the small upper Bollinger band returns back inside the large Bollinger upper band.

I want exactly the same thing but just in reverse for the lower Bollinger bands. (Chart background colour should be the same for the Bollinger higher or lower breakout.
Is this possible? Thanks

[2014-05-25 02:15:21]
M5amhan - Posts: 468
=OR(ID1.SG1<ID2.SG1,ID1.SG3>ID2.SG3)

use the study called color background based on alert condition

that is assuming the 50 period is ID1 and the 10 period is ID2


imageQQQ Daily #1 41784.088.png / V - Attached On 2014-05-25 02:08:31 UTC - Size: 102.48 KB - 363 views
[2014-05-25 17:08:04]
RQ - Posts: 50
Hi M5amhan; thank you very much; you have done a terrific job. You know your stuff. Please take a look at the attachment and let me know if this is something you could do.
attachmentpivot point alert.pdf - Attached On 2014-05-25 17:05:50 UTC - Size: 121.67 KB - 605 views
[2014-05-25 19:42:36]
M5amhan - Posts: 468
use two of the "color bar based on alert condition" and check "evaluate on bar close" on both of them

pivot high: =AND(H>H[-1],H>H[1])
pivot low: =AND(L<L[-1],L<L[1])

set draw style to "point on high" for pivot high & "point on low" for pivot low
imageQQQ Daily #1 41784.821.png / V - Attached On 2014-05-25 19:42:33 UTC - Size: 63.06 KB - 356 views
[2014-09-04 14:49:50]
OneMoreTick - Posts: 79
I used this to create pivot dots for pivot highs/lows and they're great but they're not updating in real time. The dots don't print in real time. I have to open the study settings page and select "Apply" to get them to show up. I've been experimenting with the Alert page settings (enabled, reset condition on new bar, alert only once per bar, evaluate on bar close) but I haven't been able to figure it out to get them to show up in real time. What selections are required to keep them showing up in real time?
Date Time Of Last Edit: 2014-09-04 14:59:45

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

Login

Login Page - Create Account