How do I make the LRC continuously update and keep up with price?

Linear Regression Channel or I-Regr 12 replies
Linear Regression Slope, Linear Regression MA and Band 4 replies
How to code a Linear Regression channel? HELP 4 replies
MTF Linear Regression Channel 1 reply
Using Linear Regression Channel 2 replies
DislikedThanks, hanover. Actually, I want it to be a rolling 23 periods. It has to roll to change slope.Ignored
extern int period=0;
/*default 0 means the channel will use the open time from "x" bars back on which ever time period
the indicator is attached to. one can change to 1,5,15,30,60...etc to "lock" the start time to a specific
period, and then view the "locked" channels on a different time period...*/
extern int line.width=2;
extern int LR.length=34; // bars back regression begins
extern color LR.c=Orange;
extern double std.channel.1=0.618; // 1st channel
extern color c.1=Gray;
extern double std.channel.2=1.618; // 2nd channel
extern color c.2=Gray;
extern double std.channel.3=2.618; // 3nd channel
extern color c.3=Gray;
DislikedHi Zinvestor
Does the attached indicator (which I found elsewhere) help?
I'm not sure whether it "keeps up with price" automatically. If so, I suspect that the indicator re-plots itself over the last "n" candles (in a "rolling window"), where "n" is the value you set in the LR.length parameter.
It shouldn't be too hard to change the source so that the start point remains fixed at a certain date/time, so that the channel keeps getting longer to include each new candle..... if that's what you want.
One feature is that it allows up...Ignored