Support Board
Date/Time: Fri, 07 Feb 2025 17:43:17 +0000
Post From: color bar based on above/below study
[2025-01-09 19:20:32] |
John - SC Support - Posts: 37827 |
We do not have enough information to give an absolute formula, and it is not something we do in complex situations like this, but in general here is what you need to think about: - To test if a subgraph has changed state (such as gone from negative to positive) you need to look at the value of the previous bar and then check if it is different from the current bar. An Alert formula if the previous bar was negative and the current bar is positive would be the following: =AND(ID1.SG[-1] < 0, ID1.SG1 > 0) To check either state (going from Negative to Positive and Positive to Negative would be the following: =OR(AND(ID1.SG1[-1] < 0, ID1.SG1 > 0), AND(ID1.SG1[-1] > 0, ID1.SG1 < 0)) As you can see, you can string ANDs and ORs together and have as many tests in each one as you need. For instance, you can then use the above with the following: =AND(ID2.SG1 > L, OR(AND(ID1.SG1[-1] < 0, ID1.SG1 > 0), AND(ID1.SG1[-1] > 0, ID1.SG1 < 0))) Where L is shorthand for the Last price. Refer to the following for information on Alerts: Study/Chart Alerts And Scanning For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |