PROTECTED SOURCE SCRIPT

BIAS PRO - Zones + Liquidity + SP&RS [AlgoRich]

622
This multifunction indicator is used to identify key areas on the chart, liquidity levels, and support/resistance zones (SP&RS). Its design is aimed at highlighting price pivots (swings) by drawing zones (boxes and lines) based on these pivots, while also displaying information about trading sessions and levels of analysis across different timeframes.

cuplikan

1. Configuration and Input Parameters

Swing Parameters (Bars Right-Left):

Two inputs are defined to adjust the number of bars on the right and left used to detect pivots (swings). This allows the determination of high and low pivot points.

Display Options:

You can choose to show or hide boxes, lines, and labels (bubbles). There is also an option to extend the zones until they are “filled” (confirmed), and you can opt to hide those zones once filled.

Appearance:

Visual parameters are defined, such as the option to display high and low pivots, colors for lines, labels, and boxes (for both bullish and bearish conditions), line styles (solid, dotted, dashed), and other aesthetic details (box width, label size, text alignment).

Lookback and Time Range:

The “lookback” and “daysBack” variables determine whether the analysis is limited to data from a certain number of days, helping to filter out older historical information.

2. Calculation of Pivots (Swings) and Zone Detection

Price Pivots:

Using the pivot functions (ta.pivothigh and ta.pivotlow), the script identifies swing high and low points based on the configured swing size (bars left and right).

If a swing high is detected, its bar index is stored and the corresponding signal is activated.
Similarly, a swing low is detected and marked.

Drawing Zones:

When a swing (high or low) is detected and the time range condition is met (inRange), the script draws:

Boxes: These visually represent the area around the pivot level. The configuration (type and width) is adjustable.

Lines: A horizontal line is drawn from the pivot point to the current bar, using the defined style and color.

Boxes and lines are drawn for both high pivots (showhighs) and low pivots (showlows).
Additionally, these zones are updated and extended dynamically as new bars appear, and zones that are “filled” (when the price exceeds the zone level) are removed.

Labels and Markers:

If enabled, the script displays circle markers (using plotshape) at the swing points.

3. Operational Zone (Sessions)

Customizable Sessions:

The script allows defining up to three operational sessions with distinct time ranges and colors.
For example, Session 1, Session 2, and Session 3 have configurable time ranges and colors (with adjustable opacity).

It checks if the current time falls within any of these sessions and, if so, applies a background color (bgcolor) to the chart with the configured session color.

Timezone Adjustment:

You can configure a UTC offset or use the exchange’s timezone to correctly adjust the session times.

4. Additional Levels and Analysis Groups

Groups of Levels (Levels 1, 2, 3, and 4):

Several groups are defined that allow data requests from different timeframes (e.g., 60 minutes, 240 minutes, daily, or weekly) and configure their parameters (length, line style, color).

For each group, the script uses a function that requests non-repainting data and calculates pivot levels based on ta.pivothigh/ta.pivotlow.

These levels are drawn on the chart with lines and “shadow” lines to reinforce the visualization of key pivot points. Labels are added with a slight offset to indicate the pivot value in the corresponding timeframe.

5. Maintenance and Management of Drawn Elements

Dynamic Update and Deletion:

The script maintains arrays to store the drawn boxes and lines. As new elements are added and the array reaches a maximum size (e.g., 500 elements), the oldest elements are deleted to avoid overloading the chart.

Extension and Hiding Conditions:

Conditions are checked to extend or delete zones based on whether the price has “filled” the area (i.e., if the current price has surpassed the zone level). There is also an option to hide zones once they are filled.

6. Session (Operational Zone) and Levels for Multiple Timeframes

Session Settings:

In addition to the pivot zones, the indicator also defines operational sessions with adjustable time ranges and colors, shading the background of the chart during those sessions.

Additional Level Groups:

The indicator allows grouping of analysis levels by timeframe, which can be useful for multi-timeframe analysis. Parameters such as length, style, and color are configurable for each group.

Summary:

The "BIAS PRO - Zones + Liquidity + SP&RS [AlgoRich]" is an all-in-one indicator that combines the detection of price pivots (swings) with the visual representation of key zones on the chart. With options to customize appearance, manage operational sessions, and group levels across different timeframes, this script is designed to help traders identify areas of high liquidity, potential breakouts, or reversals, thus optimizing decision-making based on market structure.

This explanation covers the main functionalities and workflow of the script, making it easier to understand without needing to examine the code in detail.

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.