Skip to content
All library documents

Position-State Alert Logic for Filtering Repeated Trading Signals

Article Strategy library · Author: ChaoZhang

Summary

This indicator template addresses repeated alerts when a signal persists while a position is already open. It tracks a trade-state line and triggers a new long, short, or exit alert when the state changes, while separate continuation alerts can identify signals that might be used to add to an existing position. The template also plots markers for state changes and continuations.

Users can disable short and exit signals, and the example supplies EMA, ATR-band, and MACD-style histogram conditions that can be replaced with custom buy, sell, and exit rules. The published configuration specifies a five-minute BTC/USDT futures backtest over a short date range, but gives no performance results. The state filter can help organize alerts and backtesting signals; it does not establish that the example entry rules are profitable or that the alerts alone manage position sizing, fills, or execution risk.

Key ideas

  • A persistent signal is separated from a new signal by tracking the previous trade state.
  • State transitions generate long, short, and exit alerts, while continuation conditions can flag possible position additions.
  • The template allows short and exit alerts to be disabled and includes plotted markers for signal states.
  • Its example conditions use EMA direction, ATR bands, and a histogram derived from moving averages.
  • The published backtest settings provide no results and do not demonstrate strategy profitability.

Tags

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