Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.

 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

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.

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

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

Joined: 11/19/2015
Posts: 459

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

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

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.

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

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

Joined: 11/19/2015
Posts: 459

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: 65,138

You're welcome.

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

 Forum Jump Customer Training & Support - Ask a Trainer - TC2000 version 12/18 - Ask a Trainer - TC2000 version 7 - Ask a Trainer - StockFinder 5.0 - PCFs, EasyScan and Custom Indicators General Discussions - Stock and Market Talk - TC2000 version 12 or 18 - TC2000 version 7 - StockFinder 5.0 - RealCode for StockFinder 5.0 Tutorial Videos - TC2000 version 12 tutorial videos - TC2000 version 7 tutorial videos 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.