HayeTrading

MASelect Crossover Strat

Basic Crossover Strategy for backtesting purposes, to use with the study+alert script.

Use "Format" to change your settings. Both Moving Averages can be changed individually to swap between EMA (Exponential Moving Average), SMA (Simple Moving Average), WMA (Weighted Moving Average), DEMA (Double Exponential Moving Average) and VWMA (Volume Weighted Moving Average).

"Active Length" should be shorter than "Base Length". As usual with crossover strategies, candle resolution will affect results greatly. Longer=better.

Strategy options are "Long+Short" or "Long Only".

Entries/Exits are based on crossovers/crossunders only, but I encourage you to add further exit conditions and play around with the code.

I made this for beginners on Autoview discord to have something to play with, and added some unnecessary visual changes just to give code examples (changing things like background color, candle color, line color, plotting shapes, different plot styles).

Play around combining different types of Moving Averages of different lengths.

discord.gg/mFYvr2bGtu - FREE Trading Chat Rooms
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?