| 
 Hello JNZ 
Here's an example of the use of Linregslope and 
LinRegIntercept imbedded in a relative strength routine. 
Somewhere in there is a "pony" if you remember the old 
joke.  
  
It shows how to calculate relative strength for a 
fixed time span, then fits a  
linear regression equation over the last N days of 
the relative strength array with standard 
deviation bands.  
  
It's a combination of the work 
of two authors Bruce R. who's work is the RS section was 
adapted  
and Dimitris Tsokakis for the use of Linear Regression 
functions.  As you can tell totally 
different styles.   
  
The routine plots the relative strength of the current 
issue against the Russell 2000 
index !RUT and S&P500 index !SPX with Quotes Plus 
symbols.  Substitute your own symbols by 
using the Parameters function or 
this won't work if the tickers aren't valid (this should go without 
 
saying but I do that all the time) 
The routine also plots for the bars visible in the chart 
window and does a linear regression on the  
last N days defined in the parameter also, now at 63 or 3 
months of daily bars.  
  
So somewhere in there is the key that may help you in 
fitting a linear regression.  Note it starts 
at the Right edge and does not shift as you change the 
window,  although the RS curves handles  
the shifting or scaling windows with the bars visible 
function.  
  
Hope this helps.
  JOE LANDRY  
  
A plot as it stands with RS of SPX and RUT shows the 
small/midcaps started a very nice uptrend at beginning 
of the year and has hardly looked back.  
 
  
  ----- Original Message -----  
    
  
  
  Sent: Saturday, February 04, 2006 10:55 
  AM 
  Subject: [amibroker] Another question 
  about how to use LinearReg() 
  
  There is a library item in AFL libreary showing how to draw 
  linear reg  line without using LinearReg() function.
  Could anybody 
  show me how to use LinearReg() to do the same thing. This  could help me to 
  understand further about this function
  thanks,
 
 
  
  
Please note that this group is for discussion between users only. 
 
To get support from AmiBroker please send an e-mail directly to  
SUPPORT {at} amibroker.com 
 
For other support material please check also: 
http://www.amibroker.com/support.html 
 
  
    
  
  
  
    SPONSORED LINKS
   
       
  
 
  
    
  YAHOO! GROUPS LINKS
 
 
    
  |