Charts See the terminal

EMA 20/50 Crossover with ATR Stop

Goes long when the 20 EMA crosses above the 50 EMA and short when it crosses below, with a stop and a target set from ATR.

Live BTC/USDT preview on Binance. To see the crossover, add two EMAs and set their lengths to 20 and 50.

How the strategy works

RuleHow it works
Long entryThe 20 EMA closes above the 50 EMA on a confirmed bar.
Short entryThe 20 EMA closes below the 50 EMA on a confirmed bar.
ReversalAn opposite cross closes the current position before opening the new one. The strategy is never long and short at once and never adds to a position.
Stop2 x ATR(14) from the entry price.
Target3 x ATR(14) from the entry price. Stop and target are set when the trade opens.
ExitWhichever comes first: stop, target or an opposite cross.
Position size100% of the simulated account per trade, one position at a time.

There is no trend, volume or session filter, so the strategy takes every cross, including those in sideways markets.

When signals fire

  • Signals are confirmed on bar close. A cross that appears mid-bar and disappears before the close does not open a trade.
  • Backtests fill orders at the close of the signal bar. Live market orders fill after the close, at the next available price, so live results can differ.

Backtest assumptions

SettingDefaultNote
Initial capital10,000 In the quote currency of the market tested
Size per trade100% of equity One position at a time
Pyramiding1 One open entry per direction
Commission0.1% per order Binance spot taker fee at the base tier
Slippage1 tick A minimal estimate for market orders
Fill timingBar close Orders fill at the close of the signal bar

You can change all of these in the backtest settings.

Settings

InputDefaultRange
Fast EMA length20 1 to 400
Slow EMA length50 1 to 400
ATR length14 1 to 100
ATR stop multiplier2 0.1 to 10
ATR target multiplier3 0.1 to 20
Equity per trade (%)100 1 to 100

Backtest results

Backtest results for this strategy are coming soon. They will show the market, timeframe, date range and assumptions used.

Past performance does not guarantee future results.

Risks and limitations

  • Short trades need margin or futures. On a spot account you can only run the long side.
  • Crossovers lag price, and sideways markets produce repeated false signals.
  • Bar-close fills in backtests are more favourable than live market orders.
  • This strategy is a starting point, not financial advice. Test it on paper before trading live.

How to use it in Altrady

  1. Sign in to your Altrady account to run strategies. Sign in
  2. Adjust the settings and backtest assumptions to your market.
  3. Run a backtest and review the results.
  4. Paper trade, then connect it to a Signal Bot when you are ready.

Frequently asked questions

It is a trend-following approach that uses two exponential moving averages of different lengths. When the faster average crosses above the slower one, recent prices have overtaken the longer trend and the strategy goes long; when it crosses below, it goes short. This one uses a 20 and a 50.

ATR measures how far the market has been moving per bar, so a stop set as a multiple of it adapts to conditions. The same 2 x ATR stop sits wider in a volatile market and tighter in a quiet one, where a fixed percentage would be too tight in the first case and too loose in the second.

Only the long side. Short entries mean selling a coin you do not hold, which needs a margin or futures account. On spot you can trade the long signals and ignore the short ones, which changes the results.

Yes. Fast EMA length defaults to 20 and Slow EMA length to 50, and both accept 1 to 400. The ATR length and the stop and target multipliers are adjustable too. Test a change rather than assuming a shorter pair signals better.

No. Signals are read only on confirmed bars, so a cross that forms mid-bar and disappears before the close never opens a trade, and a signal on a closed bar is not revised afterwards.

Backtesting runs in the Altrady terminal and needs an account. Sign in, open the strategy, set the market and timeframe you want to test, adjust the assumptions listed on this page, then run the backtest and review the results.

Open in terminal