Skip to content
All library documents

A Configurable Momentum Strategy with Filters and Risk Controls

Article TradingView scripts

Summary

This strategy takes long or short positions when momentum is positive or negative. Its momentum signal can use either a longer lookback reading or a one-bar change, and entries can require agreement between two momentum measures or use only one. An optional exponential moving average filter requires price to be on the corresponding side of the average. Date and intraday time windows can restrict when entries occur, with an option to close positions when the selected trading window ends.

The script also offers percentage-based stop and take-profit levels and configurable alert messages for entries and exits. The accompanying description explains the signal logic and recommends including commission and slippage when assessing backtests, but it provides no performance results. The author notes that alternative momentum calculations may behave differently and that single- versus double-signal settings can vary by asset. These options are parameters to evaluate, not evidence that the strategy is profitable or that backtest behavior will match live trading.

Key ideas

  • Long and short entries follow positive and negative momentum readings.
  • Users can require one momentum signal or agreement between two signals.
  • An optional EMA filter aligns entries with price relative to the average.
  • Date and time restrictions can limit trading, and positions can close at a session boundary.
  • Stop losses, profit targets, and alert messages are configurable, while backtests should account for trading costs.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.