Technical Studies Reference

MACD Crossover System

This study displays signals to buy (indicated by an "up" arrow) or sell (indicated by a "down" arrow) at Index $$t$$. To familiarize yourself with the terminology, notation, and Inputs used in this study, refer to the documentation for the MACD study.The conditions that determine which signal, if any, is displayed are stated below.

Let the High Price and Low Price at Index $$t$$ be denoted as $$H_t$$ and $$L_t$$, respectively, and we let the Input Arrow Offset Percentage be denoted as $$k$$.

For $$t > \max\{n_S,n_F\} + n_M$$:

• A Buy Signal is indicated by an Up Arrow at Index $$t$$ if the Subgraph of $$MACD_t(X,n_F,n_S)$$ crosses the Subgraph of $$\overline{MACD}_t(X,n_F,n_S,n_M)$$ from below at $$t$$. That is, a Buy Signal at $$t$$ satisfies the conditions $$MACD_{t - 1}(X,n_F,n_S) < \overline{MACD}_{t - 1}(X,n_F,n_S,n_M)$$ and $$MACD_t(X,n_F,n_S) > \overline{MACD}_t(X,n_F,n_S,n_M)$$. The vertical coordinate of the tip of the arrow is given by $$L_t - \frac{k}{100}\cdot\left(H_t - L_t\right)$$.
• A Sell Signal is indicated by a Down Arrow at Index $$t$$ if the Subgraph of $$MACD_t(X,n_F,n_S)$$ crosses the Subgraph of $$\overline{MACD}_t(X,n_F,n_S,n_M)$$ from above at $$t$$. That is, a Sell Signal at $$t$$ satisfies the conditions $$MACD_{t - 1}(X,n_F,n_S) > \overline{MACD}_{t - 1}(X,n_F,n_S,n_M)$$ and $$MACD_t(X,n_F,n_S) < \overline{MACD}_t(X,n_F,n_S,n_M)$$. The vertical coordinate of the tip of the arrow is given by $$H_t + \frac{k}{100}\cdot\left(H_t - L_t\right)$$.