OPEN-SOURCE SCRIPT
Zaktualizowano

[blackcat] L1 Institutional Golden Bottom Indicator

14 982
█ OVERVIEW
The script "[blackcat] L1 Institutional Golden Bottom Indicator" is an indicator designed to identify potential institutional buying interest or a "golden bottom" in the market. It calculates a series of values based on price movements and plots them on a chart to help traders make informed decisions.

█ LOGICAL FRAMEWORK

The script is structured into several main sections:
1 — Function Definitions: Custom functions xsa and calculate_institutional_golden_bottom are defined.
2 — Input Parameters: The user can set a threshold value for institutional interest.
3 — Calculations: The script calculates various indicators and conditions, including the institutional buy signal.
4 — Plotting: The results of the calculations are plotted on the chart.
5 — Labeling: When a golden bottom is detected, a label is placed on the chart.

The flow of data starts with the input parameters, proceeds through the calculation functions, and finally results in plotted outputs and labels.

█ CUSTOM FUNCTIONS

1 — xsa(src, len, wei)
• Purpose: To calculate a weighted moving average.
• Parameters:
– src: Source data (e.g., price).
– len: Length of the moving average.
– wei: Weighting factor.
• Return Value: The calculated weighted moving average.

2 — calculate_institutional_golden_bottom(close, high, low, threshold)
• Purpose: To determine the institutional golden bottom indicator.
• Parameters:
– close: Closing price.
– high: Highest price.
– low: Lowest price.
– threshold: User-defined threshold for institutional interest. By tuning the threshold value the user can properly identify the institutional golden bottom of the instrument. So, I can say this parameter is used to tune the "sensitivity" of this indicator.
• Return Value: An array containing the institutional indicator, golden bottom signal, and additional values (a1, b1, c1, d1).

█ KEY POINTS AND TECHNIQUES

• Weighted Moving Average (WMA): The xsa function implements a weighted moving average, which is useful for smoothing price data.
• Crossover Detection: The script uses a crossover condition to detect when the institutional indicator crosses above the threshold, indicating a potential buying opportunity.
• Conditional Logic: The script includes conditional statements to control the output of certain values only when specific conditions are met.
• Plotting and Labeling: The script uses plot and label.new functions to visualize the indicator and highlight significant events on the chart.

█ EXTENDED KNOWLEDGE AND APPLICATIONS

• Modifications: The script could be enhanced by adding more customizable parameters, such as different lengths for the moving averages or additional conditions for the golden bottom signal.
• Extensions: Similar techniques could be applied to other types of indicators, such as momentum oscillators or trend-following systems to identify market turning points.
• Related Concepts: Understanding weighted moving averages, crossover signals, and conditional plotting in Pine Script would be beneficial for enhancing this script and applying similar logic to other trading strategies.
Informacje o Wersji
OVERVIEW
The [blackcat] L1 Institutional Golden Bottom and Top Indicator helps traders identify potential reversal points in the market by analyzing institutional activity. This script calculates various indicators based on weighted sums and institutional strength, providing clear signals for both bullish ('Golden Bottom') and bearish ('Golden Top') reversals. By plotting these values on a separate pane, users can easily visualize key turning points 📉↗️.

FEATURES

Calculates Institutional Strength using weighted sum averages:
Analyzes close prices relative to recent highs and lows.
Provides insights into institutional buying or selling pressure.
Identifies Golden Bottom and Golden Top signals:
Golden Bottom: Indicates potential bullish reversals with yellow lines and labels.
Golden Top: Indicates potential bearish reversals with fuchsia lines and labels.
Plots multiple indicators for better context:
Institutional Strength: Blue line for bottom, red line for top.
Additional indicators (A, B, C, D) plotted in corresponding colors.
Displays clear labels on the chart when conditions are met for easy identification 🏷️
HOW TO USE

Add the indicator to your TradingView chart by selecting it from the indicators list.
Adjust the Institution Threshold parameter to fine-tune sensitivity ⚙️.
Monitor the separate pane for Golden Bottom and Golden Top signals.
Use the plotted lines and labels as visual cues for potential trend changes.
Combine this indicator with other forms of analysis for more reliable trading decisions.
LIMITATIONS

The indicator may generate false signals in highly volatile or ranging markets 🌪️.
Users should always confirm signals with other technical tools before making trading decisions.
The effectiveness of the indicator may vary depending on the asset and timeframe being analyzed.
NOTES

