Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 11/29/2004 Posts: 8
|
I noticed that TC2000 now has regression lines that can be added to indicators. Is there any way this function can be added for a scan? To facilitate adding this to indicators, I assume it is a called function now like say RGRSC50 for a regression line covering 50 daily closing prices, where RGRS is the base function and the meat of the problem. I can manually enter a regression line, but the work is multitudinous to say the least, and the real problem is if I want to check various time frames based on a group of stocks beta, etc, I have to retype a whole new function. This would be a very beneficial function for quickly determining the overall trend of a stock on some period of time.
Thanks for your input.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
quadrun,
The PCF formula language does not have syntax for Linnear Regression lines. You can use the Visual Sorting to find stocks with particular regression patterns. Take a peek at this video and see if it gives you some ideas:
http://www.worden.com/training/default.aspx?g=posts&t=37
- Craig Here to Help!
|
|
Registered User Joined: 11/29/2004 Posts: 8
|
Thanks Craig. I had the feeling it didn't. I can massage the data by writing each indicator function seperately and applying a large scaling constant to the result that allows the range/value selector to function for negative regression lines as well. Thanks for the help.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Did you get a chance to watch the video? Finding positive and negative regression lines is very simple when you use the visual slope sort. I really think it will do what you want it to. It can be done on any regression line applied to any indicator!
- Craig Here to Help!
|
|
Registered User Joined: 11/29/2004 Posts: 8
|
Yes, I think I have seen that video. I have also played with the visual sort box. But the problem as I see it is that I have to have a watchlist of items that I can visually sort, as opposed to a scan that returns items meeting the regression criteria I want for viewing. I have the problem in hand now. At first I overly complicated matters by writing functions that relied on conditional operators. I removed the conditional operators and applied large scaling factors that allow me to use the slider range function in the Easy Scan directly. Then I can view the results with regression lines on screen. This approach also makes it much easier to write functions for different time frames as well. Only a handful would be required. I'm assembling it now. Thanks for the help and suggestions.
|
|
Registered User Joined: 10/15/2004 Posts: 11
|
When will you choose Lin Reg 50 and why with SD of 1.5 ? Is it related to the regression period ?
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
I cannot speak for quadrun (hopefully he will answer your question). I do know that, statistically, most samples of numbers from nature, studies, science, sports, etc. tend to stay within 1.5 to 2 standard deviations of themselves. Often numbers outside of this SD are seen as unique.
- Craig Here to Help!
|
|
Registered User Joined: 11/29/2004 Posts: 8
|
murty,
I only chose 50 day to try to catch a fairly new divergence between say price and MACD. I'm not sure I ever mentioned standard deviation. I don't really believe that bell curve type statistics can be accurately applied to stock prices, but I also don't believe in random walk theory either.
I can write functions to test for this, but I still get an awful lot of garbage hits for some reason. If TC2000 allowed you to select a regression model for scanning like they allow for charting, the program would be very very powerful. Then you could set slope limits on the indicators and sort for divergence visually. The only thing better would be testing for higher lows versus lower lows or lower highs versus higher highs between price and indicators.
|
|
Registered User Joined: 10/7/2004 Posts: 799 Location: Duluth, GA
|
It's quite feasible to model LinReg lines in a PCF. You can calc the slope of the line, or the value of any point on the line, with a bounded series. Any native-PCF function such as RSI or MS, etc can easily be incorporated ... it is also possible to do them for some "messier" app's such as true MACD's and Histo's.
Jim Dean aka "Sir" Tanstaafl on TCNet
|
|
Registered User Joined: 10/7/2004 Posts: 799 Location: Duluth, GA
|
I provided a bit more explanation and a small example of how to calc the LinReg slope direction at the following URL: http://www.worden.com/training/default.aspx?g=posts&t=635
This is sufficient for writing PCF's to identify divergences. It's also possible to create PCF's that calculate the TRUE LinReg slope, and to calculate the actual VALUE of points on the LinReg line (even points in the future). The math is considerably more complex for those, however.
|
|
Registered User Joined: 10/7/2004 Posts: 799 Location: Duluth, GA
|
Oops that URL does not point to the right place anymore. Here is one for a much more comprehensive discussion of the Linear Regression Divergence. Sorry about the confusion!
http://www.worden.com/training/default.aspx?g=posts&t=755
|
|
Guest-1 |