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


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

adx segment Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
stockscience
Posted : Thursday, November 2, 2017 4:43:42 PM
Registered User
Joined: 6/26/2011
Posts: 128

Hi Bruce:

       Is it possible to write a pcf which gives the net price change since beginning of the

increase if adx(14,14) is increasing, and similarly, the net price change since beginning

of the decrease if adx(14,14) is decreasing.  (In other words, how much has the price

changed since adx last changed direction --- assume the segment begins on the

open of the price bar of the most recent adx directional change.)?

 

 

Bruce_L
Posted : Thursday, November 2, 2017 5:03:01 PM


Worden Trainer

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

The following checks the most recent 60 bars for a change in direction of the ADX.

C - IIF(SGN(ADX14.14 - ADX14.14.1) <> SGN(ADX14.14.1 - ADX14.14.2), O, IIF(SGN(ADX14.14.1 - ADX14.14.2) <> SGN(ADX14.14.2 - ADX14.14.3), O1, IIF(SGN(ADX14.14.2 - ADX14.14.3) <> SGN(ADX14.14.3 - ADX14.14.4), O2, IIF(SGN(ADX14.14.3 - ADX14.14.4) <> SGN(ADX14.14.4 - ADX14.14.5), O3, IIF(SGN(ADX14.14.4 - ADX14.14.5) <> SGN(ADX14.14.5 - ADX14.14.6), O4, IIF(SGN(ADX14.14.5 - ADX14.14.6) <> SGN(ADX14.14.6 - ADX14.14.7), O5, IIF(SGN(ADX14.14.6 - ADX14.14.7) <> SGN(ADX14.14.7 - ADX14.14.8), O6, IIF(SGN(ADX14.14.7 - ADX14.14.8) <> SGN(ADX14.14.8 - ADX14.14.9), O7, IIF(SGN(ADX14.14.8 - ADX14.14.9) <> SGN(ADX14.14.9 - ADX14.14.10), O8, IIF(SGN(ADX14.14.9 - ADX14.14.10) <> SGN(ADX14.14.10 - ADX14.14.11), O9, IIF(SGN(ADX14.14.10 - ADX14.14.11) <> SGN(ADX14.14.11 - ADX14.14.12), O10, IIF(SGN(ADX14.14.11 - ADX14.14.12) <> SGN(ADX14.14.12 - ADX14.14.13), O11, IIF(SGN(ADX14.14.12 - ADX14.14.13) <> SGN(ADX14.14.13 - ADX14.14.14), O12, IIF(SGN(ADX14.14.13 - ADX14.14.14) <> SGN(ADX14.14.14 - ADX14.14.15), O13, IIF(SGN(ADX14.14.14 - ADX14.14.15) <> SGN(ADX14.14.15 - ADX14.14.16), O14, IIF(SGN(ADX14.14.15 - ADX14.14.16) <> SGN(ADX14.14.16 - ADX14.14.17), O15, IIF(SGN(ADX14.14.16 - ADX14.14.17) <> SGN(ADX14.14.17 - ADX14.14.18), O16, IIF(SGN(ADX14.14.17 - ADX14.14.18) <> SGN(ADX14.14.18 - ADX14.14.19), O17, IIF(SGN(ADX14.14.18 - ADX14.14.19) <> SGN(ADX14.14.19 - ADX14.14.20), O18, IIF(SGN(ADX14.14.19 - ADX14.14.20) <> SGN(ADX14.14.20 - ADX14.14.21), O19, IIF(SGN(ADX14.14.20 - ADX14.14.21) <> SGN(ADX14.14.21 - ADX14.14.22), O20, IIF(SGN(ADX14.14.21 - ADX14.14.22) <> SGN(ADX14.14.22 - ADX14.14.23), O21, IIF(SGN(ADX14.14.22 - ADX14.14.23) <> SGN(ADX14.14.23 - ADX14.14.24), O22, IIF(SGN(ADX14.14.23 - ADX14.14.24) <> SGN(ADX14.14.24 - ADX14.14.25), O23, IIF(SGN(ADX14.14.24 - ADX14.14.25) <> SGN(ADX14.14.25 - ADX14.14.26), O24, IIF(SGN(ADX14.14.25 - ADX14.14.26) <> SGN(ADX14.14.26 - ADX14.14.27), O25, IIF(SGN(ADX14.14.26 - ADX14.14.27) <> SGN(ADX14.14.27 - ADX14.14.28), O26, IIF(SGN(ADX14.14.27 - ADX14.14.28) <> SGN(ADX14.14.28 - ADX14.14.29), O27, IIF(SGN(ADX14.14.28 - ADX14.14.29) <> SGN(ADX14.14.29 - ADX14.14.30), O28, IIF(SGN(ADX14.14.29 - ADX14.14.30) <> SGN(ADX14.14.30 - ADX14.14.31), O29, IIF(SGN(ADX14.14.30 - ADX14.14.31) <> SGN(ADX14.14.31 - ADX14.14.32), O30, IIF(SGN(ADX14.14.31 - ADX14.14.32) <> SGN(ADX14.14.32 - ADX14.14.33), O31, IIF(SGN(ADX14.14.32 - ADX14.14.33) <> SGN(ADX14.14.33 - ADX14.14.34), O32, IIF(SGN(ADX14.14.33 - ADX14.14.34) <> SGN(ADX14.14.34 - ADX14.14.35), O33, IIF(SGN(ADX14.14.34 - ADX14.14.35) <> SGN(ADX14.14.35 - ADX14.14.36), O34, IIF(SGN(ADX14.14.35 - ADX14.14.36) <> SGN(ADX14.14.36 - ADX14.14.37), O35, IIF(SGN(ADX14.14.36 - ADX14.14.37) <> SGN(ADX14.14.37 - ADX14.14.38), O36, IIF(SGN(ADX14.14.37 - ADX14.14.38) <> SGN(ADX14.14.38 - ADX14.14.39), O37, IIF(SGN(ADX14.14.38 - ADX14.14.39) <> SGN(ADX14.14.39 - ADX14.14.40), O38, IIF(SGN(ADX14.14.39 - ADX14.14.40) <> SGN(ADX14.14.40 - ADX14.14.41), O39, IIF(SGN(ADX14.14.40 - ADX14.14.41) <> SGN(ADX14.14.41 - ADX14.14.42), O40, IIF(SGN(ADX14.14.41 - ADX14.14.42) <> SGN(ADX14.14.42 - ADX14.14.43), O41, IIF(SGN(ADX14.14.42 - ADX14.14.43) <> SGN(ADX14.14.43 - ADX14.14.44), O42, IIF(SGN(ADX14.14.43 - ADX14.14.44) <> SGN(ADX14.14.44 - ADX14.14.45), O43, IIF(SGN(ADX14.14.44 - ADX14.14.45) <> SGN(ADX14.14.45 - ADX14.14.46), O44, IIF(SGN(ADX14.14.45 - ADX14.14.46) <> SGN(ADX14.14.46 - ADX14.14.47), O45, IIF(SGN(ADX14.14.46 - ADX14.14.47) <> SGN(ADX14.14.47 - ADX14.14.48), O46, IIF(SGN(ADX14.14.47 - ADX14.14.48) <> SGN(ADX14.14.48 - ADX14.14.49), O47, IIF(SGN(ADX14.14.48 - ADX14.14.49) <> SGN(ADX14.14.49 - ADX14.14.50), O48, IIF(SGN(ADX14.14.49 - ADX14.14.50) <> SGN(ADX14.14.50 - ADX14.14.51), O49, IIF(SGN(ADX14.14.50 - ADX14.14.51) <> SGN(ADX14.14.51 - ADX14.14.52), O50, IIF(SGN(ADX14.14.51 - ADX14.14.52) <> SGN(ADX14.14.52 - ADX14.14.53), O51, IIF(SGN(ADX14.14.52 - ADX14.14.53) <> SGN(ADX14.14.53 - ADX14.14.54), O52, IIF(SGN(ADX14.14.53 - ADX14.14.54) <> SGN(ADX14.14.54 - ADX14.14.55), O53, IIF(SGN(ADX14.14.54 - ADX14.14.55) <> SGN(ADX14.14.55 - ADX14.14.56), O54, IIF(SGN(ADX14.14.55 - ADX14.14.56) <> SGN(ADX14.14.56 - ADX14.14.57), O55, IIF(SGN(ADX14.14.56 - ADX14.14.57) <> SGN(ADX14.14.57 - ADX14.14.58), O56, IIF(SGN(ADX14.14.57 - ADX14.14.58) <> SGN(ADX14.14.58 - ADX14.14.59), O57, IIF(SGN(ADX14.14.58 - ADX14.14.59) <> SGN(ADX14.14.59 - ADX14.14.60), O58, IIF(SGN(ADX14.14.59 - ADX14.14.60) <> SGN(ADX14.14.60 - ADX14.14.61), O59, 1 / 0))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Thursday, November 2, 2017 7:09:55 PM
Registered User
Joined: 6/26/2011
Posts: 128

Perfect. Thanks!

diceman
Posted : Friday, November 3, 2017 1:04:11 PM
Registered User
Joined: 1/28/2005
Posts: 6,049

Bruce

 

Can you do a % version of this?

(Only with ADX increasing)

Most recent 30 bars.

 

 

 

Thanks

Bruce_L
Posted : Friday, November 3, 2017 1:28:59 PM


Worden Trainer

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

Maybe the following?

100 * (C / IIF(ADX14.14 > ADX14.14.1, IIF(SGN(ADX14.14 - ADX14.14.1) <> SGN(ADX14.14.1 - ADX14.14.2), O, IIF(SGN(ADX14.14.1 - ADX14.14.2) <> SGN(ADX14.14.2 - ADX14.14.3), O1, IIF(SGN(ADX14.14.2 - ADX14.14.3) <> SGN(ADX14.14.3 - ADX14.14.4), O2, IIF(SGN(ADX14.14.3 - ADX14.14.4) <> SGN(ADX14.14.4 - ADX14.14.5), O3, IIF(SGN(ADX14.14.4 - ADX14.14.5) <> SGN(ADX14.14.5 - ADX14.14.6), O4, IIF(SGN(ADX14.14.5 - ADX14.14.6) <> SGN(ADX14.14.6 - ADX14.14.7), O5, IIF(SGN(ADX14.14.6 - ADX14.14.7) <> SGN(ADX14.14.7 - ADX14.14.8), O6, IIF(SGN(ADX14.14.7 - ADX14.14.8) <> SGN(ADX14.14.8 - ADX14.14.9), O7, IIF(SGN(ADX14.14.8 - ADX14.14.9) <> SGN(ADX14.14.9 - ADX14.14.10), O8, IIF(SGN(ADX14.14.9 - ADX14.14.10) <> SGN(ADX14.14.10 - ADX14.14.11), O9, IIF(SGN(ADX14.14.10 - ADX14.14.11) <> SGN(ADX14.14.11 - ADX14.14.12), O10, IIF(SGN(ADX14.14.11 - ADX14.14.12) <> SGN(ADX14.14.12 - ADX14.14.13), O11, IIF(SGN(ADX14.14.12 - ADX14.14.13) <> SGN(ADX14.14.13 - ADX14.14.14), O12, IIF(SGN(ADX14.14.13 - ADX14.14.14) <> SGN(ADX14.14.14 - ADX14.14.15), O13, IIF(SGN(ADX14.14.14 - ADX14.14.15) <> SGN(ADX14.14.15 - ADX14.14.16), O14, IIF(SGN(ADX14.14.15 - ADX14.14.16) <> SGN(ADX14.14.16 - ADX14.14.17), O15, IIF(SGN(ADX14.14.16 - ADX14.14.17) <> SGN(ADX14.14.17 - ADX14.14.18), O16, IIF(SGN(ADX14.14.17 - ADX14.14.18) <> SGN(ADX14.14.18 - ADX14.14.19), O17, IIF(SGN(ADX14.14.18 - ADX14.14.19) <> SGN(ADX14.14.19 - ADX14.14.20), O18, IIF(SGN(ADX14.14.19 - ADX14.14.20) <> SGN(ADX14.14.20 - ADX14.14.21), O19, IIF(SGN(ADX14.14.20 - ADX14.14.21) <> SGN(ADX14.14.21 - ADX14.14.22), O20, IIF(SGN(ADX14.14.21 - ADX14.14.22) <> SGN(ADX14.14.22 - ADX14.14.23), O21, IIF(SGN(ADX14.14.22 - ADX14.14.23) <> SGN(ADX14.14.23 - ADX14.14.24), O22, IIF(SGN(ADX14.14.23 - ADX14.14.24) <> SGN(ADX14.14.24 - ADX14.14.25), O23, IIF(SGN(ADX14.14.24 - ADX14.14.25) <> SGN(ADX14.14.25 - ADX14.14.26), O24, IIF(SGN(ADX14.14.25 - ADX14.14.26) <> SGN(ADX14.14.26 - ADX14.14.27), O25, IIF(SGN(ADX14.14.26 - ADX14.14.27) <> SGN(ADX14.14.27 - ADX14.14.28), O26, IIF(SGN(ADX14.14.27 - ADX14.14.28) <> SGN(ADX14.14.28 - ADX14.14.29), O27, IIF(SGN(ADX14.14.28 - ADX14.14.29) <> SGN(ADX14.14.29 - ADX14.14.30), O28, IIF(SGN(ADX14.14.29 - ADX14.14.30) <> SGN(ADX14.14.30 - ADX14.14.31), O29, 1 / 0)))))))))))))))))))))))))))))), 1 / 0) - 1)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Wednesday, March 21, 2018 11:15:55 AM
Registered User
Joined: 6/26/2011
Posts: 128

Why is the value on he following sometimes delayed?

 

 

QUOTE (Bruce_L)

The following checks the most recent 60 bars for a change in direction of the ADX.

C - IIF(SGN(ADX14.14 - ADX14.14.1) <> SGN(ADX14.14.1 - ADX14.14.2), O, IIF(SGN(ADX14.14.1 - ADX14.14.2) <> SGN(ADX14.14.2 - ADX14.14.3), O1, IIF(SGN(ADX14.14.2 - ADX14.14.3) <> SGN(ADX14.14.3 - ADX14.14.4), O2, IIF(SGN(ADX14.14.3 - ADX14.14.4) <> SGN(ADX14.14.4 - ADX14.14.5), O3, IIF(SGN(ADX14.14.4 - ADX14.14.5) <> SGN(ADX14.14.5 - ADX14.14.6), O4, IIF(SGN(ADX14.14.5 - ADX14.14.6) <> SGN(ADX14.14.6 - ADX14.14.7), O5, IIF(SGN(ADX14.14.6 - ADX14.14.7) <> SGN(ADX14.14.7 - ADX14.14.8), O6, IIF(SGN(ADX14.14.7 - ADX14.14.8) <> SGN(ADX14.14.8 - ADX14.14.9), O7, IIF(SGN(ADX14.14.8 - ADX14.14.9) <> SGN(ADX14.14.9 - ADX14.14.10), O8, IIF(SGN(ADX14.14.9 - ADX14.14.10) <> SGN(ADX14.14.10 - ADX14.14.11), O9, IIF(SGN(ADX14.14.10 - ADX14.14.11) <> SGN(ADX14.14.11 - ADX14.14.12), O10, IIF(SGN(ADX14.14.11 - ADX14.14.12) <> SGN(ADX14.14.12 - ADX14.14.13), O11, IIF(SGN(ADX14.14.12 - ADX14.14.13) <> SGN(ADX14.14.13 - ADX14.14.14), O12, IIF(SGN(ADX14.14.13 - ADX14.14.14) <> SGN(ADX14.14.14 - ADX14.14.15), O13, IIF(SGN(ADX14.14.14 - ADX14.14.15) <> SGN(ADX14.14.15 - ADX14.14.16), O14, IIF(SGN(ADX14.14.15 - ADX14.14.16) <> SGN(ADX14.14.16 - ADX14.14.17), O15, IIF(SGN(ADX14.14.16 - ADX14.14.17) <> SGN(ADX14.14.17 - ADX14.14.18), O16, IIF(SGN(ADX14.14.17 - ADX14.14.18) <> SGN(ADX14.14.18 - ADX14.14.19), O17, IIF(SGN(ADX14.14.18 - ADX14.14.19) <> SGN(ADX14.14.19 - ADX14.14.20), O18, IIF(SGN(ADX14.14.19 - ADX14.14.20) <> SGN(ADX14.14.20 - ADX14.14.21), O19, IIF(SGN(ADX14.14.20 - ADX14.14.21) <> SGN(ADX14.14.21 - ADX14.14.22), O20, IIF(SGN(ADX14.14.21 - ADX14.14.22) <> SGN(ADX14.14.22 - ADX14.14.23), O21, IIF(SGN(ADX14.14.22 - ADX14.14.23) <> SGN(ADX14.14.23 - ADX14.14.24), O22, IIF(SGN(ADX14.14.23 - ADX14.14.24) <> SGN(ADX14.14.24 - ADX14.14.25), O23, IIF(SGN(ADX14.14.24 - ADX14.14.25) <> SGN(ADX14.14.25 - ADX14.14.26), O24, IIF(SGN(ADX14.14.25 - ADX14.14.26) <> SGN(ADX14.14.26 - ADX14.14.27), O25, IIF(SGN(ADX14.14.26 - ADX14.14.27) <> SGN(ADX14.14.27 - ADX14.14.28), O26, IIF(SGN(ADX14.14.27 - ADX14.14.28) <> SGN(ADX14.14.28 - ADX14.14.29), O27, IIF(SGN(ADX14.14.28 - ADX14.14.29) <> SGN(ADX14.14.29 - ADX14.14.30), O28, IIF(SGN(ADX14.14.29 - ADX14.14.30) <> SGN(ADX14.14.30 - ADX14.14.31), O29, IIF(SGN(ADX14.14.30 - ADX14.14.31) <> SGN(ADX14.14.31 - ADX14.14.32), O30, IIF(SGN(ADX14.14.31 - ADX14.14.32) <> SGN(ADX14.14.32 - ADX14.14.33), O31, IIF(SGN(ADX14.14.32 - ADX14.14.33) <> SGN(ADX14.14.33 - ADX14.14.34), O32, IIF(SGN(ADX14.14.33 - ADX14.14.34) <> SGN(ADX14.14.34 - ADX14.14.35), O33, IIF(SGN(ADX14.14.34 - ADX14.14.35) <> SGN(ADX14.14.35 - ADX14.14.36), O34, IIF(SGN(ADX14.14.35 - ADX14.14.36) <> SGN(ADX14.14.36 - ADX14.14.37), O35, IIF(SGN(ADX14.14.36 - ADX14.14.37) <> SGN(ADX14.14.37 - ADX14.14.38), O36, IIF(SGN(ADX14.14.37 - ADX14.14.38) <> SGN(ADX14.14.38 - ADX14.14.39), O37, IIF(SGN(ADX14.14.38 - ADX14.14.39) <> SGN(ADX14.14.39 - ADX14.14.40), O38, IIF(SGN(ADX14.14.39 - ADX14.14.40) <> SGN(ADX14.14.40 - ADX14.14.41), O39, IIF(SGN(ADX14.14.40 - ADX14.14.41) <> SGN(ADX14.14.41 - ADX14.14.42), O40, IIF(SGN(ADX14.14.41 - ADX14.14.42) <> SGN(ADX14.14.42 - ADX14.14.43), O41, IIF(SGN(ADX14.14.42 - ADX14.14.43) <> SGN(ADX14.14.43 - ADX14.14.44), O42, IIF(SGN(ADX14.14.43 - ADX14.14.44) <> SGN(ADX14.14.44 - ADX14.14.45), O43, IIF(SGN(ADX14.14.44 - ADX14.14.45) <> SGN(ADX14.14.45 - ADX14.14.46), O44, IIF(SGN(ADX14.14.45 - ADX14.14.46) <> SGN(ADX14.14.46 - ADX14.14.47), O45, IIF(SGN(ADX14.14.46 - ADX14.14.47) <> SGN(ADX14.14.47 - ADX14.14.48), O46, IIF(SGN(ADX14.14.47 - ADX14.14.48) <> SGN(ADX14.14.48 - ADX14.14.49), O47, IIF(SGN(ADX14.14.48 - ADX14.14.49) <> SGN(ADX14.14.49 - ADX14.14.50), O48, IIF(SGN(ADX14.14.49 - ADX14.14.50) <> SGN(ADX14.14.50 - ADX14.14.51), O49, IIF(SGN(ADX14.14.50 - ADX14.14.51) <> SGN(ADX14.14.51 - ADX14.14.52), O50, IIF(SGN(ADX14.14.51 - ADX14.14.52) <> SGN(ADX14.14.52 - ADX14.14.53), O51, IIF(SGN(ADX14.14.52 - ADX14.14.53) <> SGN(ADX14.14.53 - ADX14.14.54), O52, IIF(SGN(ADX14.14.53 - ADX14.14.54) <> SGN(ADX14.14.54 - ADX14.14.55), O53, IIF(SGN(ADX14.14.54 - ADX14.14.55) <> SGN(ADX14.14.55 - ADX14.14.56), O54, IIF(SGN(ADX14.14.55 - ADX14.14.56) <> SGN(ADX14.14.56 - ADX14.14.57), O55, IIF(SGN(ADX14.14.56 - ADX14.14.57) <> SGN(ADX14.14.57 - ADX14.14.58), O56, IIF(SGN(ADX14.14.57 - ADX14.14.58) <> SGN(ADX14.14.58 - ADX14.14.59), O57, IIF(SGN(ADX14.14.58 - ADX14.14.59) <> SGN(ADX14.14.59 - ADX14.14.60), O58, IIF(SGN(ADX14.14.59 - ADX14.14.60) <> SGN(ADX14.14.60 - ADX14.14.61), O59, 1 / 0))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

StockGuy
Posted : Wednesday, March 21, 2018 11:42:20 AM

Administration

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

If you're displaying this as a column, Edit the column and check the Refresh Rate. By default it will be Manual which means you need to click Refresh to get updated values.

stockscience
Posted : Wednesday, March 21, 2018 11:46:01 AM
Registered User
Joined: 6/26/2011
Posts: 128

I'm not sure I understand. This is a pcf on a chart.

Bruce_L
Posted : Wednesday, March 21, 2018 12:52:28 PM


Worden Trainer

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

It shouldn't be delayed on the chart. You may want to contact technical support.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Monday, April 9, 2018 10:09:31 AM
Registered User
Joined: 6/26/2011
Posts: 128

   I am interested in plotting the midpoint price between the price in which adx was highest in the last 200

periods and the price in which adx was lowest in the last 200 periods.

Bruce_L
Posted : Monday, April 9, 2018 12:58:35 PM


Worden Trainer

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

I do not know of any way to write a formula for that which is not too long and slow to be practical or post in the forums.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Monday, April 9, 2018 1:26:19 PM
Registered User
Joined: 6/26/2011
Posts: 128

QUOTE (Bruce_L)

I do not know of any way to write a formula for that which is not too long and slow to be practical or post in the forums.

Thanks.

stockscience
Posted : Monday, June 18, 2018 9:31:11 AM
Registered User
Joined: 6/26/2011
Posts: 128

HI Bruce:

       Is it possible to write a PCF that gives the last price at which ADX has crossed an

integer multiple of 10?

 

     

Bruce_L
Posted : Monday, June 18, 2018 12:19:36 PM


Worden Trainer

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

No, I can't really think of a practical way to do this.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Monday, June 18, 2018 1:32:39 PM
Registered User
Joined: 6/26/2011
Posts: 128

I see...

The best

I can get  is this:  b=

 iif(xup(adx14.14,10,1) or xdown(adx14.14,10,1) or 

           xup(adx14.14,20,1) or xdown(adx14.14,20,1) or xup(adx14.14,30,1) or xdown(adx14.14,30,1) or xup(adx14.14,40,1) or xdown(adx14.14,40,1) or xup(adx14.14,50,1) or xdown(adx14.14,50,1) or xup(adx14.14,60,1) or xdown(adx14.14,60,1) or xup(adx14.14,70,1) or xdown(adx14.14,70,1) , c, 0.0)
 
and then dividing by  countrue  (b,200) we can get an average.

 

 

QUOTE (Bruce_L)

No, I can't really think of a practical way to do this.

Bruce_L
Posted : Monday, June 18, 2018 2:07:01 PM


Worden Trainer

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

But you would need nested a bunch of IIF() statetments (one for each bar you wish to test) to get the value of C at the most recent cross (and the formula to test for the cross is long in and of itself).

Even if you stop there, it pretty much ends up too long and slow to be practical. But I would think you want to find the value of C at the cross and not the value of C and the end of the bar where the cross happens (and this formula way more complicated than just C and would need to be duplicated at each bar).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Monday, June 18, 2018 2:12:29 PM
Registered User
Joined: 6/26/2011
Posts: 128

Thank you.  I will settle on my rough average...

Bruce_L
Posted : Monday, June 18, 2018 2:25:15 PM


Worden Trainer

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

Please try the following:

SUM(IIF(ADX14.14 \ 10 <> ADX14.14.1 \ 10, C, 0), 200) / CountTrue(ADX14.14 \ 10 <> ADX14.14.1 \ 10, 200)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Monday, June 18, 2018 6:06:18 PM
Registered User
Joined: 6/26/2011
Posts: 128

Nice....   Thank you.

 

QUOTE (Bruce_L)

Please try the following:

SUM(IIF(ADX14.14 \ 10 <> ADX14.14.1 \ 10, C, 0), 200) / CountTrue(ADX14.14 \ 10 <> ADX14.14.1 \ 10, 200)

Nice....   Thank you.

Bruce_L
Posted : Tuesday, June 19, 2018 8:44:16 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
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.