Indicator · Pine Script v6 · On the chart

Weinstein Stage Analysis + Trade Plan

by shravanmateti

This indicator applies Stan Weinstein's Stage Analysis on the price chart.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code262
Settings21inputs
LicenceNone stated
Last update2 weeks ago10 Oct 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 indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

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

Weinstein Stage Analysis + Trade Plan judges Stage 1 to 4 from the slope of a 30-week moving average and the price position, colours the background by stage and labels stage starts and ends. A trade plan layer shows ENTER on a volume breakout from a base or a light-volume retest, ADD signals up to a set number of tranches, HOLD dots and EXIT signals. It is designed for weekly charts and converts week lengths on daily charts.

Details

Published by

shravanmateti on GitHub

Draws

On the price chart

Markets

Stocks

Timeframes

H4 and above

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
Daily chart: convert weeks to days (x5)booltrueautoScale
Stage MA (30-week = 150-day)int30maWeeks
Fast MA (10-week = 50-day)int10fastWeeks
MA typestringSMAmaType
Slope lookback (weeks)int4slopeWeeks
Flat MA threshold (% change over slope lookback)float0.5flatThreshold
Base / resistance lookback (weeks)int10baseWeeks
Weeks MA must stop rising/falling to change stageint2confirmWeeks
Volume average length (bars)int30volLen
Breakout volume (x average)float2.0volMult
Max tranches (1 entry + adds)int3maxTranches
Min weeks between tranchesint3coolWeeks
Show all 21 settings
SettingTypeDefaultVariable
Breakout entry window (weeks after Stage 2 starts)int4entryWeeks
Pullback / retest zone (%)float3.0zonePct
Exit stylestringInvestorexitMode
Color background by stagebooltrueshowBgColors
Color price bars by stageboolfalseshowBarColors
Label stage start / endbooltrueshowStageLabels
Show HOLD dots while in a positionbooltrueshowHold
Show dashboardbooltrueshowTable
Show 52-week highboolfalseshow52WHigh
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

RSC Trend Trading Study

by readysetcryptocodes
43 stars

This indicator plots Donchian Channels alongside fast and slow simple moving averages directly on the price chart. It generates bullish breakout signals when the high reaches the upper channel while the close is above the 50 SMA (and optionally the 200 SMA). B

Indicator v4 TrendBreakout
Updated 2 years ago · None stated GitHub repository of RSC Trend Trading Study

Candle Stage Analysis

by ChartsLector
41 stars

This indicator classifies market trends into structured stages based on moving average alignments, compression, and ATR distance from the 50-period SMA. It tracks multiple exponential moving averages against the 50 SMA to detect basing phases, breakouts, trend

Indicator v6 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of Candle Stage Analysis

This indicator calculates the relative strength of a chart symbol relative to a benchmark index and plots the resulting line directly over the price chart. It highlights new relative strength highs, new lows, and instances where relative strength reaches a new

Indicator v4 BreakoutMoving averages
Updated 5 years ago · None stated GitHub repository of Relative Strength Line by @iArpanK
5 stars

Calculates short and long Exponential Moving Averages alongside pivot high and low levels to identify breakout signals. The indicator plots a 20 EMA and a 50 EMA on the main price chart. It evaluates trend direction based on EMA crossover alignment, checks for

Indicator v4 Moving averagesTrend
Updated 3 years ago · Apache-2.0 GitHub repository of 20 EMA + 50 EMA + Breakout
3 stars

CSW Breakout Signals plots breakout buy and sell labels on the price chart when price breaks support or resistance after a trend change. Each signal can show a numbered confirmation score built from a moving-average cross, momentum, opening-range alignment, re

Indicator v5 BreakoutTrend
Updated 5 months ago · None stated GitHub repository of CSW Breakout Signals

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