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 |

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: 111

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

 ADX 14 < 25

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

Administration

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

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

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

Example http://forums.worden.com/default.aspx?g=posts&t=66511

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

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: 111

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: 63,442

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: 63,442

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: 63,442

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 Gold Customer

Joined: 4/30/2015
Posts: 190

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 Gold Customer

Joined: 4/30/2015
Posts: 190

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 Gold Customer

Joined: 4/30/2015
Posts: 190

How about this ADX is less that ADX of bar before

ADX14.14.0 < ADX14.14.1

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


Worden Trainer

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

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.

MAX(ADX14.14, 10)

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

MIN(ADX14.14.1, 15)

The following formula you created:

ADX14.14.0 < ADX14.14.1

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:

          Can you answer the above question  for adx(14,14) if we replace the exponential smoothing in adx

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: 63,442

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

          (2*adx14.1 +  13*adx14.14)/15   since we are using exponential smoothing

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: 63,442

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: 63,442

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: 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.