Strategy · Pine Script v6 · Own pane

Stocks - Stan Weinstein Stage 2 Breakout Strategy

by LouisLetcher

This strategy plots a comparative relative strength line against a benchmark symbol in a separate pane.

View on GitHub

GitHub stars23on the repository
Pine versionv6current
Lines of code66
Settings5inputs
LicenceCustom licence
Last update3 months ago24 Jul 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

Stocks - Stan Weinstein Stage 2 Breakout Strategy calculates price and volume simple moving averages alongside a multi-period highest high. Long trades enter using full equity when price exceeds its moving average, relative strength is positive, volume is above average, and price breaks the lookback high. Positions close when price crosses below the moving average. Inputs customize the comparison ticker, lookback lengths, and moving average periods. The strategy includes no protective stop loss.

Details

Published by

LouisLetcher on GitHub

Type

Strategy, Pine Script v6

Draws

Separate pane below the chart

Category

Breakout, Trend, Moving averages, Volume

Markets

Stocks

Timeframes

Any timeframe

Risk Notes

  • The strategy enters trades without a stop loss

Topics

algorithmic-tradingindicatorspinescriptstrategiestechnical-analysistradingview-scriptsbacktestingquantitative-financetrading-strategiestradingview

Settings

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

SettingTypeDefaultVariable
Comparative SymbolsymbolSPYcomparativeTickerId
RS Lookback Periodint50rsPeriod
Volume MA Lengthint5volumeMaLength
Price MA Lengthint30priceMaLength
Lookback for Highest Highint52highestLookback
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

Q-Trend + KVO Strategy

by TradersPost
218 stars

This strategy combines the ATR-banded Q-Trend indicator with the Klinger Volume Oscillator (KVO) to execute confluence trades. It enters long when a Q-Trend buy trigger aligns with a positive KVO value and a bullish candle confirmation, taking short trades und

Strategy v6 TrendVolume
Updated 3 months ago · None stated GitHub repository of Q-Trend + KVO Strategy
106 stars

This strategy calculates and plots aggregated Bitcoin volume collected across multiple exchanges, along with two volume moving averages in a separate pane. It enters long positions when price crosses above a fast EMA while remaining above a slow EMA, and enter

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Aggregate BTC Volume + EMA Strat
257 stars

This strategy plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos

Strategy v6 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Best Chart 1m Strategy Candle Bar

均线突破交易系统

by tangly1024
76 stars

This strategy trades long breakouts of a fast and a slow moving average on the price chart. It opens a long position when price crosses above either average, using a percentage of equity as size. It reduces the position by a set share when the high reaches the

Strategy v5 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of 均线突破交易系统
43 stars

This strategy executes trades on short-term cryptocurrency charts using a combination of pivot support and resistance levels and a multi-pole smoothed trend filter. Entries trigger when price crosses the smoothed trend line and confirms above or below a short-

Strategy v5 TrendBreakout Repaints
Updated 2 years ago · None stated GitHub repository of SOL 1m - Strategy Candle Bar

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

More strategys

Trade Your Charts With a Regulated Broker

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

Compare brokers