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 |

Linear Regression 30 Period, 30 Width Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
darrellfung
Posted : Friday, August 4, 2006 7:38:49 PM
Registered User
Joined: 3/27/2005
Posts: 10
Hello Trainers:

Please help me....I use Linear Regression 30Period/30 width to help me determine overbought and oversold:

Can you help me write six pcfs:

1. Stocks closing above the Linear Regression 30/30 line for a single daily close.
2. Stocks closing above the Linear Regression 30/30 line for two consecutive daily closes.
3 Stocks closing above the Linear Regression 30/30 line for three onsecutive daily closes.

4. Stocks closing below the Linear Regression 30/30 line for a single daily close.
5. Stocks closing below the Linear Regression 30/30 line for two consecutive daily closes.
6. Stocks closing below the Linear Regression 30/30 line for three onsecutive daily closes.
Bruce_L
Posted : Saturday, August 5, 2006 6:32:46 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (darrellfung)
Stocks closing above the Linear Regression 30/30 line for a single daily close.

C > AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 + 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600

QUOTE (darrellfung)
Stocks closing above the Linear Regression 30/30 line for two consecutive daily closes.

C > AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 + 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600 AND C1 > AVGC30.1 + 14.5 * (14.5 * C1 + 13.5 * C2 + 12.5 * C3 + 11.5 * C4 + 10.5 * C5 + 9.5 * C6 + 8.5 * C7 + 7.5 * C8 + 6.5 * C9 + 5.5 * C10 + 4.5 * C11 + 3.5 * C12 + 2.5 * C13 + 1.5 * C14 + .5 * C15 - .5 * C16 - 1.5 * C17 - 2.5 * C18 - 3.5 * C19 - 4.5 * C20 - 5.5 * C21 - 6.5 * C22 - 7.5 * C23 - 8.5 * C24 - 9.5 * C25 - 10.5 * C26 - 11.5 * C27 - 12.5 * C28 - 13.5 * C29 - 14.5 * C30) / 2247.5 + 30 * (ABS(C29 - AVGC2.29) + ABS(C28 - AVGC3.28) + ABS(C27 - AVGC4.27) + ABS(C26 - AVGC5.26) + ABS(C25 - AVGC6.25) + ABS(C24 - AVGC7.24) + ABS(C23 - AVGC8.23) + ABS(C22 - AVGC9.22) + ABS(C21 - AVGC10.21) + ABS(C20 - AVGC11.20) + ABS(C19 - AVGC12.19) + ABS(C18 - AVGC13.18) + ABS(C17 - AVGC14.17) + ABS(C16 - AVGC15.16) + ABS(C15 - AVGC16.15) + ABS(C14 - AVGC17.14) + ABS(C13 - AVGC18.13) + ABS(C12 - AVGC19.12) + ABS(C11 - AVGC20.11) + ABS(C10 - AVGC21.10) + ABS(C9 - AVGC22.9) + ABS(C8 - AVGC23.8) + ABS(C7 - AVGC24.7) + ABS(C6 - AVGC25.6) + ABS(C5 - AVGC26.5) + ABS(C4 - AVGC27.4) + ABS(C3 - AVGC28.3) + ABS(C2 - AVGC29.2) + ABS(C1 - AVGC30.1)) / 600

QUOTE (darrellfung)
Stocks closing above the Linear Regression 30/30 line for three onsecutive daily closes.

C > AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 + 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600 AND C1 > AVGC30.1 + 14.5 * (14.5 * C1 + 13.5 * C2 + 12.5 * C3 + 11.5 * C4 + 10.5 * C5 + 9.5 * C6 + 8.5 * C7 + 7.5 * C8 + 6.5 * C9 + 5.5 * C10 + 4.5 * C11 + 3.5 * C12 + 2.5 * C13 + 1.5 * C14 + .5 * C15 - .5 * C16 - 1.5 * C17 - 2.5 * C18 - 3.5 * C19 - 4.5 * C20 - 5.5 * C21 - 6.5 * C22 - 7.5 * C23 - 8.5 * C24 - 9.5 * C25 - 10.5 * C26 - 11.5 * C27 - 12.5 * C28 - 13.5 * C29 - 14.5 * C30) / 2247.5 + 30 * (ABS(C29 - AVGC2.29) + ABS(C28 - AVGC3.28) + ABS(C27 - AVGC4.27) + ABS(C26 - AVGC5.26) + ABS(C25 - AVGC6.25) + ABS(C24 - AVGC7.24) + ABS(C23 - AVGC8.23) + ABS(C22 - AVGC9.22) + ABS(C21 - AVGC10.21) + ABS(C20 - AVGC11.20) + ABS(C19 - AVGC12.19) + ABS(C18 - AVGC13.18) + ABS(C17 - AVGC14.17) + ABS(C16 - AVGC15.16) + ABS(C15 - AVGC16.15) + ABS(C14 - AVGC17.14) + ABS(C13 - AVGC18.13) + ABS(C12 - AVGC19.12) + ABS(C11 - AVGC20.11) + ABS(C10 - AVGC21.10) + ABS(C9 - AVGC22.9) + ABS(C8 - AVGC23.8) + ABS(C7 - AVGC24.7) + ABS(C6 - AVGC25.6) + ABS(C5 - AVGC26.5) + ABS(C4 - AVGC27.4) + ABS(C3 - AVGC28.3) + ABS(C2 - AVGC29.2) + ABS(C1 - AVGC30.1)) / 600 AND C2 > AVGC30.2 + 14.5 * (14.5 * C2 + 13.5 * C3 + 12.5 * C4 + 11.5 * C5 + 10.5 * C6 + 9.5 * C7 + 8.5 * C8 + 7.5 * C9 + 6.5 * C10 + 5.5 * C11 + 4.5 * C12 + 3.5 * C13 + 2.5 * C14 + 1.5 * C15 + .5 * C16 - .5 * C17 - 1.5 * C18 - 2.5 * C19 - 3.5 * C20 - 4.5 * C21 - 5.5 * C22 - 6.5 * C23 - 7.5 * C24 - 8.5 * C25 - 9.5 * C26 - 10.5 * C27 - 11.5 * C28 - 12.5 * C29 - 13.5 * C30 - 14.5 * C31) / 2247.5 + 30 * (ABS(C30 - AVGC2.30) + ABS(C29 - AVGC3.29) + ABS(C28 - AVGC4.28) + ABS(C27 - AVGC5.27) + ABS(C26 - AVGC6.26) + ABS(C25 - AVGC7.25) + ABS(C24 - AVGC8.24) + ABS(C23 - AVGC9.23) + ABS(C22 - AVGC10.22) + ABS(C21 - AVGC11.21) + ABS(C20 - AVGC12.20) + ABS(C19 - AVGC13.19) + ABS(C18 - AVGC14.18) + ABS(C17 - AVGC15.17) + ABS(C16 - AVGC16.16) + ABS(C15 - AVGC17.15) + ABS(C14 - AVGC18.14) + ABS(C13 - AVGC19.13) + ABS(C12 - AVGC20.12) + ABS(C11 - AVGC21.11) + ABS(C10 - AVGC22.10) + ABS(C9 - AVGC23.9) + ABS(C8 - AVGC24.8) + ABS(C7 - AVGC25.7) + ABS(C6 - AVGC26.6) + ABS(C5 - AVGC27.5) + ABS(C4 - AVGC28.4) + ABS(C3 - AVGC29.3) + ABS(C2 - AVGC30.2)) / 600

QUOTE (darrellfung)
Stocks closing below the Linear Regression 30/30 line for a single daily close.

C < AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 - 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600

QUOTE (darrellfung)
Stocks closing below the Linear Regression 30/30 line for two consecutive daily closes.

C < AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 - 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600 AND C1 < AVGC30.1 + 14.5 * (14.5 * C1 + 13.5 * C2 + 12.5 * C3 + 11.5 * C4 + 10.5 * C5 + 9.5 * C6 + 8.5 * C7 + 7.5 * C8 + 6.5 * C9 + 5.5 * C10 + 4.5 * C11 + 3.5 * C12 + 2.5 * C13 + 1.5 * C14 + .5 * C15 - .5 * C16 - 1.5 * C17 - 2.5 * C18 - 3.5 * C19 - 4.5 * C20 - 5.5 * C21 - 6.5 * C22 - 7.5 * C23 - 8.5 * C24 - 9.5 * C25 - 10.5 * C26 - 11.5 * C27 - 12.5 * C28 - 13.5 * C29 - 14.5 * C30) / 2247.5 - 30 * (ABS(C29 - AVGC2.29) + ABS(C28 - AVGC3.28) + ABS(C27 - AVGC4.27) + ABS(C26 - AVGC5.26) + ABS(C25 - AVGC6.25) + ABS(C24 - AVGC7.24) + ABS(C23 - AVGC8.23) + ABS(C22 - AVGC9.22) + ABS(C21 - AVGC10.21) + ABS(C20 - AVGC11.20) + ABS(C19 - AVGC12.19) + ABS(C18 - AVGC13.18) + ABS(C17 - AVGC14.17) + ABS(C16 - AVGC15.16) + ABS(C15 - AVGC16.15) + ABS(C14 - AVGC17.14) + ABS(C13 - AVGC18.13) + ABS(C12 - AVGC19.12) + ABS(C11 - AVGC20.11) + ABS(C10 - AVGC21.10) + ABS(C9 - AVGC22.9) + ABS(C8 - AVGC23.8) + ABS(C7 - AVGC24.7) + ABS(C6 - AVGC25.6) + ABS(C5 - AVGC26.5) + ABS(C4 - AVGC27.4) + ABS(C3 - AVGC28.3) + ABS(C2 - AVGC29.2) + ABS(C1 - AVGC30.1)) / 600

QUOTE (darrellfung)
Stocks closing below the Linear Regression 30/30 line for three onsecutive daily closes.

C < AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 - 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600 AND C1 < AVGC30.1 + 14.5 * (14.5 * C1 + 13.5 * C2 + 12.5 * C3 + 11.5 * C4 + 10.5 * C5 + 9.5 * C6 + 8.5 * C7 + 7.5 * C8 + 6.5 * C9 + 5.5 * C10 + 4.5 * C11 + 3.5 * C12 + 2.5 * C13 + 1.5 * C14 + .5 * C15 - .5 * C16 - 1.5 * C17 - 2.5 * C18 - 3.5 * C19 - 4.5 * C20 - 5.5 * C21 - 6.5 * C22 - 7.5 * C23 - 8.5 * C24 - 9.5 * C25 - 10.5 * C26 - 11.5 * C27 - 12.5 * C28 - 13.5 * C29 - 14.5 * C30) / 2247.5 - 30 * (ABS(C29 - AVGC2.29) + ABS(C28 - AVGC3.28) + ABS(C27 - AVGC4.27) + ABS(C26 - AVGC5.26) + ABS(C25 - AVGC6.25) + ABS(C24 - AVGC7.24) + ABS(C23 - AVGC8.23) + ABS(C22 - AVGC9.22) + ABS(C21 - AVGC10.21) + ABS(C20 - AVGC11.20) + ABS(C19 - AVGC12.19) + ABS(C18 - AVGC13.18) + ABS(C17 - AVGC14.17) + ABS(C16 - AVGC15.16) + ABS(C15 - AVGC16.15) + ABS(C14 - AVGC17.14) + ABS(C13 - AVGC18.13) + ABS(C12 - AVGC19.12) + ABS(C11 - AVGC20.11) + ABS(C10 - AVGC21.10) + ABS(C9 - AVGC22.9) + ABS(C8 - AVGC23.8) + ABS(C7 - AVGC24.7) + ABS(C6 - AVGC25.6) + ABS(C5 - AVGC26.5) + ABS(C4 - AVGC27.4) + ABS(C3 - AVGC28.3) + ABS(C2 - AVGC29.2) + ABS(C1 - AVGC30.1)) / 600 AND C2 < AVGC30.2 + 14.5 * (14.5 * C2 + 13.5 * C3 + 12.5 * C4 + 11.5 * C5 + 10.5 * C6 + 9.5 * C7 + 8.5 * C8 + 7.5 * C9 + 6.5 * C10 + 5.5 * C11 + 4.5 * C12 + 3.5 * C13 + 2.5 * C14 + 1.5 * C15 + .5 * C16 - .5 * C17 - 1.5 * C18 - 2.5 * C19 - 3.5 * C20 - 4.5 * C21 - 5.5 * C22 - 6.5 * C23 - 7.5 * C24 - 8.5 * C25 - 9.5 * C26 - 10.5 * C27 - 11.5 * C28 - 12.5 * C29 - 13.5 * C30 - 14.5 * C31) / 2247.5 - 30 * (ABS(C30 - AVGC2.30) + ABS(C29 - AVGC3.29) + ABS(C28 - AVGC4.28) + ABS(C27 - AVGC5.27) + ABS(C26 - AVGC6.26) + ABS(C25 - AVGC7.25) + ABS(C24 - AVGC8.24) + ABS(C23 - AVGC9.23) + ABS(C22 - AVGC10.22) + ABS(C21 - AVGC11.21) + ABS(C20 - AVGC12.20) + ABS(C19 - AVGC13.19) + ABS(C18 - AVGC14.18) + ABS(C17 - AVGC15.17) + ABS(C16 - AVGC16.16) + ABS(C15 - AVGC17.15) + ABS(C14 - AVGC18.14) + ABS(C13 - AVGC19.13) + ABS(C12 - AVGC20.12) + ABS(C11 - AVGC21.11) + ABS(C10 - AVGC22.10) + ABS(C9 - AVGC23.9) + ABS(C8 - AVGC24.8) + ABS(C7 - AVGC25.7) + ABS(C6 - AVGC26.6) + ABS(C5 - AVGC27.5) + ABS(C4 - AVGC28.4) + ABS(C3 - AVGC29.3) + ABS(C2 - AVGC30.2)) / 600

