Skip to content
All library documents

Swing Trading Entries with SMA, RSI, and MACD Signals

Article TradingView scripts

Summary

This strategy combines long and short simple moving average crossovers with RSI and MACD conditions. A long entry follows either a bullish crossover of the 50-period and 200-period averages or an oversold RSI reading paired with a bullish MACD crossover. Exit signals use the reverse crossover or an overbought RSI reading with a bearish MACD crossover. The script also plots the averages, pullback markers, RSI, and MACD for chart review.

Position management applies a minimum holding period before signal-based closes and before fixed percentage take-profit and stop-loss orders become active. The code defines a pullback marker using a rolling closing-price high and a threshold, but that marker does not control entries. The listing reports one trade and a small gain followed by a decline, which is far too little evidence to establish performance. The holding-period calculation uses elapsed milliseconds, so its meaning depends on chart timestamps; the script also offers no market-specific validation, transaction-cost analysis, or broader backtest results.

Key ideas

  • Long entries use either a bullish crossover of the short and long moving averages or an oversold RSI with a bullish MACD crossover.
  • Short-side conditions are calculated for exits, while the strategy itself only opens long positions.
  • Signal exits and fixed percentage exits are delayed until the minimum holding period has elapsed.
  • The pullback condition creates a visual marker but does not participate in the entry rules.
  • The listing's single reported trade is insufficient to assess the strategy's reliability.

Tags

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