Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Moving Linear Regression Price Channel by X% Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
rfreder84
Posted : Friday, October 16, 2009 10:42:39 AM
Registered User
Joined: 1/21/2006
Posts: 9
Is it possible to move the Linear Regression Line by X% to form a Price Channel. -or- Form another line above & below the Linear Regression Line specifically at 10% & 90% on th price chart?
Bruce_L
Posted : Friday, October 16, 2009 11:03:23 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Sure. You would just create a formula for the Moving Linear Regression and multiply it by 1.1 to get the line that is 10% above the MLR and by .9 to get the line that is 10% below the MLR. The exact formula will depend on the Period of the Moving Linear Regression (if you provide the period, we can help you create the formula).

Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
rfreder84
Posted : Friday, October 16, 2009 1:07:25 PM
Registered User
Joined: 1/21/2006
Posts: 9
I was thinking 3 months so let's say 60 price bars for round figures.
Bruce_L
Posted : Friday, October 16, 2009 1:29:34 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You could use the following formula in a Custom Indicator with Plot using price scale checked to Plot a 60-Period Moving Linear Regression of Price:

Plotting Custom Indicators with Examples

AVGC60 + 29.5 * (29.5 * C + 28.5 * C1 + 27.5 * C2 + 26.5 * C3 + 25.5 * C4 + 24.5 * C5 + 23.5 * C6 + 22.5 * C7 + 21.5 * C8 + 20.5 * C9 + 19.5 * C10 + 18.5 * C11 + 17.5 * C12 + 16.5 * C13 + 15.5 * C14 + 14.5 * C15 + 13.5 * C16 + 12.5 * C17 + 11.5 * C18 + 10.5 * C19 + 9.5 * C20 + 8.5 * C21 + 7.5 * C22 + 6.5 * C23 + 5.5 * C24 + 4.5 * C25 + 3.5 * C26 + 2.5 * C27 + 1.5 * C28 + .5 * C29 - .5 * C30 - 1.5 * C31 - 2.5 * C32 - 3.5 * C33 - 4.5 * C34 - 5.5 * C35 - 6.5 * C36 - 7.5 * C37 - 8.5 * C38 - 9.5 * C39 - 10.5 * C40 - 11.5 * C41 - 12.5 * C42 - 13.5 * C43 - 14.5 * C44 - 15.5 * C45 - 16.5 * C46 - 17.5 * C47 - 18.5 * C48 - 19.5 * C49 - 20.5 * C50 - 21.5 * C51 - 22.5 * C52 - 23.5 * C53 - 24.5 * C54 - 25.5 * C55 - 26.5 * C56 - 27.5 * C57 - 28.5 * C58 - 29.5 * C59) / 17995

Multiplying this by 1.1 would create a Channel that is 10% above this Value:

1.1 * (AVGC60 + 29.5 * (29.5 * C + 28.5 * C1 + 27.5 * C2 + 26.5 * C3 + 25.5 * C4 + 24.5 * C5 + 23.5 * C6 + 22.5 * C7 + 21.5 * C8 + 20.5 * C9 + 19.5 * C10 + 18.5 * C11 + 17.5 * C12 + 16.5 * C13 + 15.5 * C14 + 14.5 * C15 + 13.5 * C16 + 12.5 * C17 + 11.5 * C18 + 10.5 * C19 + 9.5 * C20 + 8.5 * C21 + 7.5 * C22 + 6.5 * C23 + 5.5 * C24 + 4.5 * C25 + 3.5 * C26 + 2.5 * C27 + 1.5 * C28 + .5 * C29 - .5 * C30 - 1.5 * C31 - 2.5 * C32 - 3.5 * C33 - 4.5 * C34 - 5.5 * C35 - 6.5 * C36 - 7.5 * C37 - 8.5 * C38 - 9.5 * C39 - 10.5 * C40 - 11.5 * C41 - 12.5 * C42 - 13.5 * C43 - 14.5 * C44 - 15.5 * C45 - 16.5 * C46 - 17.5 * C47 - 18.5 * C48 - 19.5 * C49 - 20.5 * C50 - 21.5 * C51 - 22.5 * C52 - 23.5 * C53 - 24.5 * C54 - 25.5 * C55 - 26.5 * C56 - 27.5 * C57 - 28.5 * C58 - 29.5 * C59) / 17995)

Multiplying this by .9 would create a Channel that is 10% below this Value:

.9 * (AVGC60 + 29.5 * (29.5 * C + 28.5 * C1 + 27.5 * C2 + 26.5 * C3 + 25.5 * C4 + 24.5 * C5 + 23.5 * C6 + 22.5 * C7 + 21.5 * C8 + 20.5 * C9 + 19.5 * C10 + 18.5 * C11 + 17.5 * C12 + 16.5 * C13 + 15.5 * C14 + 14.5 * C15 + 13.5 * C16 + 12.5 * C17 + 11.5 * C18 + 10.5 * C19 + 9.5 * C20 + 8.5 * C21 + 7.5 * C22 + 6.5 * C23 + 5.5 * C24 + 4.5 * C25 + 3.5 * C26 + 2.5 * C27 + 1.5 * C28 + .5 * C29 - .5 * C30 - 1.5 * C31 - 2.5 * C32 - 3.5 * C33 - 4.5 * C34 - 5.5 * C35 - 6.5 * C36 - 7.5 * C37 - 8.5 * C38 - 9.5 * C39 - 10.5 * C40 - 11.5 * C41 - 12.5 * C42 - 13.5 * C43 - 14.5 * C44 - 15.5 * C45 - 16.5 * C46 - 17.5 * C47 - 18.5 * C48 - 19.5 * C49 - 20.5 * C50 - 21.5 * C51 - 22.5 * C52 - 23.5 * C53 - 24.5 * C54 - 25.5 * C55 - 26.5 * C56 - 27.5 * C57 - 28.5 * C58 - 29.5 * C59) / 17995)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
rfreder84
Posted : Friday, October 16, 2009 2:26:15 PM
Registered User
Joined: 1/21/2006
Posts: 9
Thanks, I'll try it.
rfreder84
Posted : Friday, October 16, 2009 3:20:45 PM
Registered User
Joined: 1/21/2006
Posts: 9
It didn't work I was trying to put 2 straight lines on the chart with the same characteristics of the standard
LR line. At approx 90 & 10% of the price pattern over the 60 price bars.
Bruce_L
Posted : Friday, October 16, 2009 3:25:09 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Sorry, when you said, "move the Linear Regression", I somehow read "Moving Linear Regression" (which Plots the End Points of the Linear Regression Lines that would have been Plotted over time).

I do not know of a way to Plot a Linear Regression Line with Channels based on a percentage instead of the LR Width calculations that are built into TeleChart (it would be possible, albeit not necessarily simple, to do so using StockFinder).

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