You may wish to review the following:

Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis
Linear regression channel calculations
How to create a Personal Criteria Forumula (PCF)
Handy PCF example formulas to help you learn the syntax of PCFs!
Personal Criteria Language Function List

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
darrellfung
Posted : Saturday, August 5, 2006 11:32:21 AM
Registered User
Joined: 3/27/2005
Posts: 10
Thank you, Bruce. You are working early on a Saturday. I appreciate your help. This is exactly what I wanted...
I do notice that occasionally, it does not work, i.e. I get a few stocks that only have one close above the LR3030 line when using the 3 close scan.

Could you also do six more for me? The same 6 pcfs as in the first post, but for WEEKLY, instead of daily. I thought they might be the same and found from switching back and forth they are not.

Then, do you have ideas for the best way to find matches on the two lists? For example, stocks that have a three day daily close above lr3030 and a one week close above lr3030....could I simply combine the two scans to find ones that meet both?
Bruce_L
Posted : Saturday, August 5, 2006 12:13:17 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (darrellfung)
I do notice that occasionally, it does not work, i.e. I get a few stocks that only have one close above the LR3030 line when using the 3 close scan.

The Linear Regression Line is not static. The above formulas test Price against the Linear Regression Line that was there at the time. The following formulas should check versus the current Linear Regression Line instead:

QUOTE (darrellfung)
Stocks closing above the Linear Regression 30/30 line for two consecutive daily closes.

C > AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 + 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600 AND C1 > AVGC30 + 13.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 + 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600

QUOTE (darrellfung)
Stocks closing above the Linear Regression 30/30 line for three onsecutive daily closes.

C > AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 + 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600 AND C1 > AVGC30 + 13.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 + 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600 AND C2 > AVGC30 + 12.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 + 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600

QUOTE (darrellfung)
Stocks closing below the Linear Regression 30/30 line for two consecutive daily closes.

C < AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 - 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600 AND C1 < AVGC30 + 13.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 - 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600

QUOTE (darrellfung)
Stocks closing below the Linear Regression 30/30 line for three onsecutive daily closes.

C < AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 - 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600 AND C1 < AVGC30 + 13.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 - 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600 AND C2 < AVGC30 + 12.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5 - 30 * (ABS(C28 - AVGC2.28) + ABS(C27 - AVGC3.27) + ABS(C26 - AVGC4.26) + ABS(C25 - AVGC5.25) + ABS(C24 - AVGC6.24) + ABS(C23 - AVGC7.23) + ABS(C22 - AVGC8.22) + ABS(C21 - AVGC9.21) + ABS(C20 - AVGC10.20) + ABS(C19 - AVGC11.19) + ABS(C18 - AVGC12.18) + ABS(C17 - AVGC13.17) + ABS(C16 - AVGC14.16) + ABS(C15 - AVGC15.15) + ABS(C14 - AVGC16.14) + ABS(C13 - AVGC17.13) + ABS(C12 - AVGC18.12) + ABS(C11 - AVGC19.11) + ABS(C10 - AVGC20.10) + ABS(C9 - AVGC21.9) + ABS(C8 - AVGC22.8) + ABS(C7 - AVGC23.7) + ABS(C6 - AVGC24.6) + ABS(C5 - AVGC25.5) + ABS(C4 - AVGC26.4) + ABS(C3 - AVGC27.3) + ABS(C2 - AVGC28.2) + ABS(C1 - AVGC29.1) + ABS(C - AVGC30)) / 600