Ensure that you have sufficient historical data available for accurate calculations.
Test the indicator thoroughly on demo accounts before applying it to live trading 🔍.
Customize the appearance and parameters as needed to fit your trading strategy.
Informacje o Wersji
█ OVERVIEW

L1 IGBI turns the Institutional Golden Bottom / Golden Top oscillator into a
complete two-way trading system: it marks accumulation bottoms and
distribution tops, then adds exits, ATR-based risk levels, a position state
machine, a live dashboard and six alert channels.

• Long signals fire when institutional strength recovers through the
threshold while price structure is already rotating up.
• Short signals are the exact mirror, so both directions are covered.
• Every signal is confirmed at bar close, so nothing repaints.

█ CONCEPTS

Two independent measurements must agree before a signal is allowed:

• Institutional Strength — a smoothed stochastic-style reading of where
price closes inside the recent dealing range. Are large participants
accumulating or distributing?
• Trend Filter — a double-smoothed normalized price range centred on zero.
Is the structure already rotating in the signal direction?

A golden bottom requires strength crossing UP through the threshold while the
Trend Filter is rising; a golden top is the mirror image. Requiring both
filters out the classic oscillator failure — a crossover into a structure
that is still falling.

█ SIGNALS

• E — golden bottom, long entry (green, under the strength line)
• S — golden top, short entry (red, above the strength line)
• XL / XS — exit of a long / short position (orange cross)
• RL / RS — optional re-entry after an exit (teal / maroon)
• Background tint — green while long, red while short
• Dashboard — position, strength, filter, entry, SL, TP, HTF gate, cooldown

█ HOW TO USE

1 — Add the indicator to any symbol; it opens its own oscillator pane.
2 — Read E / S as the tradeable events; XL / XS close the loop so every
trade has both an entry and an exit.
3 — Take Stop Loss and Take Profit from the dashboard or the data window.
They are price values, not oscillator values.
4 — Build alerts from the six built-in alertconditions, or use the dynamic
alert messages that already carry price, strength, SL and TP.
5 — Change one or two inputs at a time. The defaults reproduce the original
V1 behaviour, so every adjustment is measurable.

Key inputs
• Thresholds: 19 for bottoms. Set the Top Threshold to 81 for classic
overbought distribution tops instead of the V1 mirror at 19.
• Exit Mode: Reverse Signal, Strength Cross, or Extreme Anchor.
• Cooldown Bars: minimum spacing between signals, 0 restores V1 behaviour.
• Risk: ATR length with SL / TP multipliers, plus an optional trail.
• Optional gates: higher-timeframe direction filter and post-exit
re-entry, both switched off by default.

█ FEATURES

• State-machine governed signals — no duplicate entries, no exit while
flat, no same-bar entry and exit contradicting each other.
• ATR-scaled SL / TP with an optional chandelier trail.
• Higher-timeframe direction gate from closed HTF bars only.
• Threshold guides, semantic label colours, status dashboard.
• Six alertconditions plus dynamic alerts, all close-confirmed.

█ IMPLEMENTATION NOTES

Written in Pine v6. The V1 core — a weighted sum average applied to a
stochastic-style strength line and to a normalized price range — is kept
unchanged; the two near-duplicate V1 functions were merged so the series is
computed once. Divisions are zero-guarded, historical references are na-safe,
and the HTF gate reads the last closed higher timeframe bar to avoid
look-ahead. Signals are evaluated once per bar, then filtered by a position
state machine with an optional cooldown.

█ LIMITATIONS

• Oscillator based: a strong trend can keep strength pinned near an extreme
and delay the signal.
• Ranging markets produce more, weaker signals — raise Cooldown Bars or
enable the HTF gate instead of lowering thresholds.
• SL / TP are reference levels; the script never places orders.
• The HTF gate needs a timeframe larger than the chart timeframe; the first
bars are warm-up.

█ NOTES

• V2 additions: exits, risk levels, signal governance, dashboard, alerts,
re-entry and the HTF gate — each one individually switchable.
• Original idea and core algorithm by blackcat1402, MPL 2.0 licensed.

═════════════════════════════════════════════════════════════════════════
For questions or feedback, use the comments section below.
Feel free to use and modify — attribution appreciated.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.