in Search

Question on MACD Histogram

Last post 09-18-2009, 12:58 by michmauro. 4 replies.
Sort Posts: Previous Next
  •  09-12-2009, 14:57 30693

    Question on MACD Histogram

    I compared the weekly histogram , using the custom formula, utilizing daily data : http://www.equis.com/customer/resources/formulas/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


  •  09-12-2009, 18:42 30694 in reply to 30693

    Re: Question on MACD Histogram

    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

  •  09-13-2009, 8:24 30710 in reply to 30694

    Re: Question on MACD Histogram

    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
     
  •  09-13-2009, 14:14 30714 in reply to 30710

    Re: Question on MACD Histogram

    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

  •  09-18-2009, 12:58 30757 in reply to 30714

    Re: Question on MACD Histogram

    Roy,

    thanks for your inputs.

    Michmauro
View as RSS news feed in XML