Skip to content
All library documents

SPY Moving-Average Triggers for Leveraged ETF Exposure

Article TradingView scripts

Summary

The strategy uses SPY’s 200-day simple moving average as a regime filter: the code opens a long position when SPY closes above a threshold 4% over the average and exits below a threshold 3% under it. The accompanying discussion applies these signals to leveraged Nasdaq exposure, proposing TQQQ during risk-on periods and a gradual move into QQQ after an exit. It also describes reducing leverage when QQQ rises far above its own 200-day average, as a safeguard against extreme upward runs.

The post cites a simulated backtest beginning in 2003 and reports that QQQ had positive average results relative to bonds in its comparison, with losses in two cited downturns. These are author-reported figures, not independently established results in the supplied text. The Pine strategy itself only enters and exits a long position on the charted asset; the DCA process, asset switching, and QQQ safeguards are described in prose rather than implemented in its rules. Results may depend heavily on leveraged ETF behavior, costs, and chosen execution assumptions.

Key ideas

  • The code enters above a threshold 4% over SPY’s 200-day average and exits below a threshold 3% under it.
  • The accompanying allocation proposal uses TQQQ during risk-on periods and suggests moving toward QQQ after an exit.
  • The post proposes gradual QQQ purchases after an exit and a separate QQQ average-based leverage safeguard.
  • The supplied code does not implement the described asset rotation, dollar-cost averaging, or QQQ safeguards.
  • The post cites simulated historical comparisons but does not provide independent validation.

Tags

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