Registered User Joined: 5/28/2014 Posts: 26
|
Hi. I want to make a formula something like this. C(SinceTrue(c>avgc10)).
I get error when I run this. How can do this in a different way? Thanks in advance.
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
That's not a valid formula. I see you're trying to find the price of the bar when the condition was last true, but that's not possible.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The only way to do this currently is to check each bar using something like nested IIF() functions.
IIF(C > AVGC10, C, IIF(C1 > AVGC10.1, C1, IIF(C2 > AVGC10.2, C2, 1 / 0)))
That only checks for 3 bars, but you could extend it to as many bars as you want (limited by the data available in the time frame in which it is being used).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 5/28/2014 Posts: 26
|
Thanks Bruce! Cool answer!
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|