QUOTE (darrellfung)
Could you also do six more for me? The same 6 pcfs as in the first post, but for WEEKLY, instead of daily. I thought they might be the same and found from switching back and forth they are not.

I'll see if I can figure out a way to optimize it, but at first glance, I suspect the formulas would be too long and slow to be practical. All of the Moving Averages within the formulas would need to be expanded because the AVG() function will not work on Weekly data. Using a Channel Sort on a Weekly Chart is probably the way to go.

QUOTE (darrellfung)
Then, do you have ideas for the best way to find matches on the two lists? For example, stocks that have a three day daily close above lr3030 and a one week close above lr3030....could I simply combine the two scans to find ones that meet both?

I would use the appropriate formula as an EasyScan Condition and sort the resulting Watchlist using a Channel Sort of the 30-Period Linear Regression on a Weekly Chart.

You may wish to review the following:

Using EasyScan to find stocks that meet your own criteria
Sort using envelopes, regression channels and Bollinger bands
Spotting trend changes using linear regression channel sorts
Using Linear Regression Sorts to Help Spot Divergences

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
alindsley
Posted : Tuesday, August 8, 2006 12:17:16 AM

Registered User
Joined: 2/28/2005
Posts: 825
This was a cool exercise. Very helpful & eyeopening scans.

I'm wondering if either of these "Stocks closing above" PCF scans could be added to an easyscan that would render only the LinReg 30/30's which are somewhat level to trending up?
Bruce_L
Posted : Tuesday, August 8, 2006 7:36:10 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
alindsley,
It would be possible to check if the 30-Period Linear Regression Slope is greater than or equal to zero:

14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29 >= 0

Determining the actual slope would require placing everything before the >= 0 in parentheses and dividing by 2247.5 but this isn't necessary if you are just trying to determine if the symbol is level to trending up.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
alindsley
Posted : Tuesday, August 8, 2006 8:47:50 AM

Registered User
Joined: 2/28/2005
Posts: 825
That's it Bruce! Wow! Is there nothing you guys cannot create <g> within TeleChart!!!

There were a very tiny percentage of stocks, which trended downward but ohmygosh! That becomes quite a powerful EasyScan when this new PCF is combined with either of the previous PCF's.

Thank You
Bruce_L
Posted : Tuesday, August 8, 2006 9:39:51 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
alindsley,
One thing I can think of that might cause the Linear Regression to trend downward when the formula returns True would be that it is possible for the Linear Regression Slope to be positive when viewing charts using Arithmetic Scaling but negative when viewing the charts using Logarithmic Scaling. The formula is written based on Arithmetic Scaling.

This would make sense based on your statement that this difference only seems to occur for a tiny percentage of stocks. With TeleChart updated through 08/07/2006 Market Close, the following stocks have 30-Period Linear Regression Slopes with differing signs depending on the scaling method used:

AVX
CTDC
FOXH
GG
HEW
MATW
OSUR
PORK
TG
WBNK

Similar issues might be exhibited by symbols that can have negative values, but such symbols should never be viewed using Logarithmic Scaling. What symbols are exhibiting this issue for you?

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
alindsley
Posted : Tuesday, August 8, 2006 10:20:47 AM

Registered User
Joined: 2/28/2005
Posts: 825
ANSS
GIL
ATRS
TNL
PSPT
PCAR
PWR

This was out of 30 results of a scan of over 500 of IBD's best stock lists over the last few months. I was viewing using Log scale but in these it doesn't seem to make much difference.
Bruce_L
Posted : Tuesday, August 8, 2006 10:36:24 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
alindsley,
The slope of the 30-Period Linear Regression appears to be positive on my computer for both Arithmetic and Logarithmic Scaling for all of the symbols you mentioned. Are you in Daily mode?

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
darrellfung
Posted : Saturday, August 12, 2006 11:58:09 AM
Registered User
Joined: 3/27/2005
Posts: 10
HI Bruce....

