New version 18 available now


Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Gap Tooth Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
0002ct
Posted : Tuesday, May 01, 2018 9:19:55 AM
Gold Customer Gold Customer

Joined: 11/19/2015
Posts: 417

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.

 

 

Bruce_L
Posted : Tuesday, May 01, 2018 9:29:16 AM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

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
0002ct
Posted : Tuesday, May 01, 2018 9:33:02 AM
Gold Customer Gold Customer

Joined: 11/19/2015
Posts: 417

Thank you, Bruce. As always, superb. Much appreciated.

 

0002ct
Posted : Thursday, May 10, 2018 3:25:38 PM
Gold Customer Gold Customer

Joined: 11/19/2015
Posts: 417

Bruce, would it be possible to be helped with coverting the four instances above to "either up or down"?

Thank you very much.

Bruce_L
Posted : Thursday, May 10, 2018 3:36:49 PM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

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
0002ct
Posted : Thursday, May 10, 2018 3:52:13 PM
Gold Customer Gold Customer

Joined: 11/19/2015
Posts: 417

Many thanks, Bruce. I always appreciate your expertise and problem solving. Thank you.

Bruce_L
Posted : Thursday, May 10, 2018 4:04:06 PM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.