1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
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.
Stage 1 to 4 detection from a 30-week moving average
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Daily chart: convert weeks to days (x5)
bool
true
autoScale
Stage MA (30-week = 150-day)
int
30
maWeeks
Fast MA (10-week = 50-day)
int
10
fastWeeks
MA type
string
SMA
maType
Slope lookback (weeks)
int
4
slopeWeeks
Flat MA threshold (% change over slope lookback)
float
0.5
flatThreshold
Base / resistance lookback (weeks)
int
10
baseWeeks
Weeks MA must stop rising/falling to change stage
int
2
confirmWeeks
Volume average length (bars)
int
30
volLen
Breakout volume (x average)
float
2.0
volMult
Max tranches (1 entry + adds)
int
3
maxTranches
Min weeks between tranches
int
3
coolWeeks
Show all 21 settings
Setting
Type
Default
Variable
Breakout entry window (weeks after Stage 2 starts)
int
4
entryWeeks
Pullback / retest zone (%)
float
3.0
zonePct
Exit style
string
Investor
exitMode
Color background by stage
bool
true
showBgColors
Color price bars by stage
bool
false
showBarColors
Label stage start / end
bool
true
showStageLabels
Show HOLD dots while in a position
bool
true
showHold
Show dashboard
bool
true
showTable
Show 52-week high
bool
false
show52WHigh
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.
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
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
This technical indicator combines SuperTrend signals, moving average trend clouds, pivot points, and daily range breakout targets directly on the price chart. It generates Buy, Strong Buy, Sell, and Strong Sell labels when price crosses the SuperTrend level in
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
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
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