Login Page - Create Account

Support Board


Date/Time: Thu, 09 May 2024 13:01:38 +0000



[Programming Help] - Two Candle subgraph reference for Color Background based on Alert Condition question

View Count: 1214

[2018-03-08 14:25:27]
User809700 - Posts: 14
Hello,

I understand that help is not provided for formulas related to the Color Background Based on Alert condition, but perhaps someone in the community can throw me a hint. Thanks in advance.

In a nutshell, i want an alert condition based on two candles. The first candle should check for id2.sg2>1, and the second(or current candle) should check for id3.sg.3>1. I am currently getting a syntax error which i believe is due to how i am referencing the previous candle. My formula is as follows:

=AND(id3.sg3>1, id2.sg2>1[-1])

I have also tried the reverse:

=AND(id2.sg2>1[-1], id3.sg3>1)

Maybe you cannot reference a study subgraph for previous candles and must therefore use a spreadsheet alert study, if so, i would appreciate the hint.

Thanks,
:-)
[2018-03-08 14:57:23]
infpz - Posts: 826
=AND(id3.sg3>1, id2.sg2[-1]>1)

Your [-1] on the second part of your 1st example is the wrong place I believe.
[2018-03-08 17:50:49]
User809700 - Posts: 14
Yep, that works . . . i really appreciate your response. Thanks you.

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

Login

Login Page - Create Account