vitelot

MA cross strategy Vts

vitelot Updated   
The simple Moving average cross strategy is here implemented.
I guess there are multitudes of similar scripts around.
I post this one since I was asked by some friends, and I'll let it free to use for anybody.
Here you can choose the year where to start backtesting, the source, the type of MA, the SL and TP multiplicators of ATR, for which you can also choose the averaging period.
Feel free to modify this script. I would be grateful if you could preserve the first lines of comments including my user names.
The MA cross strategies can be very effective, especially when used on the daily TF.
Try for example the combo EMA15-EMA30 SL=1.5ATR TP=1ATR on EURCHF daily to get an impressive 83% win ratio.
Or EMA20-EMA81 on the GBPCHF to get an 87%.
In those cases where EMA does not perform well, try to set a less lagging MA, like the Hull MA.
I hope you like this script so that you could push the like button multiple (odd) times and you start following me.
I've got a bunch of other interesting scripts to share.
Comments and suggestions are welcome.
Release Notes:
1) added Tenkan lines
2) no need to treat JPY differently
Release Notes:
// March 2019:
// nr of traded lots adjusted according to SL and risk
// cleaner trade management, avoid superposed trades
// added ema200 filter: if active long possible only when ema200 is increasing
// short only if it decreases
// cleaner code
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?