INVITE-ONLY SCRIPT
已更新 Profitable Moving Average Crossover

Hi everyone!
Introduction
A popular use for moving averages is to develop simple trading systems based on moving average crossovers. A trading system using two moving averages would give a buy signal when the shorter (faster) moving average advances above the longer (slower) moving average. A sell signal would be given when the shorter moving average crosses below the longer moving average. The speed of the systems and the number of signals generated will depend on the length of the moving averages.
There are many types of averages that are based on different techniques. Each type has its drawbacks and merits. And if we decide to choose a certain type of average for the trading system, then how do we know that our choice is optimal?
What is this tool?
This tool will help you to choose this type to create the most profitable trading system based on crossovers for the specified periods. It backtests pairs of each type throughout the whole instrument's history and shows Net Profit curves as a result. So, the type of the most profitable crossover system will be at the top of list of labels on the chart. (Click on the price scale, point to "Labels" and switch off "No Overlapping Labels" option).
Settings
The main settings are periods for each type pair of fast and slow moving averages.
Additionally, it allows to customize some multi-parametric moving averages such as JMA, ALMA, McGinley Dynamic, Adaptive Laguerre Filter etc.
Supported types of averages and filters (use short titles to match averages on the chart)
NOTE: The results may vary on different tickers and timeframes.
If you see the preview result it doesn't mean that these crossovers will be profitable on other instruments and timeframes. This is a normal situation because time series and their characteristics differ.
I know that because I tested this tool before publishing.
NOTE 2: You can use this tool by yourself and experiment with it, or you can order a study and I will share the spreadsheet that contains results with you.
Good luck!
Introduction
A popular use for moving averages is to develop simple trading systems based on moving average crossovers. A trading system using two moving averages would give a buy signal when the shorter (faster) moving average advances above the longer (slower) moving average. A sell signal would be given when the shorter moving average crosses below the longer moving average. The speed of the systems and the number of signals generated will depend on the length of the moving averages.
There are many types of averages that are based on different techniques. Each type has its drawbacks and merits. And if we decide to choose a certain type of average for the trading system, then how do we know that our choice is optimal?
What is this tool?
This tool will help you to choose this type to create the most profitable trading system based on crossovers for the specified periods. It backtests pairs of each type throughout the whole instrument's history and shows Net Profit curves as a result. So, the type of the most profitable crossover system will be at the top of list of labels on the chart. (Click on the price scale, point to "Labels" and switch off "No Overlapping Labels" option).
Settings
The main settings are periods for each type pair of fast and slow moving averages.
Additionally, it allows to customize some multi-parametric moving averages such as JMA, ALMA, McGinley Dynamic, Adaptive Laguerre Filter etc.
- 1st Period (default: 14)
- 2nd Period (default: 50)
- 1st ALF Median Length (default: 5)
- 2nd ALF Median Length (default: 5)
- 1st ALMA Offset (default: 0.85)
- 1st ALMA Sigma (default: 6)
- 2nd ALMA Offset (default: 0.85)
- 2nd ALMA Sigma (default: 6)
- 1st HF Scaling Factor (default: 3)
- 2nd HF Scaling Factor (default: 3)
- 1st JMA Phase (default: 50)
- 2nd JMA Phase (default: 50)
- 1st MD Constant (default: 0.6)
- 2nd MD Constant (default: 0.6)
- 1st MHLMA Range (default: 10)
- 2nd MHLMA Range (default: 10)
- 1st PWMA Power (default: 2)
- 2nd PWMA Power (default: 2)
- 1st REMA Lambda (default: 0.5)
- 2nd REMA Lambda (default: 0.5)
- 1st RMF Median Length (default: 5)
- 2nd RMF Median Length (default: 5)
- 1st T3 Alpha (default: 0.7)
- 2nd T3 Alpha (default: 0.7)
- MAMA & FAMA Fast Limit (default: 0.5)
- MAMA & FAMA Slow Limit (default: 0.05)
Supported types of averages and filters (use short titles to match averages on the chart)
- AHMA, Ahrens MA (by Richard D. Ahrens)
- ALMA, Arnaud Legoux MA (by Arnaud Legoux and Dimitris Kouzis-Loukas)
- ALF, Adaptive Laguerre Filter (by John F. Ehlers)
- ARSI, Adaptive RSI
- BF2, Butterworth Filter with 2 poles
- BF3, Butterworth Filter with 3 poles
- DEMA, Double Exponential MA (by Patrick G. Mulloy)
- DWMA, Double Weighted (Linear) MA
- EDCF, Ehlers Distance Coefficient Filter (by John F. Ehlers)
- EHMA, Exponential Hull MA
- EMA, Exponential MA
- EVWMA, Elastic Volume Weighted MA (by Christian P. Fries)
- FRAMA, Fractal Adaptive MA (by John F. Ehlers)
- GF1, Gaussian Filter with 1 pole
- GF2, Gaussian Filter with 2 poles
- GF3, Gaussian Filter with 3 poles
- GF4, Gaussian Filter with 4 poles
- HFSMA, Hampel Filter on Simple Moving Average
- HFEMA, Hampel Filter on Exponential Moving Average
- HMA, Hull MA (by Alan Hull)
- HWMA, Henderson Weighted MA (by Robert Henderson)
- IDWMA, Inverse Distance Weighted MA
- IIRF, Infinite Impulse Response Filter (by John F. Ehlers)
- JMA, Jurik MA (by Mark Jurik, https://www.tradingview.com/script/714vYiDe-Jurik-Moving-Average/)
- LF, Laguerre Filter (by John F. Ehlers)
- LMA, Leo MA (by ProRealCode' user Leo)
- LSMA, Least Squares MA (Moving Linear Regression)
- MAMA & FAMA, (by John F. Ehlers, special case that used as a benchmark)
- MD, McGinley Dynamic (by John R. McGinley)
- MHLMA, Middle-High-Low MA (by Vitali Apirine)
- PWMA, Parabolic Weighted MA
- REMA, Regularized Exponential MA (by Chris Satchwell)
- RMA, Running MA (by J. Welles Wilder)
- RMF, Recursive Median Filter (by John F. Ehlers)
- RMTA, Recursive Moving Trend Average (by Dennis Meyers)
- SHMMA, Sharp Modified MA (by Joe Sharp)
- SMA, Simple MA
- SSF2, Super Smoother Filter with 2 poles (by John F. Ehlers)
- SSF3, Super Smoother Filter with 3 poles (by John F. Ehlers)
- SWMA, Sine Weighted MA
- TEMA, Triple Exponential MA (by Patrick G. Mulloy)
- TMA, Triangular MA (generalized by John F. Ehlers)
- T3, (by Tim Tillson)
- VIDYA, Variable Index Dynamic Average (by Tushar S. Chande)
- VWMA, Volume Weighted MA (by Buff P. Dormeier)
- WMA, Weighted (Linear) MA
- ZLEMA, Zero Lag Exponential MA (by John F. Ehlers and Ric Way)
NOTE: The results may vary on different tickers and timeframes.
If you see the preview result it doesn't mean that these crossovers will be profitable on other instruments and timeframes. This is a normal situation because time series and their characteristics differ.
I know that because I tested this tool before publishing.
NOTE 2: You can use this tool by yourself and experiment with it, or you can order a study and I will share the spreadsheet that contains results with you.
Good luck!
發行說明
- Now it uses "Early Switch" version of the algorithm
- Added an alert to notify when the most profitable crossover type changed
- Made minor optimizations
發行說明
- Fixed bug with periods <= 2
- Added new moving averages
- SHMMA (Sharp Modified Moving Average) was removed due to too much similarity to LSMA
New Moving Averages:
- AEMA, Adaptive Exponential MA (by Vitali Apirine)
- AMA, Adaptive MA (by Vitali Apirine)
- BAMA, Bryant Adaptive MA (by Michael R. Bryant)
- EDSMA, Ehlers Deviation-Scaled MA (by John F. Ehlers)
- JAMA, Jurik Adaptive MA (by Mark Jurik)
- KAMA, Kaufman Adaptive MA (by Perry J. Kaufman)
- MNMA, McNicholl MA (by Dennis McNicholl)
- NSMA, Moving Average 3.0 on SMA (by Manfred G. Dürschner)
- NEMA, Moving Average 3.0 on EMA (by Manfred G. Dürschner)
- NWMA, Moving Average 3.0 on WMA (by Manfred G. Dürschner)
- NVWMA, Moving Average 3.0 on VWMA (by Manfred G. Dürschner)
- PEMA, Pentuple Exponential MA (by Bruno Pio)
- QMA, Quick MA (by John McCormick)
- QEMA, Quadruple Exponential MA (by Bruno Pio)
The total number of MA crossovers on test is 60 now
發行說明
- Security update
發行說明
- Security update
發行說明
- Security update
發行說明
- Added optimization fixes
- Security update
發行說明
- Update
發行說明
- Update
發行說明
- Update
發行說明
- Bump Pine Script version to 4
發行說明
- Pine Script V6
- Added table with results
- Added automatic sorting of results
- Added automatic display of the best crossovers
- Refactoring
發行說明
- Added short names of moving averages to the table
僅限邀請腳本
只有經作者授權的使用者才能訪問此腳本,且通常需付費。您可以將此腳本加入收藏,但需先向作者申請並獲得許可後才能使用 — 點擊此處了解更多。如需更多詳情,請依照作者說明或直接聯繫everget。
除非您完全信任其作者並了解腳本的工作原理,否則TradingView不建議您付費或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
If you have any questions, feel free to ask them and contact me via private messages on TradingView or via Telegram @alex_everget
提醒:在請求訪問權限之前,請閱讀僅限邀請腳本指南。
Coding services -> Telegram: @alex_everget
A list of FREE indicators:
bit.ly/2S7EPuN
A list of PAID indicators:
bit.ly/33MA81f
Earn $15:
tradingview.com/pricing/?share_your_love=everget
A list of FREE indicators:
bit.ly/2S7EPuN
A list of PAID indicators:
bit.ly/33MA81f
Earn $15:
tradingview.com/pricing/?share_your_love=everget
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
僅限邀請腳本
只有經作者授權的使用者才能訪問此腳本,且通常需付費。您可以將此腳本加入收藏,但需先向作者申請並獲得許可後才能使用 — 點擊此處了解更多。如需更多詳情,請依照作者說明或直接聯繫everget。
除非您完全信任其作者並了解腳本的工作原理,否則TradingView不建議您付費或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
If you have any questions, feel free to ask them and contact me via private messages on TradingView or via Telegram @alex_everget
提醒:在請求訪問權限之前,請閱讀僅限邀請腳本指南。
Coding services -> Telegram: @alex_everget
A list of FREE indicators:
bit.ly/2S7EPuN
A list of PAID indicators:
bit.ly/33MA81f
Earn $15:
tradingview.com/pricing/?share_your_love=everget
A list of FREE indicators:
bit.ly/2S7EPuN
A list of PAID indicators:
bit.ly/33MA81f
Earn $15:
tradingview.com/pricing/?share_your_love=everget
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。