MACD(x, nFast=12, nSlow=26, nSig=9, maType="EMA", percent=TRUE, ...)TRUE, the percentage difference between the fast and slow moving
    averages is returned, otherwise the difference between the respective averages is returned.maType function in case (1) above.EMA, SMA, etc. for moving average options; and note Warning
  section.data(ttrc)
  macd  <- MACD( ttrc[,"Close"], 12, 26, 9, maType="EMA" )Run the code above in your browser using DataLab