OPEN-SOURCE SCRIPT

Psychological Levels [UkutaLabs]

Updated
█ OVERVIEW

The Psychological Levels Indicator provides real-time insight into key price levels within the market that can serve as powerful support and resistance levels. These levels are updated automatically in real time to display only the most relevant levels to the current price, facilitating your trading experience.

The aim of this script is to simplify the trading experience of users by automatically identifying and displaying price levels that they should be aware of.


█ USAGE

On each tick, the nearest key price level is automatically identified by the script. The script will identify this level based on the price of the commodity you are applying it to:
• Commodities priced at $0 to $999.99 will identify the nearest whole dollar.
• Commodities priced at $1,000 to $9,999.99 will identify the nearest $10.
• Commodities priced at $10,000 to $99,999.99 will identify the nearest $100.
• Commodities priced over $100,000 will identify the nearest $1,000.

We refer to this rounding price as the gap price, and it is also used to determine the prices of the other lines drawn by this script.

After identifying the nearest key price level, the script then incrementally draws lines on either side of this level at an interval of the gap price. We refer to these as the Major Lines, and the user can control the number of these lines that get drawn, the style of these lines, and they can be disabled in the settings.

The script then draws lines at the half-way point between each of these Major Lines, and we refer to these as the Minor Lines. Like the Major Lines, the user has full control over the number of these lines that can be drawn, the style of these lines, and they can be disabled in the settings.


█ SETTINGS

Configuration

• Number of Lines: Determines the number of lines that are drawn on either side of the key price line. This controls both the number of Major Lines and Minor Lines.

Line Settings
• Major Lines: Determines whether or not the Major Lines will be displayed.
- Color: Determines the color of Major Lines.
- Style: Determines the style of Major Lines.
- Width: Determines the width of Major Lines

• Minor Lines: Determines whether or not the Minor Lines will be displayed.
- Color: Determines the color of Minor Lines
- Style: Determines the style of Minor Lines
- Width: Determines the width of Minor Lines
Release Notes
- Added a new setting: Custom Gap. This setting gives users the ability to customize the distance between lines. Setting this value to 0 will load the default gaps.
- Added default gap value for forex commodities: 0.0001
Support and Resistance

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer