Is it possible to dynamically change a line through variables set the start and end point?
double slope; // calculated slope of linear regression line
double intercept; // calculated start value of lin reg line
double linReg; // linear regression value for current bar
int period; // number of bars for calcutaing lin reg
DrawRay("LinReg", CurrentBar - period, intercept, CurrentBar, linReg, Color.Blue, DashStyle.Solid, 1);
So my question is if this linear regression line would dynamically change as new price bars are coming in or I need to delete, rename and re-draw the line. Also since the last bar will change until it has completed it will try to change the end value through the linReg variable.
Thanks

Comment