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 : Friday, July 28, 2017 9:10:57 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 F. Ehlers' article, “Whiter is Brighter”, introduced his Universal Oscillator. The MetaStock code for this indicator is listed below: 

Universal Oscillator:

Code:
bandedge:= 20;
whitenoise:= (C - Ref(C,-2))/2;

{super smoother filter} a1:= Exp(-1.414 * 3.14159 / bandedge); b1:= 2*a1 * Cos(1.414*180 /bandedge); c2:= b1; c3:= -a1 * a1; c1:= 1 - c2 - c3; filt:= c1 * (whitenoise + Ref(whitenoise, -1))/2 + c2*PREV + c3*Ref(PREV,-1); filt1:= If(Cum(1) = 0, 0, If(Cum(1) = 2, c2*PREV, If(Cum(1) = 3, c2*PREV + c3*Ref(PREV,-1), filt)));

pk:= If(Cum(1) = 2, .0000001, If(Abs(filt1) > PREV, Abs(filt1), 0.991 * PREV)); denom:= If(pk=0, -1, pk); If(denom = -1, PREV, filt1/pk)

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.