Systemicbeta

EMA crossover

Two moving averages of the same price, one fast and one slow. When the fast one climbs above the slow one, the trend may be turning up; when it drops below, down. This guide builds the two signals and charts them next to the price.

New to the editor? Do Getting started first.

The idea

An exponential moving average (EMA) smooths a price by averaging it over a window of bars, with the latest bars counting most. A short window follows the price closely. A long one moves slowly.

Move the sliders to see how the two windows change the signals.

▲ 2 up and ▼ 3 down in 200 bars of sample prices, the grey line. In the shaded first 25 bars the slow EMA has no value yet.

Short windows react fast and cross often, including on noise. Long windows cross rarely and late. Common pairs:

FastSlowCharacter
921Reactive, many signals
1226The pair used by MACD
50200Slow, only major trend changes
The formula

With a window of nn bars the smoothing factor is α=2/(n+1)\alpha = 2/(n+1), and each bar updates the average:

EMAt=α⋅pt+(1−α)⋅EMAt−1\text{EMA}_t = \alpha \cdot p_t + (1 - \alpha) \cdot \text{EMA}_{t-1}

where ptp_t is the price at bar tt. The first n−1n - 1 bars have no value.

Build it

Start from a strategy with a Cryptocurrency module, which the Crypto template gives you. Reusing your first strategy? Delete the modules you no longer need: click each one and press Delete. Then follow the three steps.

CryptocurrencySymbol BTC/USDTPeriod 1dOpenHighLowCloseVolumeEMA (fast)PriceWindow 12EMAEMA (slow)PriceWindow 26EMA(Bullish) CrossOverFirst DatasetSecond DatasetCrossOver(Bearish) CrossUnderFirst DatasetSecond DatasetCrossUnder
1
Price

On the Cryptocurrency module, set Symbol to BTC/USDT and Period to 1d.

Save. The two red outputs are the signals:

OutputIs true on the bar where
CrossOverthe fast EMA moves above the slow EMA
CrossUnderthe fast EMA moves below the slow EMA

On every other bar they are false. They are empty at the start, while the slow EMA has no value yet.

Chart it

Add three charts on the dashboard:

  1. A Candlestick chart of the Cryptocurrency module, to see the price.
  2. A Line chart with the EMA output of both EMA modules, to see where they cross.
  3. A Bar chart with the CrossOver and CrossUnder outputs. A signal draws as 1 when true, so a bar marks every cross.

With Auto-execute on, each new chart starts a run. The slow EMA is empty for its first 25 bars, so set the start date a month or two before the dates you want to study.

An AI assistant can put all of it in one chart: candles, both EMAs and an arrow on every cross.

What the result tells you

A crossover is a description of the past, not a forecast. Moving averages do well in long trends and badly in sideways markets, where the two lines cross back and forth. Look at how many signals a run gives and what the price did after each one before you trust a pair of windows.

© 2026 WanoLabs. All rights reservedBeta v0.1.5