Buy - MACD crosses over signal line
Sell - MACD crosses below signal line
Parameters available:
Short Period - the number of periods used for the period of the short-term moving average in the MACD calculation
Long Period - the number of periods used for the period of the long-term moving average in the MACD calculation
Signal Period - the number of periods used for EMA calculation of MACD which constitutes the signal line
x(%) - the minimum distance between the MACD line and the signal line item t - the maximum number of periods that x occurs
Rule type - please refer to 140 for details
Data type - please refer to 141 for details
Setting for Short,Long and Signal Periods
Your choice of MA periods largely depends on your investment horizon. The typical settings for MACD are 12-day, 26-day and 9-day for Signal Period. You can interpret the crossing of the faster MACD line to its slower MACD line as strength in momentum (rate of change) of recent price action. The concept is similar to that of Dual MA crossover but the focus is on rate of change in price rather than the movement of price itself.
Setting for x
Since x is the minimum distance between MACD and the signal line, a small x would therefore returns you “weak" triggers or triggers with high possibility of whipsaws (refer to figure below). You want to set a larger value of x which can be interpret as stronger crossover signal. Also, settings for x and t work closely together. For example, you can set a higher x with shorter t to screen for signal with stronger momentum.
Setting for t
t can also act as a confirmation of the MACD crossover to avoid screening noisy crossovers especially when you set a low x.