Rank:: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 9/12/2009(UTC) Posts: 7
|
I compared the weekly histogram , using the custom formula, utilizing daily data : https://www.metastock.co...ulas/formula.aspx?Id=32, with macd histogram in a normal weekly chart. They appear not the same. Can someone, please, help me in understanding why? Thanks in aadvance for your help. michmauro
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Michmauro
You cannot have an accurate “weekly” signal plotted on a daily chart unless the daily data is first broken down into weekly periods (frames). Simply multiplying the daily periods by 5 to get approximations of some or all of the weekly moving averages involved is not going to cut the mustard. To create an accurate weekly value on a daily chart I suggest you modify my “Multi-Frame D MACD” formula found at http://www.metastocktips.co.nz/multi_frame_d_macd.txt by changing the last two code lines from
R; {MACD}
Z; {Signal}
to
R - {MACD}
Z; {Signal}
This effectively changes the weekly output from “MACD; Signal;” to “MACD-Signal”. You will need the 188KB version of the Forum DLL installed in the appropriate folder for this formula to work. By the way, that folder is “External Function DLLs”.
Even the formula pointed to in the link above loses a little accuracy when plotted on, say, more than 20 years of daily data. However, a more sympathetic EMA DLL function as used in my intraday Multi-Frame formulas overcomes that problem as well.
Roy
|
|
|
|
Rank:: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 9/12/2009(UTC) Posts: 7
|
Roy,
thanks for your prompt answer.
Because I'am quite new to Metastock, please clairify these toints: 1./ Weekly MacdHistograms are exactly the same, when displayed on the same weekly chart only . “Multi-Frame D MACD” is different,when displayed on the daily chart, ; 2./What is and how EMA DLL function can be used to display weekly histogram on daily chart
Thanks again for your help. Best regards Michmauro
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Michmauro
After making my suggested changes to the “Multi-Frame D MACD” formula it will plot exactly the same line values as (Mov(C,12,E)-Mov(C,26,E))-Mov(Mov(C,12,E)-Mov(C,26,E)),9,E) on weekly charts. There are a number of ways you can check that this is so. Take the time to jot down values for the last few bars and then switch the chart to daily periodicity and read off the last few weekly values again. They will be the same.
Be aware that any indicator pulled down onto a chart from the drop-down menu will display as a line rather than a histogram, and you must manually change the style if you want it to plot as a histogram.
The MSTT DLL has a custom EMA function that allows the EMA value to be held constant for several bars (until the end of the week or month etc) and then be updated to the next weekly or monthly value. The exponential MOV function in the Forum DLL (as used by the above formula) achieves the “hold constant” action by using a very large Periods parameter. X:=ExtFml("Forum.MOV",K,If(J,12,10000000),E); This method of plotting new weekly EMA values on a daily chart is good enough for most purposes but not perfect. Increasing the number of zeros in the If() function increases the accuracy.
Roy
|
|
|
|
Rank:: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 9/12/2009(UTC) Posts: 7
|
Roy,
thanks for your inputs.
Michmauro
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 11/12/2008(UTC) Posts: 7
|
Hi Roy
Can u give us the weekly MACD Histogram formula ?
Rgds
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Alvin
There are two Multi-Frame MACD formulas set up for plotting weekly MACD and signal line on EOD charts at http://www.metastocktips...z/multi_frame_d_macd.txt . You'll need the MSTT DLL (created by Wabbit and only available from me) for the first formula to run and return a 100% accurate result, assuming suffient data is loaded. The second formula only uses the Forum DLL and therefore cannot calculate exactly the same MACD ratios as the first or the MACD() function. Hope this helps.
Roy
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 11/12/2008(UTC) Posts: 7
|
Hi Roy
Thks for the quickreply & the formula.Do we need to subcribe for the MSTT.DLL from you ? Is it pay to your web site?Would like to know more on the MSTT.DLL .Pls adv
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 11/12/2008(UTC) Posts: 7
|
Hi Roy
Trouble u again.Tried your version & got the error message on the following lines for the ExtFml formulas.Do I missed somethings to creat this ?
{MACD and Signal}
X:=ExtFml("Forum.Mov",K,If(J,12,Pwr(10,10)));
Y:=ExtFml("Forum.Mov",K,If(J,26,Pwr(10,10)));
R:=X-Y;
Z:=ExtFml("Forum.Mov",R,If(J,N,Pwr(10,10)));
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Alvin
You need the 188KB Forum DLL from the files section of this site installed in the "External Function DLLs" folder under "MetaStock". It's listed with a slightly different name in the files section but will be obvious because of the size of the file. You need to rename or copy the DLL so that you have "Forum.DLL" installed (several copies with different names will happily reside in the same folder).
There's a nominal charge for the MSTT DLL but it won't break the bank. Get the Forum DLL version working before moving on to the MSTT DLL version. Send me an email if you want to follow through with it.
Roy
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 11/12/2008(UTC) Posts: 7
|
Hi Roy
Thks for the reply.Imanaged to get this working by modifying its to :X:=ExtFml("Forum.Mov",K,If(J,12,Pwr(10,10)),E);
Y:=ExtFml("Forum.Mov",K,If(J,26,Pwr(10,10),E));
R:=X-Y;
Z:=ExtFml("Forum.Mov",R,If(J,N,Pwr(10,10),E));
Hope this is correct .Appreciate your assistance.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
|
|
|
|
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.