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
|
|
|
|
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)
|
|
|
|
|
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
|
|
|
|
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]
|
|
|
|
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....
|
|
|
|
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]
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
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.