The MACD, Moving Average Convergence/Divergence is a widely used technical analysis indicator, developed by Gerald Appel.
The MACD line is calculated by taking the difference between a security's 26-bar and 12-bar exponential moving averages. The MACD formula in QuantShare is "macd()". You can also calculate the MACD of any other time-series by adding this time-series variable as a parameter to the MACD function. Example: "macd(open)"
The Moving Average Convergence/Divergence signal, which formula is "MacdSignal", is simply the exponential moving average of the MACD line, and the MACD histogram is the difference between the MACD line and the MACD signal line (Formula: MacdHist).
QuantShare allows you to control entirely how the MACD is calculated using three other functions (MacdExt, MacdExtSignal, MacdExtHist).
For example, the MacdExt formula accepts four parameters, which are the fast period, the fast moving average type (Simple, exponential, weighted... moving average), the slow period and the slow moving average type.