Login Page - Create Account

Support Board


Date/Time: Sat, 27 Apr 2024 06:22:10 +0000



[Programming Help] - alert condition kijun sen

View Count: 1364

[2017-07-18 13:54:48]
User494206 - Posts: 44
Dear I want an alert condition when the Kijun-Sen changes from slope, the auto coloring works perfect with based on slope. Now I would like an alert.


It is strange but number 8 and 9 do not work:

Study/Chart Alerts And Scanning: Alert Formula Examples

Can you help me out please?
[2017-07-19 18:41:00]
Sierra Chart Engineering - Posts: 104368
This is the correct formula:
=OR(AND(SG1[0] > SG1[-1],SG1[-1] <= SG1[-2]),AND(SG1[0] < SG1[-1],SG1[-1] >= SG1[-2])).

However, refer to this section about what the problem could be:
Study/Chart Alerts And Scanning: The Effect of the Value Format on Identifier Values
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: 2017-07-19 18:46:16
[2017-07-19 18:46:32]
Sierra Chart Engineering - Posts: 104368
We updated the formula in the prior post. Use the one we have given now.
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
[2017-07-20 11:58:27]
User494206 - Posts: 44
Dear,

Thank you for helping me.

I also get an alert when the Kijun-Sen moves futher in the same direction. I want an alert when the Kijun-Sen changes from direction. Is that possible? It is difficult...

Thank you
[2017-07-20 13:29:33]
Sierra Chart Engineering - Posts: 104368
It was necessary to use that formula, otherwise the condition will almost never would be true.

It is actually involved to implement an alert for this study to do what you want.

We can refer you to a programmer who can help with this, but it might not be worth it for you.
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: 2017-07-20 13:30:34
[2017-07-20 20:03:17]
Sawtooth - Posts: 3976
You'll need to create a persistent variable, and what you want to do can easily be done with the Spreadsheet System/Alert study.
Try this:

1) Move the Kijun-Sen study to the top of the Studies to Graph list.
2) Add the Spreadsheet System/Alert study.
-Give it a name in the Spreadsheet Name field.
-On the Settings and Inputs tab, assign the Column K Alert.
-You may want to set 'Signal Only On Bar Close (Columns K,M)' to Yes.
-On the Subgraphs tab, set the Draw Style of SG1 to your requirements.
-Go here and copy the formula: http://www.sawtoothtrade.com/example-6.html
On the spreadsheet:
-Paste the copied formula in cell Z3.
-Enter this formula in cell K3:
=Z3<>Z4
[2017-07-20 20:15:53]
Sierra Chart Engineering - Posts: 104368
Thank you for the above.
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
[2018-02-05 13:54:17]
User494206 - Posts: 44
Dear,

My programmer needs some help. Can you help me futher?

Since the Kijun-Sen has some segments that are flat, you'll need to use the Spreadsheet System/Alert study so that you can create a persistent variable to 'remember' the direction through those flat segments.

Try a formula like this, e.g. in cell Z3, where the Kijun-Sen is ID1:

=IF(OR(ID1.SG1@3>ID1.SG1@4,AND(ID1.SG1@5>=ID1.SG1@4,ID1.SG1@3>ID1.SG1@4)),1,IF(OR(ID1.SG1@3<ID1.SG1@4,AND(ID1.SG1@5<=ID1.SG1@4,ID1.SG1@3<ID1.SG1@4)),-1,Z4))

It returns a 1 if the line is sloped up, or if the current segment is flat and the previous segment was up.
It returns a -1 if the line is sloped down, or if the current segment is flat and the previous segment was down.

You will then need to find the transitions using formulas in columns K and M:
K3:
=AND(Z4-1,Z3=1)
M3:
=AND(Z4=1,Z3=-1)

Then assign an alert# to column K and column M.

The code he gave doesn't work and for me it is to difficult what he means. Can you help me out?
[2018-02-05 18:29:25]
Sawtooth - Posts: 3976
The K3 formula in post #8 is incorrect.

Use this formula in K3:
=AND(Z4=-1,Z3=1)
[2018-02-06 09:59:59]
User494206 - Posts: 44
Ok, thank you.

But what do I have to copy paste in Sierra Chart?

This doesn't work:

=IF(OR(ID1.SG1@3>ID1.SG1@4,AND(ID1.SG1@5>=ID1.SG1@4,ID1.SG1@3>ID1.SG1@4)),1,IF(OR(ID1.SG1@3<ID1.SG1@4,AND(ID1.SG1@5<=ID1.SG1@4,ID1.SG1@3<ID1.SG1@4)),-1,Z4))=AND(Z4-1,Z3=1)=AND(Z4=1,Z3=-1)
Date Time Of Last Edit: 2018-02-06 10:41:57
[2018-02-06 15:23:21]
Sawtooth - Posts: 3976
Add the Spreadsheet System/Alert study to your chart
-Give it a name in the Spreadsheet Name field
-Assign alerts to Column K and Column M
-You may want to set 'Signal Only On Bar Close (Columns K,M)' to Yes.
-On the Subgraphs tab, set the Draw Style of SG1 to your requirements
-Press OK and OK
-On the spreadsheet:
Put this in cell Z3:
=IF(OR(ID1.SG1@3>ID1.SG1@4,AND(ID1.SG1@5>=ID1.SG1@4,ID1.SG1@3>ID1.SG1@4)),1,IF(OR(ID1.SG1@3<ID1.SG1@4,AND(ID1.SG1@5<=ID1.SG1@4,ID1.SG1@3<ID1.SG1@4)),-1,Z4))
Put this in cell K3:
=AND(Z4=-1,Z3=1)
Put this in cell M3:
=AND(Z4=1,Z3=-1)
The formula in Z3 assumes your Kijun-Sen study is ID1. If it is a different ID#, edit all 12 of the ID1s to the correct ID#.

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

Login

Login Page - Create Account