Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 11:41:18 +0000



Post From: Alert color background condition SG 1 and SG 2 same color formula

[2019-03-03 03:04:17]
Xfanman1 - Posts: 320
Use the Color Background Based on Alert Condition Study. If you want a Long and Short version you'll need to add it twice and put your Long and Short alerts in seperate studies. Create your condition that's going to signal the color background change. In your case

=AND(ID1.SG1>ID1.SG1[-1],ID1.SG2>ID1.SG2[-1])

Not knowing what your SG1 and SG2 conditions are I'm assuming these would be some sort of Moving Average and you're looking for a positive slope in both. The alert above will tell you when the value of SG1 is greater than the value of SG1 in the previous bar indicating a positive trend. The same for SG2. The alert then says that both conditions must be true for your alert to work. Substitute your actual study ID in place of my ID1 above and that should work. If SG1 and SG2 are not moving averages then you may need a different formula.

--
Scott
Date Time Of Last Edit: 2019-03-03 03:05:27