Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 13:46:19 +0000



[Programming Help] - Formula Help

View Count: 315

[2023-04-24 08:42:46]
User135370 - Posts: 162
I am using the "Period OHLC Variable Period"study to chart the weekly high and low , I want an audible alert for a cross of the high and low.

=CROSSOVER(SG2,C)
=CROSSOVER(SG3,C)

This is them individually, how do I make them an OR formula?

i.e

When Close (c) crosses SG2 (High) or SG3 (Low)

Help can't figure it out
[2023-04-24 13:20:40]
Sawtooth - Posts: 4120
Try this:
=OR(CROSSOVER(C,SG2),CROSSOVER(C,SG3))
[2023-04-24 13:55:05]
User135370 - Posts: 162
Thank you that is awesome, worked like a charm. If I wanted it equal to rather than crossover do you know how I can do that?

I.e the last price is equal
To the high or low

Many thanks for your time
[2023-04-24 16:34:25]
John - SC Support - Posts: 36350
You would have to add another option to test the equal to option. Such as the following:
=OR(CROSSOVER(C,SG2),CROSSOVER(C,SG3), C = SG2, C = SG3)
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-04-25 21:26:32]
User135370 - Posts: 162
Thank you both, worked.

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

Login

Login Page - Create Account