Moving Average Crossovers with Momentum, Volatility, and Trend Filters
Summary
This script generates trade signals when a configurable short moving average crosses a longer one. It can use exponential, simple, or smoothed averages. Signals are filtered by Bollinger Band width and position relative to the middle band, RSI, MACD, stochastic direction, ADX strength, and an optional moving average trend check. The script also plots smoothed high and low bands and can display pivot-based support and resistance levels using several calculation methods and time anchors.
Risk controls include an ATR-based stop distance and a fixed reward-to-risk setting, though the supplied excerpt does not show the complete order logic. The document provides implementation details but no backtest results or market-specific evidence. Several filter switches are hard-coded on, while the higher-timeframe trend option is user-controlled and disabled by default; despite its label, the trend average is calculated from the chart's close series. Performance, execution assumptions, and suitability across assets or timeframes are not established.
Key ideas
- The core signal is a crossover or crossunder of configurable short and long moving averages.
- Bollinger Band width and price relative to its centerline provide volatility and directional filters.
- RSI, MACD, stochastic, and ADX conditions further screen candidate entries.
- An optional moving average filter checks whether price is above or below a trend average.
- ATR-based stop distance and pivot-derived support and resistance levels are included in the script.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.