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

Notification

Icon
Error

Options
Go to last post Go to first unread
Asimov  
#1 Posted : Friday, October 27, 2006 7:41:59 AM(UTC)
Asimov

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/18/2006(UTC)
Posts: 16

In Metastock 9.1 I have found this default function for an adaptive MA but as u can see is very complex:

If(Cum(1)=5,Ref(C,-1)+(Pwr((Abs((C-Ref(C,-4))/Sum(Abs(ROC(C,1,$)),4)))*((2/3)-(2/31))+(2/31),2))*(C-Ref(C,-1)),PREV+(Pwr((Abs((C-Ref(C,-4))/Sum(Abs(ROC(C,1,$)),4)))*((2/3)-(2/31))+(2/31),2))*(C-PREV))

I have understand only that it starts after 5 observations thanks to "if(cum(1)=5) LOL

Can anyone else help me to understand how it is calculated?

wabbit  
#2 Posted : Friday, October 27, 2006 7:44:28 PM(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)
I have seen this formula before... and personally I do NOT like it!

Where do the these contstants come from? Can they be proved, or were they just added to make the function fit the chart?

Anyway... to solve your understanding problem, re-write the formula on a piece of paper but writing it in a format YOU will understand. Take the contents of the innermost set of brackets and 'evaluate' each expression and see what you come up with.

Here's mine:



Hope it helps.

wabbit [:D]
wabbit attached the following image(s):
ma_code.jpg
wabbit  
#3 Posted : Friday, October 27, 2006 7:54:36 PM(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)
uasish  
#4 Posted : Saturday, October 28, 2006 12:08:05 AM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times

Wabbit,

Now i understand (seeding) why Jose always uses Cum. Lots of things to learn through

this forum.

Asish

wabbit  
#5 Posted : Saturday, October 28, 2006 3:56:13 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)
Asimov,

Just whilst I am thinking about...

Can you please try to include the source of any code you post and any acknowledgements. Not only does this avoid copyright issues, it is a courtesy to the original author who has freely published their works for us to use and makes it easier to track down any known issues.

The code you posted was originally written by Perry J. Kaufman and is often known as the "Kaufman Adaptive Moving Average" and we acknowledge his works (whether we agree with them or not [;)] )

See more of his work at http://www.perrykaufman.com/
Asimov  
#6 Posted : Tuesday, October 31, 2006 3:55:59 AM(UTC)
Asimov

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/18/2006(UTC)
Posts: 16

Thanks all for the answers!!! And i am sorry if i violated copyright rules!

By the way, i modified this adaptive MA so that i can choose the period... i found it has a nice effect: in non-trend periods this MA is almost costant and doesn't fluctuate following the cycles...

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.