Strategy · Pine Script v6 · On the chart

Advanced Swing Strategy v6

by raybird

This Pine Script v6 strategy generates multi-layered trading signals plotted directly on the price chart.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code137
Settings30inputs
LicenceNone stated
Last update2 months ago15 Aug 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Advanced Swing Strategy v6 combines eight modular signal engines: EMA crossover pullbacks, price action breakouts, RSI momentum and divergence, MACD histogram flips, volume surges, candlestick patterns (such as pin bars), Supertrend flips, and Parabolic SAR with ADX trend filtering. Users can toggle individual modules and adjust indicator periods, thresholds, and tolerances. The architecture treats base indicators as raw signals designed for consensus filtering.

Details

Published by

raybird on GitHub

Draws

On the price chart

Markets

Any symbol

Timeframes

H4 and above, M15-H1

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Enable EMA Crossover + PullbackbooltrueuseEMASignal
Enable Price Action BreakoutbooltrueuseBreakoutSignal
Enable RSI MomentumbooltrueuseRSISignal
Enable MACD Histogram FlipbooltrueuseMACDSignal
Enable Volume SurgebooltrueuseVolumeSignal
Enable Candlestick PatternsbooltrueuseCandlestickSignal
Enable Supertrend FlipbooltrueuseSupertrendSignal
Enable Parabolic SAR + ADXbooltrueuseSarAdxSignal
Fast EMAint9emaFastLen
Slow EMAint21emaSlowLen
Pullback tolerance, %float0.5emaPullbackPct
Breakout lookbackint20breakoutLen
Show all 30 settings
SettingTypeDefaultVariable
RSI Lengthint14rsiLen
Bull RSI levelint40rsiBullLevel
Bear RSI levelint60rsiBearLevel
Simple divergence lookbackint5rsiDivLookback
MACD Fastint12macdFastLen
MACD Slowint26macdSlowLen
MACD Signalint9macdSignalLen
Volume SMAint20volumeMaLen
Volume surge multiplierfloat1.5volumeSurgeMult
Pinbar: max body % of rangefloat35.0pinbarBodyMaxPct
Pinbar: min lead wick % of rangefloat55.0pinbarWickMinPct
Supertrend Factorfloat3.0supertrendFactor
Supertrend ATRint10supertrendAtrLen
SAR Startfloat0.02sarStart
SAR Incrementfloat0.02sarInc
SAR Maxfloat0.2sarMax
ADX Lengthint14adxLen
ADX Thresholdint25adxThreshold
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

ADA4H Optuna Strategy

by skywalker0803r
42 stars

This strategy trades longs and shorts on the price chart. Long entries require a close above the prior Donchian high, a close above a long-term SMA, and RSI above a threshold, with size set as a percentage of equity. Long exits use a stop at the prior Donchian

Strategy v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of ADA4H Optuna Strategy

Edge 59

by subos2008
6 stars

Edge 59 is a price-chart strategy that combines an ADX directional filter, a weighted moving average, and a trend-follower channel. The channel uses an exponential moving average of close, optionally smoothed by linear regression, and a percentage of a fixed 2

Strategy v5 TrendOscillators & momentum Repaints
Updated 2 years ago · Custom licence GitHub repository of Edge 59

AG Momentum Breakout

by eltonaguiar
4 stars

AG Momentum Breakout is a strategy that identifies continuation signals after pullbacks in trending markets. It filters for uptrends using EMAs and detects recent pullbacks via RSI conditions before entering on RSI crossovers above 50 with ADX confirmation. Th

Strategy v6 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of AG Momentum Breakout
4 stars

Christian Qullamaggie Strategy is a trend-following and breakout strategy overlay designed to identify high-momentum trading opportunities directly on the price chart. It evaluates market conditions using fast, mid, and slow EMAs, average true range (ATR), and

Strategy v6 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Christian Qullamaggie Strategy

RSI-7 Breakout

by aofwittawat
4 stars

This strategy identifies breakout trades using a 7-period RSI combined with price extreme lookbacks. A long entry triggers when the RSI rises above 70 and price reaches a new lookback high, provided price remains above an optional EMA trend filter and passes a

Strategy v5 Oscillators & momentumBreakout
Updated 4 years ago · None stated GitHub repository of RSI-7 Breakout

RSI EMA Breakout

by latentwill
4 stars

This strategy trades momentum breakouts by combining an Exponential Moving Average with the Relative Strength Index. It enters a long position when the closing price is above the EMA and the RSI crosses above the breakout threshold. It enters a short position

Strategy v5 TrendOscillators & momentum
Updated 8 days ago · None stated GitHub repository of RSI EMA Breakout

More Trend scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers