Registered User Joined: 2/8/2005 Posts: 16
|
I need help writing two PCFs. Both would use daily data. I need the syntax for:
1. Seven day ADX is greater than 45
2. ATR of the past 10 days is greater than 4%
Thank you.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
In TC2000 v12, you can't write a formula for ADX. You can click on the chart and select Create Scan Condition to create the desired condition however.
A condition formula for the 10 period ATR being greater than 4% of the 10 period average price can be written as follows for TC2000 v12.
(AVGH10 - AVGL10) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9)) / 20 > .04 * AVGC10
In TC2000 v17+, you can write a formula for ADX.
ADX(7, 7) > 45
And the ATR formula would be a lot shorter.
ATR10 > .04 * AVGC10
-Bruce Personal Criteria Formulas TC2000 Support Articles
|