Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

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

 ADX Boolean Formula Rate this Topic:
 Previous Topic · Next Topic Watch this topic · Print this topic ·
Gary3302
 Posted : Sunday, March 26, 2017 11:26:05 AM
Registered User
Joined: 1/5/2008
Posts: 117

I want to add a condition to the end of a boolean formula for the following condition

I would appreciate it if you would help me with the PCF.  I tried "and ADX (14) < 25" but it is not working.

StockGuy
 Posted : Sunday, March 26, 2017 11:51:46 AM

Joined: 9/30/2004
Posts: 9,187

In version 17, the proper formula is ADX(14,14) < 25

You have to set the smoothing period 14 and the DI period 14.

Gary3302
 Posted : Sunday, March 26, 2017 3:19:47 PM
Registered User
Joined: 1/5/2008
Posts: 117

Perfect.  Thanks very much.  One more question please.  The scroll bar in the bottom right hand corner of the chart screen seems much more narrow in 17 as opposed to 12.4.  Is there a way to increase the width of the bar?

Thanks

Gary3302
 Posted : Sunday, March 26, 2017 5:13:47 PM
Registered User
Joined: 1/5/2008
Posts: 117

I figured out how to adjust the scroll bar from another post.  No need to reply again.  Thanks

Bruce_L
 Posted : Monday, March 27, 2017 9:35:39 AM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I am happy to read you were able to figure it out on your own.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
 Posted : Wednesday, March 29, 2017 11:10:33 AM
Registered User
Joined: 6/26/2011
Posts: 128

Is there a way to determine if ADX formula (say 14,14) will be decreasing at the open of the next bar?

Bruce_L
 Posted : Wednesday, March 29, 2017 11:14:33 AM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138

No, there is no way to tell what what the ADX is going to do before it does it.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
 Posted : Wednesday, March 29, 2017 11:20:38 AM
Registered User
Joined: 6/26/2011
Posts: 128

I meant to add: "assuming AS IF the current bar has closed ( and the new open is at the current price)".

Bruce_L
 Posted : Wednesday, March 29, 2017 11:30:08 AM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138

No, I can't calculate that either.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
 Posted : Wednesday, March 29, 2017 11:39:33 AM
Registered User
Joined: 6/26/2011
Posts: 128

Thank you.

Aces4Me
 Posted : Saturday, September 16, 2017 1:30:48 AM
Gold Customer

Joined: 4/30/2015
Posts: 197

is their a way to calculate the lower bar level and the upper bar level as 2 lines (like a bollinger band top and bottom)

Aces4Me
 Posted : Saturday, September 16, 2017 1:45:48 AM
Gold Customer

Joined: 4/30/2015
Posts: 197

can you not say ADX (14 , 14) is less than ADX ( 14.1,14.1)

or the equivlent of that

Aces4Me
 Posted : Saturday, September 16, 2017 1:54:11 AM
Gold Customer

Joined: 4/30/2015
Posts: 197

Bruce_L
 Posted : Saturday, September 16, 2017 5:13:19 AM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138

QUOTE (Aces4Me)
is their a way to calculate the lower bar level and the upper bar level as 2 lines (like a bollinger band top and bottom)

I am not quite sure what you mean by this. Assuming it is something like calculating what the highest and lowest ADX where throughout the trading day and plotting these values, then no, it is not possible.

But if you want to plot the highest and lowest ADX closing values over time, you could add Donchian Channels to the ADX indicator. Or use something like the following to plot the highest ADX over the most recent 10 bars bars.

Or something like the following to plot the lowest ADX over the 15 bars ending during the previous bar.

The following formula you created:

Should work for checking if the current 14 period ADX is lower than the previous 14 period ADX.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
 Posted : Thursday, February 01, 2018 3:52:44 PM
Registered User
Joined: 6/26/2011
Posts: 128

QUOTE (Bruce_L)

No, there is no way to tell what what the ADX is going to do before it does it.

Hi Bruce:

with frontweighted averages (which have (finite) 14 or 15 terms)?

Bruce_L
 Posted : Thursday, February 01, 2018 4:20:08 PM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138

OK, I have re-thought my previous answer.

Theoretically the formula is probably more straightforward with the front weighted moving average than with the regular ADX. But because we have components calculated for us, it is actually easier to write a formula to check what the value of the regular ADX would be tomorrow's open if price doesn't change at all between now and then.

Keep in mind that the contribution of the next bar will be 0 to both +DI and -DI if the next bar has zero range and opens at the close of the current bar. ATR will also have a TR of 0 for the next bar in these circumstances.

So we know that +DI and -DI will be both unchanged if price does not change at all between the current price and tomorrow's open.

This means that the 14-period ADX at the open would be the following if price doesn't change at all before the open.

`(ADX14.1 + 13 * ADX14.14) / 14`

This means ADX would go up if and only if:

`ADX14.1 > ADX14.14`

And go down if and only if:

`ADX14.1 < ADX14.14`

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
 Posted : Thursday, February 01, 2018 6:17:48 PM
Registered User
Joined: 6/26/2011
Posts: 128

Gracias!!

stockscience
 Posted : Tuesday, April 17, 2018 6:53:54 PM
Registered User
Joined: 6/26/2011
Posts: 128

Hi Bruce:

1.   I am wondering why the formula below is not

wouldn't  the  weight would be 2/(.14+1)?

2.    If we don't worry about the data/weights  more than 14 or 15 periods back   (to make  the calculation finite) - can we compute what the price c0 would be where  adx14.1=adx14.14    (assume the price c0 is  less than or equal to c1 if necessary).

QUOTE (Bruce_L)

OK, I have re-thought my previous answer.

`(ADX14.1 + 13 * ADX14.14) / 14`

Bruce_L
 Posted : Wednesday, April 18, 2018 9:42:52 AM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The ADX indicator uses Wilder's smoothing. While it is a type of exponential smoothing the weight is different.

Normal exponential smoothing uses:

XAVG(x, p) = (2 * x + (p - 1) * XAVG(x1, p)) / (p + 1)

But Wilder's smoothing uses (note that Wilder's smoothing is not actually built into the PCF language).

Wilder(x, p) = (x + (p - 1) * Wilder(x1, p)) / p

Also note that if you double the Wilder's period and subtract one, you get the period which can be used in an exponential moving average to duplicate the Wilder's smoothing.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
 Posted : Wednesday, April 18, 2018 10:17:06 AM
Registered User
Joined: 6/26/2011
Posts: 128

I see....   Is it possible to solve for C0, where adx14.1=adx14.14  ?

Bruce_L
 Posted : Wednesday, April 18, 2018 10:32:12 AM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138

No, I do not know of a practical method of doing so using the Personal Criteria Formula Language.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
 Posted : Wednesday, April 18, 2018 10:36:55 AM
Registered User
Joined: 6/26/2011
Posts: 128

Thank you.

Bruce_L
 Posted : Wednesday, April 18, 2018 10:37:23 AM

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.