Login Page - Create Account

Support Board


Date/Time: Fri, 07 Feb 2025 14:52:38 +0000



Post From: Problems with CROSSFROMABOVE/BELOW

[2021-10-26 13:24:30]
Sawtooth - Posts: 4173
The CROSSFROMBELOW/CROSSFROMABOVE/CROSSOVER functions always compare the current bar to the previous bar(s).
https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#CROSSFROMABOVE_Function

OK so that works for the top conditions, but now the simpler ones that worked before, don't.
The Close never crosses the SG2 of the High/Low for Time Period Extended study because SG2 is always adjusting to the latest Low value.
So I don't know how the simpler ones ever worked either.
So it's superfluous to include a crossover of SG2 by the Close.

If you want an alert on a condition (that isn't compared to the previous bar) when the Close is inside an envelope band of SG2. try this:

=AND(
C<SG2 + ((SG1-SG2) * 0.10),
C>SG2 - ((SG1-SG2) * 0.10))

To alert, and also view where this occurs, use the Color Bar Based On Alert Condition study, and include the ID# of the High/Low for Time Period Extended study:
=AND(
C<ID1.SG2 + ((ID1.SG1-ID1.SG2) * 0.10),
C>ID1.SG2 - ((ID1.SG1-ID1.SG2) * 0.10))
where the High/Low for Time Period Extended study is ID1.