Thanks for all your help....Is the formula to check if the slope is negative, the same formula, EXCEPT <= 0 at the end of it?
alindsley
Posted : Saturday, August 12, 2006 12:03:30 PM

Registered User
Joined: 2/28/2005
Posts: 825
Sorry Bruce, somehow I didn't receive your last post to me and at this time I'm not quite sure. But that template seems to be working great for me. And I find myself referring to it often.

I appreciate your help.
Bruce_L
Posted : Saturday, August 12, 2006 4:05:37 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (darrellfung)
Thanks for all your help....Is the formula to check if the slope is negative, the same formula, EXCEPT <= 0 at the end of it?

You would probably want a < 0 instead of a <= 0 if you are looking for a negative slope, but yes.

QUOTE (alindsley)
Sorry Bruce, somehow I didn't receive your last post to me and at this time I'm not quite sure. But that template seems to be working great for me. And I find myself referring to it often.

I'm glad it seems to be working for you.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Winnie
Posted : Saturday, August 12, 2006 6:52:27 PM
Registered User
Joined: 10/7/2004
Posts: 1,006
Bruce – The Linear Regression PCFs are fascinating.
I was wondering whether it is best to use the math or Boolean formula, as you know, when one uses the SGN notation, if there aren’t enough results for the range selector it won’t bring up the +2, say for 20 stocks, I believe the number is closer to 70 for the +2.

C : Price Today
C1 : Price Yesterday
LR : Linear Regression Today
LR1 : Linear Regression Yesterday
CW : Channel Width Today
CW1 : Channel Width Yesterday
n : Standard Deviation

1. Have the programmers fixed the problem with the SGN notation for the number of stocks below 70?

2. LR ( 30,0,30 ) Upper Band Crossover, is it better to use: a) or b)

a) Upper Band Crossover math Formula: SGN(C - (LR + n * CW)) - SGN(C1 - (LR1 + n * CW1))

b) Upper Band Crossover Boolean Formula: C1< (LR + n * CW) AND C> (LR1 + n * CW1)

Thanks
Winnie
Bruce_L
Posted : Saturday, August 12, 2006 9:22:07 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (Winnie)
Have the programmers fixed the problem with the SGN notation for the number of stocks below 70?

There is no issue with the SGN() function. The values that can be selected using the EasyScan Rangefinder are currently limited to the values at Percentile Rank boundaries. You may wish to review the following:

PCF SGN Formula

QUOTE (Winnie)
LR ( 30,0,30 ) Upper Band Crossover, is it better to use: a) or b)

It depends entirely on what you want to do. If you wish to include the formula in an EasyScan, a Boolean formula will avoid the Rangefinder issue mentioned above. If you are searching for a crossover in a single direction, b) is slightly shorter than converting a) into a Boolean formula by adding > 0. If you were searching for crossovers in either direction it would be shorter to add <> 0 to a) than to AND together b) formulas for both directions.

QUOTE (Winnie)
n : Standard Deviation

I just wanted to clarify that the formula for TeleChart's Linear Regression Channels does not involve Standard Deviation. I suspect n = the Linear Regression Width setting.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Winnie
Posted : Saturday, August 12, 2006 10:51:51 PM
Registered User
Joined: 10/7/2004
Posts: 1,006
Bruce - thanks for the answers and yes the n is for the channel width, I was thinking LR but writing BB.

I also have a calculation issue which I will address at another time with a new topic, this has bothered me for some time, just haven't had the time. I work around but it could be just the way the program calculates.

Thanks Again
Winnie
Winnie
Posted : Sunday, August 13, 2006 1:36:46 AM
Registered User
Joined: 10/7/2004
Posts: 1,006
Bruce - Just checked the 2.b) PCF formula in my previous post, it should be:

b) Upper Band Crossover Boolean Formula: C>(LR + n * CW) AND C1<(LR1 + n * CW1)

Thanks
Winnie
Bruce_L
Posted : Sunday, August 13, 2006 8:34:54 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Winnie,
That would make sense.

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