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?
|
|
|
|
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):
|
|
|
|
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: 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
|
|
|
|
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/
|
|
|
|
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.