OPEN-SOURCE SCRIPT
Updated Two Moving Average Cross

Choose two completely different moving averages and determine crossover points. Feel free to copy and paste the code into any strategy using MA crosses in order to optimize backtesting.
Release Notes
Added Arnaud Legoux and Least SquaresRelease Notes
Added smoothed MARelease Notes
Added Triple Exponential MARelease Notes
TEMA simplified by 4 linesRelease Notes
Cleaned up code, double and triple ema no longer calculate until they are called for. Added quadruple ema.Release Notes
Moved smoothed MA's into switch so they don't calculate until called.Release Notes
Changed Smoothed to Welles Wilder, found a new way to do the calculationRelease Notes
Added the Ehlers version of Kaufman's adaptive moving averageRelease Notes
Added option to choose timeframe. Repainting now removed by default.Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.