Login Page - Create Account

Support Board


Date/Time: Sat, 27 Apr 2024 03:51:08 +0000



[Programming Help] - Two or more simoltanous alerts for the same Study

View Count: 572

[2021-01-07 13:39:51]
User942196 - Posts: 40
Dear friends

I am using alerts for bolinger crosses -
i lerned i should write for the upper band
=CROSSOVER(SG1, C) - in the alert box

for the middle it is SG2 and For the lower SG3

But, How do I have All 3 at the same time as alerts? how do i write simoltanous alerts for all 3 crosses?

same goes for my CCI study-

I learned i should write -
=SG1>200

But if i want it to alert on more conditions?
<-200, >100 etc...

How do i Write Multipal alerts for my SG1 CCI?

Thanks

Mike
[2021-01-07 15:44:54]
John - SC Support - Posts: 31159
You need to combine alerts using the AND and OR functions. Refer to the information here:
Study/Chart Alerts And Scanning: OR and AND Functions
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-01-08 08:32:51]
User942196 - Posts: 40
I tried reading the information but it does not help. I dont know what i am doing wrong

For The Bollinger band I Wrote -

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

And it doesn't work

For the CCI i Wrote

=AND(SG3 > 100, SG3< -100)

And it doesn't work

I dont know what i am doing wrong.

Any Ideas?
[2021-01-08 12:24:21]
bradh - Posts: 854
This is incorrect syntax:

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

Try this:

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

However, this is unlikely to occur, as all 3 Subgraphs would have to cross over the close on the same bar, which for Bollinger Bands would not make sense. I think you want any one of them to trigger the alert:

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

Note this would be the same as adding 3 alerts, one for each subgraph, but is more efficient.


For CCI:
=AND(SG3 > 100, SG3< -100)

SG3 cannot be Greater than 100 and less than -100 at the same time, which is what the AND function requires to be true. Again, you need the OR function:

=OR(SG3 > 100, SG3< -100)

[2021-02-04 14:42:34]
User942196 - Posts: 40
Dear Friends u dont know why it does not work

on some charts i put for bollinger band

=CROSSOVER(SG2, C) (for exapmple)

and it simply does not correspond to the band it is supposed.

sometime SG1, and SG2 activate the same band

i find no method to the madness

i try it on range bar charts

please
i dont know what i do wrong

M
[2021-02-04 14:49:35]
User942196 - Posts: 40
On regular charts (not range) it seems to work fine
but i havnt tested it really

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

Login

Login Page - Create Account