Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 23:30:35 +0000



Post From: [User Discussion] help to highlight candle based on certain study conditions

[2021-08-20 13:43:53]
Sawtooth - Posts: 4000
now I just need to combine them so that it will only alert me on the -100 crosses ONLY IF it has been in an extreme condition (under -200)
For this, you'll need to create a persistent TRUE when the CCI is <-200, and release it when it goes >-100, then find the bar where this occurs. Try this:

1. Add the Spreadsheet Formula study, and Hide this study.
Use a formula like this in its Formula field:
=IF(ID5.SG1>-100,0,IF(ID5.SG1<-200,1,ID6.SG1[-1]))
where ID5 is the CCI study, and ID6 is the Spreadsheet Formula study.
This creates a persistent 1 when the CCI goes <-200, and releases it to 0 when the CCI goes >-100.

2. Add the Color Bar Based On Alert Condition study.
Use a formula like this on its Alerts tab:
=AND(ID6.SG1[-1]=1,ID6.SG1=0)
where ID6 is the Spreadsheet Formula study.
This finds the bar where the persistent 1 was released.