Login Page - Create Account

Support Board


Date/Time: Wed, 08 May 2024 18:01:51 +0000



do not trigger when c between 2 levels

View Count: 63

[2024-04-15 14:36:33]
Bedhog - Posts: 168
Hello. I'm having trouble getting this to work...

I don't want this alert to trigger if the current price is between id122.sg1 and id123.sg1.

What is the best syntax to use for this?

=and(
!c<id122.sg1,
!c>id123.sg1,
other stuff here,
)

Thank you.
[2024-04-15 17:26:59]
John - SC Support - Posts: 31466
But, to do what you are wanting you would need the following (not knowing anything about these subgraphs):
=OR(AND(C > ID22.SG1, C < ID23.SG1), AND(C < ID22.SG1, C > ID23.SG1))
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2024-04-16 14:13:08
[2024-04-15 21:10:53]
Bedhog - Posts: 168
Thanks John.

I was able to solve the problem after reviewing the example by
creating a "trigger" that evaluates true when the close is between those 2 levels.

id129.sg1 = true
=and(c<id122.sg1,c>id123.sg1)

Then I was able to use the "!" in the original calculation.
=and(
!id129.sg1,
other stuff here,
)

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

Login

Login Page - Create Account