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
Market Width automatically detects the main chart symbol and switches to the corresponding index ticker such as S&P or NDX, or allows manual selection when auto switch is disabled. Each percentage is displayed as a separate line in a dedicated pane with distinct colors. Input controls enable or disable individual periods and adjust horizontal reference lines. The tool provides market breadth analysis for stocks and indices traders.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Auto switch with the main chart symbol [coverage: 'SPX'=S&P; 'NDX'=NQ100; 'IXIC'=NQ Comp; 'DJI'=Dow Indu; 'RUI'=Rus1000
bool
true
auto1
select Market manually when above 'Auto-switch' box is unchecked
string
S&P
mk2
% of stocks above 20 day
bool
true
show1
% of stocks above 50 day
bool
true
show2
% of stocks above 200 day
bool
true
show3
% of stocks above 5 day
bool
false
show5
% of stocks above 100 day
bool
true
show4
% of stocks above 150 day
bool
false
show6
horizontal reference line 1
int
80
line_m
horizontal reference line 2
int
20
line_m1
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.
BTC Multiples calculates and displays Bitcoin macro valuation metrics in a separate pane, including the Mayer Multiple, Stock-to-Flow Multiple, Difficulty Multiple, and Puell Multiple. Each valuation multiple features configurable overvalued and undervalued th
MACD Breakout builds a higher-timeframe MACD from preset fast and slow lengths using SMA or EMA, and marks support and resistance zones from histogram sensitivity. Optional filters require zero-line agreement, higher-timeframe direction, and linear-regression
This Pine Script indicator plots multiple exponential moving averages in a separate pane for technical analysis. It calculates Elliott wave EMAs using Fibonacci wave counts of 34 and 89, plus 200-session and golden ratio lines. Additional Pythagorean cloud lev
Cipher B is a multi-indicator plotting WaveTrend oscillator lines and signals alongside Stochastic RSI, MFI area with color bars, and buy sell marks. It draws all elements in a separate pane. WaveTrend calculates using SMMA and EMA on source like ohlc4 with ad
This indicator demonstrates debugging visualization patterns for Pine Script. It plots value tracking with mean, min, and max reference lines, condition markers using shapes and arrows, historical comparisons with standard deviation bands, multi-series overlay
This indicator renders Ichimoku cloud components consisting of conversion line, base line, leading span A and leading span B. It tracks Tenkan-Kijun crosses and assigns a numeric score to each based on whether the cross occurs below, inside or above the Kumo c