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 #

Relative Strength Index (RSI) Custom I
This custom RSI will allow you to select which price data to use when you plot it.
The standard RSI uses the close value as Welles Wilder did when he created the indicator. This custom indicator will allow you to use the other price fields including volume.

Relative Strength Index (RSI) Custom I

Q:=Input("Time Periods",1,1000,14);

B:=Input("Field: 1=Close, 2=Open, 3=High, 4=Low,5=Volume",1,5,1);

Z:=If(B=1,Wilders(If(ROC(C,1,$)>0,ROC(C,1,$),0),LastValue(Q)),
If(B=2,Wilders(If(ROC(O,1,$)>0,ROC(O,1,$),0),LastValue(Q)),
If(B=3,Wilders(If(ROC(H,1,$)>0,ROC(H,1,$),0),LastValue(Q)),
If(B=4,Wilders(If(ROC(L,1,$)>0,ROC(L,1,$),0),LastValue(Q)),

Wilders(If(ROC(V,1,$)>0,ROC(V,1,$),0),LastValue(Q))))));

Y:=If(B=1,Wilders(If(ROC(C,1,$)<0,Abs(ROC(C,1,$)),0),LastValue(Q)),
If(B=2,Wilders(If(ROC(O,1,$)<0,Abs(ROC(O,1,$)),0),LastValue(Q)),
If(B=3,Wilders(If(ROC(H,1,$)<0,Abs(ROC(H,1,$)),0),LastValue(Q)),
If(B=4,Wilders(If(ROC(L,1,$)<0,Abs(ROC(L,1,$)),0),LastValue(Q)),
Wilders(If(ROC(V,1,$)<0,Abs(ROC(V,1,$)),0),LastValue(Q))))));

RS:=Z/Y;

100-(100/(1+RS))

 

Source / From: TOP
http://www.equis.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!