SMC Bundle
Free Indicators
Live support

Discover the latest articles that give you new insights.

New Indicator: Round/ Psychological levels [Sonarlab]

February 9, 2023

Have you ever noticed that prices seem to stick to certain “round numbers” like $1250, $1300, or  $1350? It’s not just your imagination — these round numbers can actually act as psychological levels in the market, influencing trader behavior and shaping price action.

But why do traders care so much about these round numbers? It all comes down to our psychological wiring. Humans are naturally drawn to symmetry and simplicity, and round numbers offer a nice, neat way to measure price levels. Plus, these levels often coincide with important milestones or historical levels of support and resistance, giving them even more psychological weight.

To help you take advantage of these psychological levels in your trading, we’ve created a free TradingView indicator that automatically plots round numbers on your chart. Whether you’re a seasoned trader or just starting out, this indicator can give you a valuable edge in the market.

Here’s how the Indicator works:

1. Install the indicator on your TradingView chart. You can find it in the public library by searching for “Round Numbers Indicator”.

2. Select your preferred round numbers and customize the appearance of the indicator to fit your chart. The default settings are already set good.

3. Watch as the round numbers dynamically adjust to the current price action, providing you with a clear view of the market’s psychological levels.

In the example below, you can see how the round numbers act as levels of support and resistance on NAS100 12500 resting around other key area's like: order blocks, fib level, daily and weekly open and Asian low.

Blue line at 12500

As you can see, the round numbers provide a clear roadmap for the market, helping you to identify potential buying and selling opportunities.

So why wait? Give our free Round Numbers Indicator a try today and start taking advantage of these powerful psychological levels in your trading!

Free Source code

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ClayeWeight
// Enjoy the Free Script!

indicator("Psych/Whole Number Levels", overlay = true)

_grp = "Sonarlab.io"
_v = input.string("v1.0", title="Version", options=["v1.0"], group=_grp)

// -----------
_fx = "Forex & Indices & BTC/ETH"
show_250pip = input.bool(true, title="Show 250 pip levels", group=_fx)
pip250_line_count = input.int(5, title="Line Count", group=_fx)
pip250_line_style = input.string("Solid", title="Line Style", options=["Solid", "Dashed", "Dotted"], inline="style250", group=_fx)
line_style250 = pip250_line_style == "Solid" ? line.style_solid : pip250_line_style == "Dashed" ? line.style_dashed : line.style_dotted
pip250_color = input.color(#b22833, title="", inline="style250", group=_fx)

// -----------
show_100pip = input.bool(true, title="Show 100 pip levels", group=_fx)
pip100_line_count = input.int(5, title="Line Count", group=_fx)
pip100_line_style = input.string("Dashed", title="Line Style", options=["Solid", "Dashed", "Dotted"], inline="style", group=_fx)
line_style100 = pip100_line_style == "Solid" ? line.style_solid : pip100_line_style == "Dashed" ? line.style_dashed : line.style_dotted
pip100_color = input.color(#1848cc, title="", inline="style", group=_fx)

// -----------
show_intraday_pip = input.bool(true, title="Show Intra Day Pip Levels", group=_fx)
intraday_line_count = input.int(5, title="Line Count", group=_fx)
intraday_line_style = input.string("Dotted", title="Line Style", options=["Solid", "Dashed", "Dotted"], inline="stylefx", group=_fx)
line_styleintraday = intraday_line_style == "Solid" ? line.style_solid : intraday_line_style == "Dashed" ? line.style_dashed : line.style_dotted
intraday_color = input.color(#fbc02d, title="", inline="stylefx", group=_fx)

// --------------------
step = syminfo.mintick * 1000
step100 = step 
step250  = step * 2.5

remove_lines(_lines) =>
    for l in _lines

print_line(showBool, total, step, stepAdd, multi, col, style) =>
    var levelLines = array.new_line()
    if showBool
        for n = 0 to total - 1
            stepUp = syminfo.type == 'forex' or syminfo.type == 'crypto' ? math.ceil(close / step) * step + (n * multi) : int(close / step) * step + stepAdd + (n * multi)
            stepUp := syminfo.type == 'forex' and show_intraday_pip ? stepUp + stepAdd * step : stepUp
            stepDn = syminfo.type == 'forex' or syminfo.type == 'crypto' ? math.floor(close / step) * step - (n * multi) : int(close / step) * step + stepAdd - (n * multi)
            stepDn := syminfo.type == 'forex' and show_intraday_pip ? stepDn + stepAdd * step : stepDn
            array.push(levelLines, line.new(bar_index, stepUp, bar_index - 1, stepUp, xloc=xloc.bar_index, extend=extend.both, color=col, width=1, style=style))
            array.push(levelLines, line.new(bar_index, stepDn, bar_index - 1, stepDn, xloc=xloc.bar_index, extend=extend.both, color=col, width=1, style=style))

if barstate.islast
    if syminfo.type == 'forex'
        print_line(show_250pip, pip250_line_count, step250, 0, step250, pip250_color, line_style250)
        print_line(show_100pip, pip100_line_count, step100, 0, step100, pip100_color, line_style100)

        if timeframe.isintraday
            print_line(show_intraday_pip, intraday_line_count, step, 0.2, step, intraday_color, line_styleintraday)
            print_line(show_intraday_pip, intraday_line_count, step, 0.5, step, intraday_color, line_styleintraday)
            print_line(show_intraday_pip, intraday_line_count, step, 0.8, step, intraday_color, line_styleintraday)

    if syminfo.type == 'index' or syminfo.type == 'cfd'
        print_line(show_250pip, pip250_line_count, 1000, 500, 250, pip250_color, line_style250)
        print_line(show_100pip, pip100_line_count, 100, 0, 100, pip100_color, line_style100)
    if syminfo.type == 'crypto'
        if str.startswith(syminfo.ticker, "BTC")
            print_line(show_100pip, pip100_line_count, 1000, 0, 1000, pip100_color, line_style100)
            print_line(show_250pip, pip250_line_count, 1500, 0, 1500, pip250_color, line_style250)
            if timeframe.isintraday
                print_line(show_intraday_pip, intraday_line_count, 250, 0, 250, intraday_color, line_styleintraday)

        if str.startswith(syminfo.ticker, "ETH")    
            print_line(show_100pip, pip100_line_count, 100, 0, 100, pip100_color, line_style100)
            print_line(show_250pip, pip250_line_count, 250, 0, 250, pip250_color, line_style250)
            if timeframe.isintraday
                print_line(show_intraday_pip, intraday_line_count, 50, 0, 50, intraday_color, line_styleintraday)