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
272 lines of Pine Script v5 from Tradingview/psychological-levels.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Psychological Levels marks buy and sell signals when volume crosses user thresholds near those levels, with an optional moving-average filter, a delay between signals, and a price offset. Optional target, stop-loss, and entry lines can be drawn as price or percent distances. Rounding value, line style, color, and width are adjustable. It is an indicator, so it does not place orders, and the excerpt does not show exit logic beyond the plotted lines.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Rounding Value
float
0.1
rounding_value
Sell Volume <
int
7500
sell_volume
Buy Volume >
int
7500
buy_volume
Price Offset
float
0.0021
price_offset
Delay Between Signals
bool
true
use_signal_delay
int
10
signal_delay
MA Filter
bool
true
show_ma
int
50
ma_length
string
EMA
ma_type
timeframe
ma_tf
Quarter Levels
bool
true
use_qtr_levels
css_qtr
color
color.new(color.yellow,70)
css_qtr
Show all 40 settings
Setting
Type
Default
Variable
style_qtr
string
Solid
style_qtr
width_qtr
int
1
width_qtr
Half Levels
bool
true
use_half_levels
css_half
color
color.new(color.yellow,35)
css_half
style_half
string
Solid
style_half
width_half
int
1
width_half
Whole Levels
bool
true
use_whole_levels
css_whole
color
color.yellow
css_whole
style_whole
string
Solid
style_whole
width_whole
int
1
width_whole
Target
bool
true
use_tp
tp_amount
float
0.02
tp_amount
tp_type
string
Price
tp_type
Stop Loss
bool
true
use_sl
sl_amount
float
0.02
sl_amount
sl_type
string
Price
sl_type
Position Lines to Show
string
Current & Past
line_showing
Entry Line
bool
true
use_entryline
css_entryline
color
color.blue
css_entryline
style_entryline
string
Dotted
style_entryline
width_entryline
int
1
width_entryline
Target Line
bool
true
use_targetline
css_targetline
color
color.green
css_targetline
style_targetline
string
Dotted
style_targetline
width_targetline
int
1
width_targetline
Stop Line
bool
true
use_stopline
css_stopline
color
color.red
css_stopline
style_stopline
string
Dotted
style_stopline
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 call and put setups from EMAs, RSI, MACD, and a SPY volume ratio. A call needs higher highs, RSI above its minimum, rising MACD, above-average proxy volume, and a rising trend EMA; a put reverses those tests. Early markers use an E
The Midnight VWAP indicator calculates and overlays two distinct Volume Weighted Average Price (VWAP) lines on the price chart based on customizable session timeframes. It tracks an overnight or pre-market session alongside regular trading hours, resetting cal
This indicator plots two Hull moving averages on the price chart, one of the selected price and one of close, and optionally smooths both with a Kahlman filter. It fills the space between them and marks buy and sell labels when they cross, provided scaled volu
This indicator overlays Bollinger Bands on the price chart and fills the area between upper and lower bands using a color based on Cumulative Volume Delta trend. It plots an EMA 9 line and fills between the EMA 9 and Bollinger basis in green or red depending o
This indicator plots a fixed lookback Volume Profile alongside 20, 50, and 200 Simple Moving Averages directly on the price chart. It highlights trend changes via moving average crosses and marks Point of Control reactions, High Volume Nodes, and Value Area bo
This indicator calculates a dynamic swing-anchored VWAP using Adaptive Price Tracking and ATR-based volatility adaptation. It detects recent swing highs and lows to set anchor points automatically, rendering smoothed VWAP lines directly on the price chart via