> For the complete documentation index, see [llms.txt](https://docs.itradingbot.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.itradingbot.net/en/signals-and-strategy-conditions/indicators/moving-average.md).

# Moving Average

<mark style="color:$tint;">In the ISignal constructor, the Sq. average indicator forms a signal when the price and the selected moving average are crossed. It can be used for entrance and exit. The article describes these two roles; the filter is adjusted separately on the moving average.</mark>

### Select the type of middle

<mark style="color:$tint;">Add the indicator to the desired constructor block and select Type:</mark>

* <mark style="color:$tint;">**SMA**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">is a simple average closing price.</mark>
* <mark style="color:$tint;">**EMA**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">Exponential average closing prices.</mark>
* <mark style="color:$tint;">**Wilder's Moving Average**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">smoothed average of Wilder.</mark>
* <mark style="color:$tint;">**VWMA**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">average closing prices with weights per trading volume.</mark>
* <mark style="color:$tint;">The MRC (FOMO) average smoothed typical price calculated from the maximum, minimum and bar closing prices.</mark>

<mark style="color:$tint;">For normal types, let's say</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">**The period**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">is from 5 to 200 bars. For the MRC (FOMO) Medium line, the period should be 200. The new card default is SMA with a period of 100; this is the original form value, not the recommendation.</mark>

### Set the data and the time of calculation

<mark style="color:$tint;">The instrument is out of the question. Select</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">**The TF**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">from the list of current shape and</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">**Type of candle**</mark><mark style="color:$tint;">s: regular or Heiken Ashi. The period refers to the bars of the chosen timeframe.</mark>

<mark style="color:$tint;">Select</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">**Calculation**</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">in the Bar Closing or Intersection (secondly). The second mode checks the bar that is forming, so the signal before the bar closes may differ from the check result of the closed bar.</mark>

### How to determine the direction

<mark style="color:$tint;">When the Reverse is turned off, the following conditions apply:</mark>

* <mark style="color:$tint;">Long signal: the closing price was lower than average, but now it's at or above average.</mark>
* <mark style="color:$tint;">Shortcut: The closing price used to be above average, but now it's at or below average.</mark>

<mark style="color:$tint;">Just finding a price on one side of the line is not a new intersection. The Reverse Switch switches the long and short signals.</mark>

### Use the signal to enter or exit

<mark style="color:$tint;">In the entrance block, the long signal is suitable for the long task, the short is short. Additionally, the rest of the task and the robot must be allowed in.</mark>

<mark style="color:$tint;">In the exit block without a reverse, the short signal serves as a condition for closing the long, the long as a condition for closing the short. The action is set in the field</mark> <mark style="color:$tint;"></mark><mark style="color:$tint;">**When the signal is received**</mark><mark style="color:$tint;">. The deviation mode depends on the configuration and type of robot; it does not guarantee profitable execution.</mark>

<mark style="color:$tint;">Keep the card, check its role and parameters in the task. The storage, exit and limitation procedures are described in</mark> [<mark style="color:$tint;">The ISignal instructions</mark>](/en/signals-and-strategy-conditions/isignal-entry-filters-and-exit.md)<mark style="color:$tint;">. The indicator signal doesn't confirm the order has been executed.</mark>
