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 #

Modified Moving Average by Joe Sharp
To recreate in MetaStock 6.52 or higher the modifiedmoving average as explained by Joe Sharp in "More Responsive Moving Averages" elsewherein this issue, select "Indicator Builder" from the Tools menu, click "New" and enter the following code, accordingto the desired period:

Modified Moving Average for a two-period average

N:=2;
TN:=Mov(C,N,S);
s1:=((n-1)/2)*C+((n-3)/2)*Ref(C,-1);
y2:=TN+(6*S1)/((n+1)*n);
y2

 


Modified Moving Average for a three-period average

N:=3;
TN:=Mov(C,N,S);
s1:=((n-1)/2)*C+((n-3)/2)*Ref(C,-1)+((n-5)/2)*Ref(C,-2);
y2:=TN+(6*S1)/((n+1)*n);
y2

 

 


Modified Moving Average for a four-period average

N:=4;
TN:=Mov(C,N,S);
s1:=((n-1)/2)*C+((n-3)/2)*Ref(C,-1)+((n-5)/2)*Ref(C,-2)+((n-7)/2)*Ref(C,-3);
y2:=TN+(6*S1)/((n+1)*n);
y2

 


Modified Moving Average for a 10-period average

N:=10;
TN:=Mov(C,N,S);
s1:=((n-1)/2)*C+((n-3)/2)*Ref(C,-1)+((n-5)/2)*Ref(C,-2)+((n-7)/2)*Ref(C,-3)
+((n-9)/2)*Ref(C,-4)+((n-11)/2)*Ref(C,-5)+((n-13)/2)*Ref(C,-6)
+((n-15)/2)*Ref(C,-7)+((n-17)/2)*Ref(C,-8)+((n-19)/2)*Ref(C,-9);
y2:=TN+(6*S1)/((n+1)*n);
y2

 

 
Cheryl Elton
Equis International
Source / From: TOP
http://www.traders.com

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!