logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
pgkw1997  
#1 Posted : Tuesday, February 15, 2011 2:31:51 AM(UTC)
pgkw1997

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/15/2011(UTC)
Posts: 5

Hi, everybody Can i know , how to calc the average up / down in rsi by metastock coding ? thanks a lot Paul
wabbit  
#2 Posted : Tuesday, February 15, 2011 5:55:34 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
pgkw1997  
#3 Posted : Tuesday, February 15, 2011 8:59:24 AM(UTC)
pgkw1997

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/15/2011(UTC)
Posts: 5

Hi wabbit , Thanks for your reply, But I still have some question about the formula, Because , base on excel's calculation current average up = current up + prev. average up * (period -1) , is this calculation method still working in metastock Please help Wish for your reply again ! Paul
wabbit  
#4 Posted : Tuesday, February 15, 2011 9:55:52 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
MS RSI uses Wilders smoothing. You can use whatever averaging algorithm you like, or even no averaging if you like; I don't think the excel calculation is correct though.


wabbit [:D]

pgkw1997  
#5 Posted : Tuesday, February 15, 2011 7:45:00 PM(UTC)
pgkw1997

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/15/2011(UTC)
Posts: 5

sorry, my input is incorrect, actual is current average up = (current up + prev. average up * (period -1)) / period , If my idea is like that, does it work in metastock? Thanks....
wabbit  
#6 Posted : Wednesday, February 16, 2011 3:53:14 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Your excel EMA is Wilders smoothing... as already implemented in MS RSI() function.


wabbit [:D]

pgkw1997  
#7 Posted : Wednesday, February 16, 2011 6:30:44 AM(UTC)
pgkw1997

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/15/2011(UTC)
Posts: 5

I understand RSI() is same as my excel calculation, but I want to modify the calculation method of the "current up" of the below formula {current average up = (current up + prev. average up * (period -1)) / period} so i want to know, wherever this thinking way is work or not in MS, because i need to calc prev. average up by MS code , Pls suggest paul
wabbit  
#8 Posted : Wednesday, February 16, 2011 6:46:42 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Code:
current average up = (current up + prev. average up * (period -1)) / period


can be written in MS as:

Code:
up:=C-Ref(C,-1);
thisup:=(up+PREV*(period-1))/period;


which is the same as:
Code:
up:=C-Ref(C,-1);


thisup:=Mov(up,2*period-1,e);


which is the same as:
Code:
up:=C-Ref(C,-1);


thisup:=Wilders(up,period);


????


wabbit [:D]

[Edit] I should have mentioned the codes are the same after about 5*period bars, before then you'll run into the MS initialization issues and N/A bars.


pgkw1997  
#9 Posted : Wednesday, February 16, 2011 6:33:13 PM(UTC)
pgkw1997

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/15/2011(UTC)
Posts: 5

Hi, Wabbit Thanks for your heip ! It is helpful for me. Paul
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.