Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 5/20/2005 Posts: 178
|
Dear Trainers,Can you help me to write a pcf that measures the slope of the RSI.setting for rsi is RSI14.3 and time interval is 3 month (63 days)I am trying to create a scan which i can find stocks that go down in price while RSI is going up (for the past 3 months)i think i know how to write the PCF for stock price: (C/C63)*100But i could not figure out how to write the PCF for the slope of RSI.Thank you
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Based on your RSI settings, I'm going to assume you are using TC2000 version 7.
If it is a Simple RSI13.3 without Wilder's Smoothing, I would subtract the previous RSI value from the current RSI value as it is already exressed on a scale running from 0 to 100:
RSI13.3 - RSI13.3.63
Any other RSI settings would change the formula (if the RSI is Exponential):
XAVG(RSI13,3) - XAVG(RSI13.1.63,3)
Or make the resulting formula too longe to be practical (if Wilder's Smoothing is checked).
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/20/2005 Posts: 178
|
thanks Bruce
|
|
Registered User Joined: 5/20/2005 Posts: 178
|
Dear Bruce,I have tried using RSI13.3 - RSI13.3.63 for my scan.however, it didnt give me the result i was looking foris there another way to write a pcf that calculate the slope of RSI?thanksjames
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You can cover the same period of time with a 64-Period Linear Regression Slope of Price:
(31.5 * C + 30.5 * C1 + 29.5 * C2 + 28.5 * C3 + 27.5 * C4 + 26.5 * C5 + 25.5 * C6 + 24.5 * C7 + 23.5 * C8 + 22.5 * C9 + 21.5 * C10 + 20.5 * C11 + 19.5 * C12 + 18.5 * C13 + 17.5 * C14 + 16.5 * C15 + 15.5 * C16 + 14.5 * C17 + 13.5 * C18 + 12.5 * C19 + 11.5 * C20 + 10.5 * C21 + 9.5 * C22 + 8.5 * C23 + 7.5 * C24 + 6.5 * C25 + 5.5 * C26 + 4.5 * C27 + 3.5 * C28 + 2.5 * C29 + 1.5 * C30 + .5 * C31 - .5 * C32 - 1.5 * C33 - 2.5 * C34 - 3.5 * C35 - 4.5 * C36 - 5.5 * C37 - 6.5 * C38 - 7.5 * C39 - 8.5 * C40 - 9.5 * C41 - 10.5 * C42 - 11.5 * C43 - 12.5 * C44 - 13.5 * C45 - 14.5 * C46 - 15.5 * C47 - 16.5 * C48 - 17.5 * C49 - 18.5 * C50 - 19.5 * C51 - 20.5 * C52 - 21.5 * C53 - 22.5 * C54 - 23.5 * C55 - 24.5 * C56 - 25.5 * C57 - 26.5 * C58 - 27.5 * C59 - 28.5 * C60 - 29.5 * C61 - 30.5 * C62 - 31.5 * C63) / 21840
And a 64-Period Linear Regression Slope of Simple RSI13,3 without RSI Smoothing:
(31.5 * RSI13.3 + 30.5 * RSI13.3.1 + 29.5 * RSI13.3.2 + 28.5 * RSI13.3.3 + 27.5 * RSI13.3.4 + 26.5 * RSI13.3.5 + 25.5 * RSI13.3.6 + 24.5 * RSI13.3.7 + 23.5 * RSI13.3.8 + 22.5 * RSI13.3.9 + 21.5 * RSI13.3.10 + 20.5 * RSI13.3.11 + 19.5 * RSI13.3.12 + 18.5 * RSI13.3.13 + 17.5 * RSI13.3.14 + 16.5 * RSI13.3.15 + 15.5 * RSI13.3.16 + 14.5 * RSI13.3.17 + 13.5 * RSI13.3.18 + 12.5 * RSI13.3.19 + 11.5 * RSI13.3.20 + 10.5 * RSI13.3.21 + 9.5 * RSI13.3.22 + 8.5 * RSI13.3.23 + 7.5 * RSI13.3.24 + 6.5 * RSI13.3.25 + 5.5 * RSI13.3.26 + 4.5 * RSI13.3.27 + 3.5 * RSI13.3.28 + 2.5 * RSI13.3.29 + 1.5 * RSI13.3.30 + .5 * RSI13.3.31 - .5 * RSI13.3.32 - 1.5 * RSI13.3.33 - 2.5 * RSI13.3.34 - 3.5 * RSI13.3.35 - 4.5 * RSI13.3.36 - 5.5 * RSI13.3.37 - 6.5 * RSI13.3.38 - 7.5 * RSI13.3.39 - 8.5 * RSI13.3.40 - 9.5 * RSI13.3.41 - 10.5 * RSI13.3.42 - 11.5 * RSI13.3.43 - 12.5 * RSI13.3.44 - 13.5 * RSI13.3.45 - 14.5 * RSI13.3.46 - 15.5 * RSI13.3.47 - 16.5 * RSI13.3.48 - 17.5 * RSI13.3.49 - 18.5 * RSI13.3.50 - 19.5 * RSI13.3.51 - 20.5 * RSI13.3.52 - 21.5 * RSI13.3.53 - 22.5 * RSI13.3.54 - 23.5 * RSI13.3.55 - 24.5 * RSI13.3.56 - 25.5 * RSI13.3.57 - 26.5 * RSI13.3.58 - 27.5 * RSI13.3.59 - 28.5 * RSI13.3.60 - 29.5 * RSI13.3.61 - 30.5 * RSI13.3.62 - 31.5 * RSI13.3.63) / 21840
But you haven't explained what specifically you didn't like about the previous result. It should be noted that if you are using an Exponential RSI and/or an RSI with Wilder's Smoothing, the RSI13.3 - RSI13.3.63 formula would not work (and neither would the Linear Regression Slope formula.
Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/20/2005 Posts: 178
|
no, i use simple RSI
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
As long as you are using a Simple RSI with no Wilder's Smoothing, both RSI formulas should work. If they don't do what you want, I will need additional clarification from you as what you them to do that they aren't doing currently.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |