OPEN-SOURCE SCRIPT

Moving Averages With Cross Alerts

By bstashio
A simple way to add up to 5 moving averages with optional crossover/crossunder alerts.


Available options for Moving Average Type are:
  • SMA
  • EMA (default)
  • HMA
  • RMA
  • WMA
  • VWMA
  • VWAP
  • ALMA



By default, 5 moving averages are enabled and set to the following:
  • MA1 set to 5
  • MA2 set to 13
  • MA3 set to 50
  • MA4 set to 200
  • MA5 set to 800



Each moving average has the following options:
  • Enable/Disable
  • Source (default is close)
  • Length
  • Color
alertcrossovercrossunderCryptocurrencycryptotradingdowntrendExponential Moving Average (EMA)Moving AveragesSimple Moving Average (SMA)uptrend

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer