Support Board
Date/Time: Fri, 22 Nov 2024 08:14:06 +0000
Alert on Heiken Ashi Smoothed
View Count: 6015
[2013-04-24 12:17:33] |
User23815 - Posts: 210 |
New user. I would like to put an alert on the Heiken Ashi Smoothed study that triggers when the bar changes color on close. It seems like it should be pretty simple but I couldn't figure it out from the Examples. Help please. Thanks
|
[2013-04-25 00:31:41] |
Sawtooth - Posts: 4118 |
Try this: =OR(AND(SG4>SG1,SG1[-1]>SG4[-1]),AND(SG4<SG1,SG1[-1]<SG4[-1])) |
[2013-04-25 03:24:27] |
Sierra Chart Engineering - Posts: 104368 |
Please see: http://www.sierrachart.com/index.php?l=doc/doc_AlertCondAndScan.html 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 |
[2013-04-26 16:07:02] |
User23815 - Posts: 210 |
To reply tomgilb. Thanks that works. Here is what I have: =OR(AND(SG4>SG1,SG1[-1]>SG4[-1]),AND(SG4<SG1,SG1[-1]<SG4[-1])) What might cause it to stop working? On the JPY currency future it will stop working after triggering a few times. I had the Reset Alert Trigger on New Bar unchecked, and the other two boxes checked on the EUR, GBP, AUD, and JPY. Only the JPY stopped firing. Now I have changed and checked the box on JPY. Still not working. I also tried Delete and Reload Data, no difference. The only difference in the JPY to the others is a price reading in 6 decimals (0.000000) versus 4 in the others. According to the way you have the alert built, it doesn't seem that should matter. Any advice? Thanks |
[2013-04-26 16:39:22] |
Sawtooth - Posts: 4118 |
It seems to work for me on the USDJPY. To check if the formula is valid, add the Color Bar Based On Alert Condition study, and put this on its Alerts tab, which includes the ID# of the HA Smoothed, in this example it is ID1: =OR(AND(ID1.SG4>ID1.SG1,ID1.SG1[-1]>ID1.SG4[-1]),AND(ID1.SG4<ID1.SG1,ID1.SG1[-1]<ID1.SG4[-1])) This will color the price bars to verify the formula is going to trigger when expected. |
[2013-04-26 16:46:30] |
User23815 - Posts: 210 |
I'll try that. Also tomgilb. If I wanted a spreadsheet code written for auto trading are you able to do that? It is a fairly simple code with only a few rules. I realize there would be a charge for that. Thanks
|
[2013-04-26 21:58:44] |
Sawtooth - Posts: 4118 |
I'll try that. Also tomgilb. If I wanted a spreadsheet code written for auto trading are you able to do that? It is a fairly simple code with only a few rules. I realize there would be a charge for that. Thanks
Go to www.sawtoothtrade.com |
[2013-05-01 23:02:10] |
User23815 - Posts: 210 |
To tomgilb. The color bar formula you gave in reply above. Is it instead of the prior script or in addition to? Also I sent an inquiry to sawtoothtrade but have not heard back. Thanks |
[2013-05-01 23:22:29] |
Sawtooth - Posts: 4118 |
This will generate alerts when placed in the HA study: =OR(AND(SG4>SG1,SG1[-1]>SG4[-1]),AND(SG4<SG1,SG1[-1]<SG4[-1])) This will color the price bars, as a visual test of the alert formula, by including the ID# of the HA study (assumed to be ID1), when placed in the color bar study: =OR(AND(ID1.SG4>ID1.SG1,ID1.SG1[-1]>ID1.SG4[-1]),AND(ID1.SG4<ID1.SG1,ID1.SG1[-1]<ID1.SG4[-1])) The latter was only meant to be a visual way to confirm the formula. I did respond yesterday to your email. I will resend it. |
[2013-05-02 00:26:08] |
User23815 - Posts: 210 |
to tomgilb. Got the resend and returned it. Thanks. I am still having issues only with the JPY. In reviewing which bars color and which don't(which corresponds with which don't send the alert on the Smoothed HA study) it appears to be related to when one or both of the conditions are "equal to" = rather than < or >. I don't know why it only affects the JPY, that is why I thought it might be related to the price structure, which is 6 places to the right of the decimal, instead of 4 like the others. I don't know if the Smoothed HA study requires anything different than the HA standard study but if it did, I would think it would affect all the symbols, not just the JPY. |
[2013-05-02 01:12:51] |
Sawtooth - Posts: 4118 |
I'm using the SC Forex Data (FXCM) feed, since I don't have a forex account. That feed be default is only 3 decimal places, and it alerts everywhere it should. The formula is simplistic in that it is only looking for a down bar followed by an up bar, or vice versa. With 6 decimal places, it seems unlikely that there would ever be doji. You could try it with "=" signs: =OR(AND(ID1.SG4>=ID1.SG1,ID1.SG1[-1]>=ID1.SG4[-1]),AND(ID1.SG4<=ID1.SG1,ID1.SG1[-1]<=ID1.SG4[-1])) If you want to confirm that there are equal values, go to Window >> Tool Values Window and put a check by it. Then put the crosshair on the bar that doesn't alert and look at the HA open/close values. |
[2013-05-02 16:56:01] |
User23815 - Posts: 210 |
tomgilb, I fixed this issue. IB has a price multiplier as does SC. Once I set both to 100 all is working as it should. Thanks for the help
|
To post a message in this thread, you need to log in with your Sierra Chart account: