Skip to content
All library documents

EMA Squeeze, MACD, and Volume Filters for Trade Entries

Article TradingView scripts

Summary

This Pine strategy combines a short EMA compression setup with momentum, volume, trend, and risk filters. It defines a squeeze by measuring the spread among the 6, 12, and 20 period EMAs, and checks whether the 20 period EMA has been relatively flat. A volume spike and a price reclaim of the 20 period EMA serve as part of the trigger, while MACD crossovers and optional SMA, higher timeframe, and RSI conditions contribute to trade signals.

The script also offers configurable cooldowns, ATR based stop and target levels, risk per trade, and a switch for short trades. Its displays include several EMA lines, a table of their values, and a reference price line that changes with MACD based trend state. The supplied excerpt is incomplete, so it does not fully show the entry and exit logic. It provides no performance results or market specific evaluation; parameters and filters would need independent testing.

Key ideas

  • The setup identifies compression by comparing the spread among three short EMAs with a configurable percentage threshold.
  • A flatness check measures the change in the 20 period EMA over a selected lookback.
  • Volume expansion and price reclaim of the 20 period EMA are used as entry filters alongside MACD and optional trend and RSI checks.
  • ATR based stops and targets, a risk limit, cooldown, and short trade switch provide configurable trade management.

Tags

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