Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 11/19/2015 Posts: 459
|
Hello.
I'm working with trends with smooth increases over time; the smoother the better. Large gaps up/down make a trend "unsmooth".
I am thinking over the many ways to define "smooth increase", but for now, it might work best to simply count the number of times a ticker has gapped up or down a certain percent over a certain lookback.
Please, what is the formula for:
Count the number of times the symbol has gapped up 5.5% or more over the last 100 bars"
Thank you very much for taking a look.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If the gap up is between the previous close and current open.
CountTrue(O >= 1.055 * C1, 100)
If the gap up is between the previous high and current open.
CountTrue(O >= 1.055 * H1, 100)
If the gap up is between the previous high and current low.
CountTrue(L >= 1.055 * H1, 100)
If the gap up is between the previous close and current close.
CountTrue(C >= 1.055 * C1, 100)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
Thank you, Bruce. As always, superb. Much appreciated.
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
Bruce, would it be possible to be helped with coverting the four instances above to "either up or down"?
Thank you very much.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If the gap up is between the previous close and current open.
CountTrue(ABS(O / C1 - 1) >= .055, 100)
If the gap up is between the previous high or low and current open.
CountTrue(O >= 1.055 * H1 OR O <= .945 * L1, 100)
If the gap up is between the previous high and current low or previous low and current high.
CountTrue(L >= 1.055 * H1 OR H <= .945 * L1, 100)
If the gap up is between the previous close and current close.
CountTrue(ABS(C / C1 - 1) >= .055 100)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
Many thanks, Bruce. I always appreciate your expertise and problem solving. Thank you.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |