EMA Crossover Strategy

I have been using this article to create a backtest for a moving average strategy. https://www.quantnews.com/a-simple-way-to-backtest-a-strategy-in-python/. I want to add another filter though, possibly a trend filter. Thoughts?

EWMA and another good one (instead of EMA). At the moment I am testing a EWMA crossover strategy but I am looking for is more to check went the market is moving sideways and it will trigger many times long/short positions and usually it ends with loosing positions. When the market is going clearly up or down EMA/EWMA works well alone. So I am looking for a volatility indicator to not trade or decrease the position with low volatility.

1 Like

Thanks @rtacconi. That makes sense since moving averages tend to work well in trending environments. If you are going for a low vol strategy, what types of indicators do you use? @QN_Rob created a range strategy using ADX and RSI: https://www.quantnews.com/algo-trading-in-python-developing-a-rsi-range-strategy/