I'm looking to only plot specifically selected (continuous) group of Bars. Eventually these will be made variables depending on the 5EMA changes.
For simple example
Input s1 = -5 Start
Input e1 = -3 End
define nb=(e1-s1)+1 number of bars 3
Without going into all the coding detail I have calculated the best fit linear regression line between these points and have generated among other items the following;
b1 Slope
yint1 Y-Intercept
I tried the formula for a line y=mx+b and tried to incorporate BarNumbers(3) but I kept getting a line across the entire chart
I need help on the plot statement that would only show the "straight" line for Bars -5,-4,-3.
Let me know if I need more information
For simple example
Input s1 = -5 Start
Input e1 = -3 End
define nb=(e1-s1)+1 number of bars 3
Without going into all the coding detail I have calculated the best fit linear regression line between these points and have generated among other items the following;
b1 Slope
yint1 Y-Intercept
I tried the formula for a line y=mx+b and tried to incorporate BarNumbers(3) but I kept getting a line across the entire chart
I need help on the plot statement that would only show the "straight" line for Bars -5,-4,-3.
Let me know if I need more information