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 : Wednesday, August 13, 2025 8:50:05 PM(UTC)
MS Support

Rank: Advanced Member

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

Thanks: 95 times
Was thanked: 159 time(s) in 154 post(s)

John F. Ehlers’ article, “The Ultimate Oscillator”, introduced his indicator of the same name. Here is the formula to add that indicator to MetaStock. 

The Ultimate Oscillator Indicator:

Code:
{Ultimate Oscillator Indicator}
Len:= 20;
Bandwidth:= 2;
a1:= exp(-1.414*3.14159 / (Len*Bandwidth));
b1:= 2*a1*Cos(1.414*180 / (Len*Bandwidth));
c1:= -a1*a1;
x1:= (1 + b1 - c1) / 4;
HP1:= x1*(C - Ref(2*C,-1) + Ref(C, -2)) + b1*Prev + c1*Ref(Prev, -1);

a2:= exp(-1.414*3.14159 / Len); b2:= 2*a2*Cos(1.414*180 / Len); c2:= -a2*a2; x2:= (1 + b2 - c2) / 4; HP2:= x2*(C - Ref(2*C,-1) + Ref(C, -2)) + b2*Prev + c2*Ref(Prev, -1);

sig:= HP1 - HP2; RMS:= sqrt( Sum( C * C, 100)/ 100 ); sig / RMS

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.