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

Notification

Icon
Error

Options
Go to last post Go to first unread
MS Support  
#1 Posted : Tuesday, November 5, 2019 5:39:29 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,934

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)

John Ehler's article, “RocketRSI – A Solid Propellant For Your Rocket Science Trading”, presented two variations on the standard RSI calculation. Below are the MetaStock formulas for these indicators:

MYRSI:

Code:
sml:= 8; {smooth length}
rsil:= 10; {RSI length}

{super smoother} a1:= Exp(-1.414 * 3.14159 / sml); b1:= 2*a1 * Cos(1.414*180 / sml); c2:= b1; c3:= -a1 * a1; c1:= 1 - c2 - c3; filt:= c1 * (C + Ref(C, -1))/2 + c2*PREV + c3*Ref(PREV,-1);

{RSI} change:= ROC(filt, 1, $); CU:= Sum(If(change > 0, change, 0), rsil); CD:= Sum(If(change < 0, Abs(change), 0), rsil); denom:= If(CU+CD = 0, -1, CU+CD); If(denom=-1, 0, (CU-CD)/denom)

RocketRSI:

Code:
sml:= 8; {smooth length}
rsil:= 10; {RSI length}

{super smoother} a1:= Exp(-1.414 * 3.14159 / sml); b1:= 2*a1 * Cos(1.414*180 / sml); c2:= b1; c3:= -a1 * a1; c1:= 1 - c2 - c3; rmom:= C-Ref(C, -(rsil-1)); filt:= c1 * (rmom + Ref(rmom, -1))/2 + c2*PREV + c3*Ref(PREV,-1);

{RSI} change:= ROC(filt, 1, $); CU:= Sum(If(change > 0, change, 0), rsil); CD:= Sum(If(change < 0, Abs(change), 0), rsil); denom:= If(CU+CD = 0, -1, CU+CD); myRSI:= If(denom=-1, 50, (CU-CD)/denom); limit:= If(myRSI>0.999, 0.999, If(myRSI<-0.999, -0.999, myRSI)); .5*Log((1+limit) / (1-limit))

Users browsing this topic
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.