# Technical Studies Reference

## Moving Average Crossover

This study displays two moving averages, whose types are chosen by the user with the Inputs Moving Average Type 1 and Moving Average Type 2. By default, both moving averages are Simple Moving Averages. The Inputs Input Data 1 and Input Data 2 are denoted as $$X_1$$ and $$X_2$$, respectively, and the Inputs Length 1 and Length 2 of these two moving averages are denoted as $$n_1$$ and $$n_2$$, respectively.

This study also displays signals to buy (indicated by an "up" arrow) or sell (indicated by a "down" arrow) at chart bar $$t$$. The conditions that determine which signal, if any, is displayed are stated below.

An "up" arrow is displayed at chart bar $$t$$ if either of the following occurs.

• $$n_1 < n_2$$ and the Subgraph of $$SMA_t\left(X_1,n_1\right)$$ crosses the Subgraph of $$SMA_t\left(X_2,n_2\right)$$ from below at chart bar $$t$$.
• $$n_2 < n_1$$ and the Subgraph of $$SMA_t\left(X_2,n_2\right)$$ crosses the Subgraph of $$SMA_t\left(X_1,n_1\right)$$ from below at chart bar $$t$$.

In each of the above two cases, the tip of the arrow coincides with the bottom of chart bar $$t$$.

A "down" arrow is displayed at chart bar $$t$$ if either of the following occurs.

• $$n_1 > n_2$$ and the Subgraph of $$SMA_t\left(X_1,n_1\right)$$ crosses the Subgraph of $$SMA_t\left(X_2,n_2\right)$$ from below at chart bar $$t$$.
• $$n_2 > n_1$$ and the Subgraph of $$SMA_t\left(X_2,n_2\right)$$ crosses the Subgraph of $$SMA_t\left(X_1,n_1\right)$$ from below at chart bar $$t$$.

In each of the above two cases, the tip of the arrow coincides with the top of chart bar $$t$$.

Note: Depending on the setting of the Inputs Moving Average Types 1 and 2, the Simple Moving Averages in the above paragraphs could be replaced with Exponential Moving Averages, Linear Regression Moving Averages, Weighted Moving Averages, Wilders Moving Averages, Simple Moving Averages - Skip Zeros, or Smoothed Moving Averages.