Support Board
Date/Time: Thu, 26 Jun 2025 13:11:23 +0000
Crossover For Multiple values - spreadsheet
View Count: 695
[2021-11-12 02:20:08] |
User337568 - Posts: 61 |
Hi: I am using this formula in a spreadsheet and I am not getting any hits. =OR ( CROSSOVER(AF3, -150), CROSSOVER(AF3, -350), CROSSOVER(AF3, -750), CROSSOVER(AF3, 150), CROSSOVER(AF3, 300), CROSSOVER(AF3, 750)) AF3 is a variable, but I am using constants for the crossovers. The output is "0." I can get hits with this formula =OR(AF3 > 150, AF3<- 150) However, I would like the CROSSOVER formula to work. |
[2021-11-12 04:16:31] |
Sawtooth - Posts: 4231 |
The spreadsheet syntax for the CROSSOVER function is different than it is for Simple Alerts. You must us a pair of ranges encompassing the current bar and a previous bar. https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#CROSSOVER_Function To get a second pair of ranges, use the Horizontal Lines study for the 6 values, and reference their ID#.SG#s |
[2021-11-12 14:43:11] |
User337568 - Posts: 61 |
tomgib: Thank you Here's my interpretation of what you suggested: 1. Added Horizontal Line Study 2. Added values and double-checked that I am "Spreadsheet input - checked." Result - CROSSOVER not working AF3 - Variable AG3 - 150 - Horizontal value - constant value AH3 - (150) AI3 - 300 AJ3 - (300) =OR( CROSSOVER(AF3, AG3), CROSSOVER(AF3, AH3), CROSSOVER(AF3, AI3), CROSSOVER(AF3, AJ3), CROSSOVER(AF3, AK3), CROSSOVER(AF3, AL3) ) Date Time Of Last Edit: 2021-11-12 14:44:03
|
[2021-11-12 15:26:04] |
Sawtooth - Posts: 4231 |
You must use ranges: =OR( CROSSOVER(AF3:AF4, AG3:AG4), CROSSOVER(AF3:AF4, AH3:AH4), CROSSOVER(AF3:AF4, AI3:AI4), CROSSOVER(AF3:AF4, AJ3:AJ4), CROSSOVER(AF3:AF4, AK3:AK4), CROSSOVER(AF3:AF4, AL3:AL4) ) |
To post a message in this thread, you need to log in with your Sierra Chart account: