Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 01:42:11 +0000



Swing High/Low alert issue

View Count: 1043

[2017-03-31 15:46:48]
User32668 - Posts: 5
The swing high/low alert code is given on http://www.sierrachart.com/index.php?page=doc/StudyChartAlertsAndScanning.php#FormulaExamples item 27 as:

=OR(SG1 > 0, SG2 > 0, SG0[-1] > 0, SG1[-1] > 0, SG0[-2] > 0, SG1[-2] > 0, SG0[-3] > 0, SG1[-3] > 0)

It says this should alert for all swing highs and lows as printed for a length of 2. However unfortunately the code above only alerts for swing highs. I rewrote it as below:

=OR(SG1 > 0, SG2 > 0, SG1[-1] > 0, SG2[-1] > 0, SG1[-2] > 0, SG2[-2] > 0, SG1[-3] > 0, SG2[-3] > 0)

This mostly works but probably misses about 25% of swing lows on backtesting - it never misses a swing high - can someone please assist where I might be going wrong?

Thanks.
[2017-03-31 18:31:02]
Sierra Chart Engineering - Posts: 104368
You are correct about the formula corrections that needed to be made.

The posted formula was incorrect.


How are you performing the back test?
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-03-31 18:56:24]
User32668 - Posts: 5
Thanks for your reply - just using the market replay. Sometimes it will print a swing low on the indicator without reporting it in the alert manager. It's pretty rare, but does seem to happen now and then.

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

Login

Login Page - Create Account