- Katılım
- 23 Eki 2020
- Mesajlar
- 1,828
Plots a single linear regression line for however many periods you enter. Prevents you from having to redraw a linear regression every day since this will update automatically as new data arrives (including in real time). |
|
Moving Linear Regression Line Pe:=Input("Periods",3,1000,10); Z:=LastValue(LinearReg(C,Pe)); Y:=LastValue(Cum(1))-Cum(1); U:=Z-(LastValue(LinRegSlope(C,Pe))*Y); R:=0-(LastValue(Cum(1))-Pe); U+Ref(C,R)-Ref(C,R); |
Linear Regression Line Motion ( MetaStock V. 6.5 - All Data Types) Each formula will plot 10 linear regressions, calculated for the number of periods specified, and moving forward each day (period). Plotting all 4 formulas will draw 40 linear regression lines for the periods specified (use the same number of periods for each formula plotted). Useful for seeing the motion of the market. Note: While this will work with intraday data in real-time, due to the extensiveness of the calculation it may take some time to calculate and can slow down other processes on your system. The formulas are in a copy-and-paste format that will go directly into MetaStock. One at a time - highlight the formulas (not the name), and while holding down the 'ctrl' key press 'c', then go into the MetaStock Indicator Builder, click on New, give the indicator a name, click into the formula window, and then while holding down the 'ctrl' key press 'v'. This will paste the formula into MetaStock. Then click on OK and the formulas will be saved. (Then follow the same process with the next formula.) | |
| |
Source / From: |