1Copy the scriptPress Copy script above, or the copy button on the code below.
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
542 lines of Pine Script v5 from Tradingview/mrhyh21-smc.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Mrhyh21 SMC identifies swing points based on a configurable length and marks internal order blocks, swing order blocks, and fair value gaps. Candles can be colored according to detected trend direction. Settings allow toggling display of internal or swing order blocks, adjusting the number shown, selecting order block filters, and extending fair value gap boxes. The indicator draws all elements directly on the chart for visual analysis of potential reversal zones and market structure.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Bull Color
color
color.green
bull_css
Bear Color
color
color.red
bear_css
Color Candles
bool
false
show_trend
mode
string
Historical
mode
style
string
Colored
style
Swings
int
50
length
Internal Order Blocks
bool
true
show_iob
iob_showlast
int
5
iob_showlast
Swing Order Blocks
bool
false
show_ob
ob_showlast
int
5
ob_showlast
Order Block Filter
string
Atr
ob_filter
Internal Bullish OB
color
color.new(#3179f5, 80)
ibull_ob_css
Show all 24 settings
Setting
Type
Default
Variable
Internal Bearish OB
color
color.new(#f77c80, 80)
ibear_ob_css
Bullish OB
color
color.new(#1848cc, 80)
bull_ob_css
Bearish OB
color
color.new(#b22833, 80)
bear_ob_css
Fair Value Gaps
bool
false
show_fvg
Auto Threshold
bool
true
fvg_auto
Timeframe
timeframe
fvg_tf
Bullish FVG
color
color.new(#00ff68, 70)
bull_fvg_css
bull_fvg_csstext
color
color.new(#000000, 30)
bull_fvg_csstext
Bearish FVG
color
color.new(#ff0008, 70)
bear_fvg_css
bear_fvg_csstext
color
color.new(#000000, 30)
bear_fvg_csstext
Extend FVG
string
Bars
fvg_extend
fvg_extendx
int
200
fvg_extendx
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 detects equal highs and lows by comparing prices within user-defined left and right bars using a tolerance percentage. It plots horizontal lines on the price chart for equal highs in one color and lows in another. A screener allows input of mult
This Pine Script indicator plots a ZigZag on the price chart. It identifies reversal points when price moves more than a set percentage from the last pivot. The script calculates forecasts using zigzag data and labels detected geometric patterns including harm
This indicator plots market structure on the price chart by identifying swing highs and lows. It connects these points with lines to visualize trend direction and detect Break of Structure (BOS) when price breaks a prior swing in the current trend. Change of C
This indicator implements the Fractal Model concept to plot market structure shifts, liquidity sweeps, and Change in State of Delivery (CISD) levels. It overlays custom higher-timeframe candle previews, open prices, and time markers directly on the price chart
BigBeluga Smart Money Concepts identifies and overlays market structure and volumetric order blocks directly on the price chart. It analyzes market swings, trend sweeps, and mapping structure using customizable pivot lengths and calculation modes. The indicato
Apex Trend & Liquidity Master calculates a trend cloud using customizable moving averages expanded by a volatility multiplier directly on the main price chart. It identifies dynamic support and resistance liquidity zones from swing high and low pivots, extendi