MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Moving Linear Regression Line
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: TOP
Lechu

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!