Thx, Shg - appreciate the direction....the reason I wanted to use a Slope function was that I was hoping to define a "flat" vs. "rising/falling" slope of the trendline with a numerical boundary that could then be referenced against the R2 number to tell me whether the trend line was real or not so that trades could then either be placed in the direction of the trend or counter to the trend.....
ie....if Slope (over 30 periods) > -1 and Slope < 1 and R2 >= .80 then trend = "flat" , which is saying that the recent price trend is flat with R2 confirming it with an 80% or better reading (the slope settings would need to be tested to define whether a -1 to 1 range is right or not, but it's a starting point)....counter trend trades would be fine in this environment as the market is just bouncing around.....
then...if Slope < -1 and R2 >= .80, then trend = downtrend.....same rationale as above...this would set up short trade positions....
then if Slope > 1 and R2 >= .80, then trend = uptrend.....same rationale as above...this would set up long trade positions....
So, to summarize, I wanted to use the Slope function to help me define a trending (or not) condition that could be confirmed by R2. Looks like the LINEST function would help me draw the line, but I'm not sure it will help me get the data I was looking for that could then be programmed without having to do separate visual and manual inspections of price charts. I was hoping this could substantially reduce setup time daily in spotting candidates that are actually setup correctly for the proper trend conditions to trade or not.
Does that make sense
Thanks, Rick