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
200 lines of Pine Script v5 from Tradingview/price-action-candles-v14.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Price-Action Candles marks higher highs, lower highs, higher lows, and lower lows, with a label mode that either offsets labels by the pivot length or leaves them unshifted. A table can show the same trend state on up to five user-chosen timeframes. The length setting changes how far pivots look left and right. It draws on the price chart. The default label mode uses a negative offset, and the security call is flagged for lookahead.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Price-Action Length
int
10
sdLength
Label Type
string
Repaint
labelType
Candle Color Type
string
Fill Only
candleType
Bull
color
color.lime
bullCSS
Bear
color
color.rgb(255, 0, 0)
bearCSS
Neutral
color
color.yellow
neutCSS
Enabled
bool
true
useTrendTable
MTF 1
bool
true
use_mtf1
mtf_1
timeframe
1
mtf_1
MTF 2
bool
true
use_mtf2
mtf_2
timeframe
5
mtf_2
MTF 3
bool
true
use_mtf3
Show all 17 settings
Setting
Type
Default
Variable
mtf_3
timeframe
15
mtf_3
MTF 4
bool
true
use_mtf4
mtf_4
timeframe
60
mtf_4
MTF 5
bool
true
use_mtf5
mtf_5
timeframe
D
mtf_5
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 overlay indicator marks bullish and bearish chart patterns on the price chart and can hide either side. Optional filters require agreement from fast and slow EMAs, Supertrend, and ADX, plus volume, RSI, nearby pivot support or resistance, and a user-defin
This indicator segments recent price bars into defined groups and visual boxes to serve as a visual chart ruler. It includes automated trend detection with configurable angle thresholds to plot uptrend, downtrend, and range segments directly on the price chart
This indicator implements Rob Smith's TheStrat price action methodology across up to six configurable timeframes. It classifies candles into inside, directional, and outside bars, identifies patterns like hammers, shooters, and failed 2s, and calculates magnit
This indicator overlays an intraday SPX and ES chart with a midnight session range, regular-trading-hours opening levels, and a VWAP projection box. It draws the midnight high, mid, and low, flags edge rejections within an absolute tolerance, and plots optiona
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
The Confluence Suite indicator draws multiple trading signals and tools directly on the price chart. It generates entry and exit signals based on selected modes and filters, with an AI signal classifier rating quality from 1-4. Additional features include smar