Support Board
Date/Time: Sun, 19 Jan 2025 03:13:02 +0000
Alert TICK-NYSE CROSSOVER causing error, returns array of 3 integers
View Count: 1327
[2018-03-15 14:55:11] |
User796776 - Posts: 95 |
After upgrading from SC version 2713; the CROSSOVER function is now returning an array of 3 integers. Chart Alert: =OR(CROSSOVER(C,-800), CROSSOVER(C,-1200)) Alert Manager Log showing resolution with array of 3 integers. =OR(CROSSOVER({8,72,-382},-800), CROSSOVER({8,72,-382},-1200)) | No alert sound/email. This throws an error when triggered. Alert Formula Error - Chart: TICK-NYSE [M] 15 Min #10 | Error: #VALUE! | Formula: =OR(CROSSOVER(C,-800), CROSSOVER(C,-1200)) | No alert sound/email. |
[2018-03-15 18:42:30] |
Sierra Chart Engineering - Posts: 104368 |
We will look into this but we are not going to be able to resolve until Monday.
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-03-19 21:55:32] |
Jeffrey - Posts: 2197 |
Short answer: Change your chart alert formula to use the Not Equal operator like: =OR(CROSSOVER(C,-800) <> 0, CROSSOVER(C,-1200) <> 0)
Or use CROSSFROMABOVE and/or CROSSFROMBELOW instead of CROSSOVER, if either of those matches your intent. Long answer: This error is expected and explained in the documentation. See the documentation for #VALUE! in Spreadsheet Errors. The AND() and OR() functions require boolean (TRUE/FALSE) expressions. For example, this Simple Alert formula will give a #VALUE! error: =OR(SG1, SG2). This formula will not give an error: =OR(SG1 <> 0,SG2 <> 0).
See the documentation for the OR Function: Returns #VALUE! if one of the given parameters could not be interpreted as a boolean value.
See the documentation for the CROSSOVER Function: Returns a value which indicates the type of crossing:
1 = The first Range crosses the second Range from above. -1 = The first Range crosses the second Range from below. 0 = The ranges do not cross each other. So in the case where the CROSSOVER function returns a value of -1, the OR function will result in a #VALUE! error, because a value of -1 has no meaning as a boolean value. Boolean values must be either 1 (TRUE) or 0 (FALSE). If you use CROSSOVER(...) <> 0, the Not Equal operator (<>) will result in 1 (TRUE) if there is a crossover in either direction, and 0 (FALSE) if there is no crossover. If you use the CROSSFROMABOVE or CROSSFROMBELOW functions, these will directly return boolean values. |
[2018-03-19 22:29:56] |
User796776 - Posts: 95 |
Thank you. The CROSSFROMABOVE will work in my situation, I tested it successfully with replay. I do want to bring the section of documentation, which I used as an example, to your attention in case you want to add this information to it. As I mentioned before, the format documented in example 12 did work successfully through SC version 1713. Study/Chart Alerts And Scanning: Alert Formula Examples 12. Alert for TICK-NYSE chart when it crosses these levels: -600, -1200 and +600, +1200. =OR(CROSSOVER(C,-600), CROSSOVER(C,-1200), CROSSOVER(C,600), CROSSOVER(C,1200)). Enter this alert in Chart >> Chart Settings >> Alerts in the Alert Condition box. Date Time Of Last Edit: 2018-03-19 23:10:04
|
To post a message in this thread, you need to log in with your Sierra Chart account: