[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Weighted MA



PureBytes Links

Trading Reference Links

Does WMA(C,3) give you the same anmswer?

Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia


-----Original Message-----
From: lazza [mailto:firstpacific@xxxxxxxxxx] 
Sent: Monday, 16 June 2003 2:16 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Weighted MA


Can anyone please help me with this indicator.

I want to plot a weighted moving average

e.g. fwma(3 period Close)= (C+2(Ref(C,-1))/3+1(Ref(C,-2))/3)/3 or 
(Close(today) + 2/3xClose(yesterday) + 1/3xClose(two days ago)) 
divided by three;

(see fwma, below) but would like to be able to to do it by just 
putting in the time period rather than doing these calculations 
manually and can't figure out how to program it. Could be a bit time 
consuming if I wanted to do a 200 period fwma. In the case below the 
period is 12.

The WMA function in Amibroker gives a different result than my fwma.

Many thanks if you can help.

Larry.

fn1=ROC(C,T1);

fwma=(fn1+11*(Ref(fn1,-1))/12+10*(Ref(fn1,-2))/12+9*(Ref(fn1,-
3))/12+8*(Ref(fn1,-4))/12+7*(Ref(fn1,-5))/12+6*(Ref(fn1,-6))/12+5*(Ref
(fn1,-7))/12+4*(Ref(fn1,-8))/12+3*(Ref(fn1,-9))/12+2*(Ref(fn1,-
10))/12+(Ref(fn1,-11))/12)/12;



------------------------ Yahoo! Groups Sponsor ---------------------~--> Get
A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/