Skip to content
All library documents

SPY Hourly Swing Entries with EMA, RSI, MACD, and Stochastic Rules

Article TradingView scripts

Summary

This strategy aims to capture multi-day swings in SPY using hourly bars. A long signal occurs when the fast EMA crosses above the slower EMA while RSI is above its midpoint. The stated exit condition combines weakening EMA alignment, a bearish MACD relationship, and a high smoothed stochastic reading. Stop loss and take profit percentages are configurable, and the script can also initiate shorts after a long trade exits if a recent stochastic condition is met and shorting is enabled.

The author reports that trades averaged roughly five to six trading days over a six-year period, but the document provides no trade list, performance statistics, or test methodology to assess that claim. It also describes partial profit taking after a larger favorable move, with stop and target levels reset from the latest close when ADX slope declines. The code and accompanying description contain some inconsistencies in indicator thresholds and wording, and the author advises retuning risk levels and checking results for instruments beyond the intended use.

Key ideas

  • Long entries require a fast EMA crossover and RSI above 50 on an hourly chart.
  • Exit logic combines EMA, MACD, and stochastic conditions with configurable percentage stops and targets.
  • The script can take partial profits after a larger move and adjust remaining risk levels when ADX slope falls.
  • The reported average holding period is an author claim without supporting performance details or test methodology.

Tags

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