The AlchemistThe Alchemist — Gold (AURUM-5)
What it is:
A 5-minute, session-aware gold strategy that blends three complementary “engines” to catch the best intraday rotations on XAUUSD/GC:
Trend Pullback — trades with the prevailing move after shallow pullbacks.
VWAP Mean-Reversion — fades stretched moves back toward value when trend pressure is light.
EBP Sweep — a simple, fast “liquidity sweep & reclaim/reject” candle read that flips early inflection points.
It’s built for clean execution and risk discipline: dollar-based sizing, ATR-anchored stops, $2.5 grid rounding, session caps, and cooldowns to prevent over-trading.
Statistics
Reversal Correlation Pressure [OmegaTools]Reversal Correlation Pressure is a quantitative regime-detection and signal-filtering framework designed to enhance both reversal timing and breakout validation across intraday and multi-session markets.
It is built for discretionary and systematic traders who require a statistically grounded filter capable of adapting to changing market conditions in real time.
1. Purpose and Overview
Market conditions constantly rotate through phases of expansion, contraction, trend persistence, and noise-driven mean reversion. Many strategies break down not because the signal is wrong, but because the regime is unsuitable.
This indicator solves that structural problem.
The tool measures the evolving correlation relationship between highs and lows — a robust proxy for how “organized” or “fragmented” price discovery currently is — and transforms it into a regime pressure reading. This reading is then used as the core variable to validate or filter reversal and breakout opportunities.
Combined with an internal performance-based filter that learns from its past signals, the indicator becomes a dynamic decision engine: it highlights only the signals that statistically perform best under the current market regime.
2. Core Components
2.1 Correlation-Based Regime Mapping
The relationship between highs and lows contains valuable information about market structure:
High correlation generally corresponds to coherent, directional markets where momentum and breakouts tend to prevail.
Low or unstable correlation often appears in overlapping, rotational phases where price oscillates and mean-reversion behavior dominates.
The indicator continuously evaluates this correlation, normalizes it statistically, and displays it as a pressure histogram:
Higher values indicate regimes favorable to trend continuation or momentum breakouts.
Lower values indicate regimes where reversals, pullbacks, and fade setups historically perform better.
This regime mapping is the foundation upon which the adaptive filter operates.
2.2 Reversal Stress & Breakout Stress Signaling
Raw directional opportunities are identified using statistically significant deviations from short-term equilibrium (overbought/oversold dynamics).
However, unlike traditional mean-reversion or breakout tools, signals here are not automatically taken. They must first be validated by the regime framework and then compared against the performance of similar past setups.
This dual evaluation sharply reduces the noise associated with reversal attempts during strong trends, while also preventing breakout attempts during choppy, anti-directional conditions.
2.3 Adaptive Regime-Selection Backtester
A key innovation of this indicator is its embedded micro-backtester, which continuously tracks how reversal or breakout signals have performed under each correlation regime.
The system evaluates two competing hypotheses:
Signals perform better during high-correlation regimes.
Signals perform better during low-correlation or neutral regimes.
For each new trigger, the indicator looks back at a rolling sample of past setups and measures short-term performance under both regimes. It then automatically selects the regime that currently demonstrates the superior historical edge.
In other words, the indicator:
Learns from recent market behavior
Determines which regime supports reversals
Determines which regime supports breakouts
Applies the optimal filter in real time
Highlights only the signals that historically outperformed under similar conditions
This creates a dynamic, statistically supervised approach to signal filtering — a substantial improvement over static or fixed-threshold systems.
2.4 Visual Components
To support rapid decision-making:
Correlation Pressure Histogram:
Encodes regime strength through a gradient-based color system, transitioning from neutral contexts into strong structural phases.
Directional Markers:
Visual arrows appear when a signal passes all filters and conditions.
Bar Coloring:
Bars can optionally be recolored to reflect active bullish or bearish bias after the adaptive filter approves a signal.
These components integrate seamlessly to give the trader a concise but complete view of the underlying conditions.
3. How to Use This Indicator
3.1 Identifying Regimes
The histogram is the anchor:
High, brightly colored columns suggest trend-friendly behavior where breakout alignment and directional follow-through have historically been stronger.
Low or muted columns suggest mean-reversion contexts where counter-trend opportunities and reversal setups gain reliability.
3.2 Filtering Signals
The indicator automatically decides whether a reversal or breakout trigger should be respected based on:
the current correlation regime,
the learned performance of recent signals under similar conditions, and
the directional stress detected in price.
The user does not need to adjust anything manually.
3.3 Integration with Other Tools
This indicator works best when combined with:
VWAP or session levels
Market internals and breadth metrics
Volume, order flow, or delta-based tools
Local structural frameworks (support/resistance, liquidity highs and lows)
Its strength is in telling you when your other signals matter and when they should be ignored.
4. Strengths of the Framework
Automatically adapts to changing micro-regimes
Reduces false reversals during strong trends
Avoids false breakouts in overlapping, rotational markets
Learns from recent historical performance
Provides a statistically driven confirmation layer
Works on all liquid assets and timeframes
Suitable for both discretionary and automated environments
5. Disclaimer
This indicator is provided strictly for educational and analytical purposes.
It does not constitute trading advice, investment guidance, or a recommendation to buy or sell any financial instrument.
Past performance of any statistical filter or adaptive method does not guarantee future results.
All trading involves significant risk, and users are responsible for their own decisions and risk management.
By using this indicator, you acknowledge that you are fully responsible for your trading activity.
Stochastic Ensembling of OutputsStochastic Ensembling of Outputs
🙏🏻 This is a simple tool/method that would solve naturally many well known problems:
“Price reversed 1 tick before the actual level, not executing my limit order”
“I consider intraday trend change by checking whether price is above/below VWAP, but is 1 tick enough? What to do, price is now whipsawing around vwap...”.
“I want to gradually accumulate a position around a chosen anchor. But where exactly should I put my orders? And I want to automate it ofc.“
“All these DSP adepts are telling you about some kind of noise in the markets… But how can I actually see it?”
The easy fix is to make things more analog less digital, by synthesizing numerous noise instances & adding it to any price-applied metric of yours. The ones who fw techno & psytrance, and other music, probably don’t need any more explanations. Then by checking not just 2 lines or 1 process against another one, you will be checking cloud vs cloud of lines, even allowing you to introduce proxies of probabilities. More crosses -> more confirmation to act.
How-to use:
The tool has 2 inputs: source and target:
Sources should always be the underlying process. If you apply the tool to price based metric, leave it hlcc4 unless you have a better one point estimate for each bar;
Target is your target, e.g if you want to apply it to VWAP, pick VWAP as target. You can thee on the chart above how trading activity recently never exactly touched VWAP, however noised instances of VWAP 'were' touched
The code is clean and written in modular form, you can simply copy paste it to any script of yours if you don't want to have multiple study-on-study script pairs.
^^ applied to prev days highs and lows
^^ applied to MBAD extensions and basis
^^ applied to input series itself
Here’s how it works, no ML, no “AI”, no 1k lines of code, just stats:
The problem with metrics, even if they are time aware like WMA, is that they still do not directly gain information about “changes” between datapoints. If we pick noise characteristics to match these changes, we’d effectively introduce this info into our ops.
^^ this screenshot represents 2 very different processes: a sine wave and white noise, see how the noise instances learned from each process differ significantly.
Changes can be represented as AR1 process . It’s dead simple, no PHD needed, it’s just how the current datapoint is related (or not) to the previous datapoint, no more than 1, and how this relationship holds/evolves over time. Unlike the mainstream approach like MLE, I estimate this relationship (phi parameter) via MoM but giving more weights to more recent datapoints via exponential smoothing over all the data available on your charts (so I encode temporal information), algocomplexity is O(1), lighting fast, just one pass. <- that gives phi , we’d use it as color for our noise generator
Then we just need to estimate noise amplitude ( gamma ) via checking what AR1 model actually thought vs the reality, variance of these innovations. Same via exponential smoothing, time aware, O(1), one pass, it’s all it does.
Then we generate white gaussian noise, and apply 2 estimated parameters (phi and gamma), and that’s all.
Omg, I think I just made my first real DSP script xd
Just like Monte Carlo for risk management, this is so simple and natural I can’t believe so many “pros” hide it and never talk about it in open access. Sharing it here on TradingView would’ve not done anything critical for em, but many would’ve benefited.
∞
Pivot Fib 4H — EAStrategy uses the pivot standard to open position, it has well define entry and exit point with SL, it also has a proper money management plan, maximum 4 trades a day, each trade risk 0.5% of the account, I have it EA version of it also.
High Volume Bars (Advanced)High Volume Bars (Advanced)
High Volume Bars (Advanced) is a Pine Script v6 indicator for TradingView that highlights bars with unusually high volume, with several ways to define “unusual”:
Classic: volume > moving average + N × standard deviation
Change-based: large change in volume vs previous bar
Z-score: statistically extreme volume values
Robust mode (optional): median + MAD, less sensitive to outliers
It can:
Recolor candles when volume is high
Optionally highlight the background
Optionally plot volume bands (center ± spread × multiplier)
⸻
1. How it works
At each bar the script:
Picks the volume source:
If Use Volume Change vs Previous Bar? is off → uses raw volume
If on → uses abs(volume - volume )
Computes baseline statistics over the chosen source:
Lookback bars
Moving average (SMA or EMA)
Standard deviation
Optionally replaces mean/std with robust stats:
Center = median (50th percentile)
Spread = MAD (median absolute deviation, scaled to approx σ)
Builds bands:
upper = center + spread * multiplier
lower = max(center - spread * multiplier, 0)
Flags a bar as “high volume” if:
It passes the mode logic:
Classic abs: volume > upper
Change mode: abs(volume - volume ) > upper
Z-score mode: z-score ≥ multiplier
AND the relative filter (optional): volume > average_volume * Min Volume vs Avg
AND it is past the first Skip First N Bars from the start of the chart
Colors the bar and (optionally) the background accordingly.
⸻
2. Inputs
2.1. Statistics
Lookback (len)
Number of bars used to compute the baseline stats (mean / median, std / MAD).
Typical values: 50–200.
StdDev / Z-Score Multiplier (mult)
How far from the baseline a bar must be to count as “high volume”.
In classic mode: volume > mean + mult × std
In z-score mode: z ≥ mult
Typical values: 1.0–2.5.
Use EMA Instead of SMA? (smooth_with_ema)
Off → uses SMA (slower but smoother).
On → uses EMA (reacts faster to recent changes).
Use Robust Stats (Median & MAD)? (use_robust)
Off → mean + standard deviation
On → median + MAD (less sensitive to a few insane spikes)
Useful for assets with occasional volume blow-ups.
⸻
2.2. Detection Mode
These inputs control how “unusual” is defined.
• Use Volume Change vs Previous Bar? (mode_change)
• Off (default) → uses absolute volume.
• On → uses abs(volume - volume ).
You then detect jumps in volume rather than absolute size.
Note: This is ignored if Z-Score mode is switched on (see below).
• Use Z-Score on Volume? (Overrides change) (mode_zscore)
• Off → high volume when raw value exceeds the upper band.
• On → computes z-score = (value − center) / spread and flags a bar as high when z ≥ multiplier.
Z-score mode can be combined with robust stats for more stable thresholds.
• Min Volume vs Avg (Filter) (min_rel_mult)
An extra filter to ignore tiny-volume bars that are statistically “weird” but not meaningful.
• 0.0 → no filter (all stats-based candidates allowed).
• 1.0 → high-volume bar must also be at least equal to average volume.
• 1.5 → bar must be ≥ 1.5 × average volume.
• Skip First N Bars (from start of chart) (skip_open_bars)
Skips the first N bars of the chart when evaluating high-volume conditions.
This is mostly a safety / cosmetic option to avoid weird behavior on very early bars or backfill.
⸻
2.3. Visuals
• Show Volume Bands? (show_bands)
• If on, plots:
• Upper band (upper)
• Lower band (lower)
• Center line (vol_center)
These are plotted on the same pane as the script (usually the price chart).
• Also Highlight Background? (use_bg)
• If on, fills the background on high-volume bars with High-Vol Background.
• High-Vol Bar Transparency (0–100) (bar_transp)
Controls the opacity of the high-volume bar colors (up / down).
• 0 → fully opaque
• 100 → fully transparent (no visible effect)
• Up Color (upColor) / Down Color (dnColor)
• Regular bar colors (non high-volume) for up and down bars.
• Up High-Vol Base Color (upHighVolBase) / Down High-Vol Base Color (dnHighVolBase)
Base colors used for high-volume up/down bars. Transparency is applied on top of these via bar_transp.
• High-Vol Background (bgHighVolColor)
Background color used when Also Highlight Background? is enabled.
⸻
3. What gets colored and how
• Bar color (barcolor)
• Up bar:
• High volume → Up High-Vol Color
• Normal volume → Up Color
• Down bar:
• High volume → Down High-Vol Color
• Normal volume → Down Color
• Flat bar → neutral gray
• Background color (bgcolor)
• If Also Highlight Background? is on, high-volume bars get High-Vol Background.
• Otherwise, background is unchanged.
⸻
4. Alerts
The indicator exposes three alert conditions:
• High Volume Bar
Triggers whenever is_high is true (up or down).
• High Volume Up Bar
Triggers only when is_high is true and the bar closed up (close > open).
• High Volume Down Bar
Triggers only when is_high is true and the bar closed down (close < open).
You can use these in TradingView’s “Create Alert” dialog to:
• Get notified of potential breakout / exhaustion bars.
• Trigger webhook events for bots / custom infra.
⸻
5. Recommended presets
5.1. “Classic” high-volume detector (closest to original)
• Lookback: 150–200
• StdDev / Z-Score Multiplier: 1.0–1.5
• Use EMA Instead of SMA?: off
• Use Robust Stats?: off
• Use Volume Change vs Previous Bar?: off
• Use Z-Score on Volume?: off
• Min Volume vs Avg (Filter): 0.0–1.0
Behavior: Flags bars whose volume is notably above the recent average (plus a bit of noise filtering), same spirit as your initial implementation.
⸻
5.2. Volatility-aware (Z-score) mode
• Lookback: 100–200
• StdDev / Z-Score Multiplier: 1.5–2.0
• Use EMA Instead of SMA?: on
• Use Robust Stats?: on (if asset has huge spikes)
• Use Volume Change vs Previous Bar?: off (ignored anyway in z-score mode)
• Use Z-Score on Volume?: on
• Min Volume vs Avg (Filter): 0.5–1.0
Behavior: Flags bars that are “statistically extreme” relative to recent volume behavior, not just absolutely large. Good for assets where baseline volume drifts over time.
⸻
5.3. “Wake-up bar” (volume acceleration)
• Lookback: 50–100
• StdDev / Z-Score Multiplier: 1.0–1.5
• Use EMA Instead of SMA?: on
• Use Robust Stats?: optional
• Use Volume Change vs Previous Bar?: on
• Use Z-Score on Volume?: off
• Min Volume vs Avg (Filter): 0.5–1.0
Behavior: Emphasis on sudden increases in volume rather than absolute size – useful to catch “first active bar” after a quiet period.
⸻
6. Limitations / notes
• Time-of-day effects
The script currently treats the entire chart as one continuous “session”. On 24/7 markets (crypto) this is fine. For regular-session assets (equities, futures), volume naturally spikes at open/close; you may want to:
• Use a shorter Lookback, or
• Add a session-aware filter in a future iteration.
• Illiquid symbols
On very low-liquidity symbols, robust stats (Use Robust Stats) and a non-zero Min Volume vs Avg can help avoid “everything looks extreme” problems.
• Overlay behavior
overlay = true means:
• Bars are recolored on the price pane.
• Volume bands are also drawn on the price pane if enabled.
If you want a dedicated panel for the bands, duplicate the logic in a separate script with overlay = false.
Bitcoin vs M2 Global Liquidity (Lead 3M) - Table Ticker═══════════════════════════════════════════════════════════════
Bitcoin vs M2 Global Liquidity - Regression Indicator
═══════════════════════════════════════════════════════════════
TECHNICAL SPECS
• Pine Script v6
• Overlay: false (separate pane)
• Data sources: 5 M2 series + 4 FX pairs (request.security)
• Calculation: Rolling OLS linear regression with configurable lead
• Output: Regression line + ±1σ/±2σ confidence bands + R² ticker
CORE FUNCTIONALITY
Aggregates M2 money supply from 5 central banks (CN, US, EU, JP, GB),
converts to USD, applies time-lead, runs rolling linear regression
vs Bitcoin price, plots predicted value with confidence intervals.
CONFIGURABLE PARAMETERS
Input Controls:
• Lead Period: 0-365 days (default: 90)
• Lookback Window: 50-2000 bars (default: 750)
• Bands: Toggle ±1σ and ±2σ visibility
• Colors: BTC, M2, regression line, confidence zones
• Ticker: Position, size, colors, transparency
Advanced Settings:
• Table display: R², lead, M2 total, country breakdown (%)
• Ticker customization: 9 position options, 6 text sizes
• Border: Width 0-10px, color, outline-only mode
DATA AGGREGATION
Sources (via request.security):
• ECONOMICS:CNM2, USM2, EUM2, JPM2, GBM2
• FX_IDC:CNYUSD, JPYUSD (others: FX:EURUSD, GBPUSD)
• Conversion: All M2 → USD → Sum / 1e12 (trillions)
REGRESSION ENGINE
• Arrays: m2Array, btcArray (dynamic sizing, auto-trim)
• Window: Rolling (lookbackPeriod bars)
• Lead: Time-shift via array indexing (i + leadPeriodDays)
• Calc: Manual OLS (covariance/variance), no built-in ta functions
• Outputs: slope, intercept, r2, stdResiduals
CONFIDENCE BANDS
±1σ and ±2σ calculated from standard deviation of residuals.
Fill zones between upper/lower bounds with configurable transparency.
ALERTS
5 pre-configured alertcondition():
• Divergence > 15%
• Price crosses ±1σ bands (up/down)
• Price crosses ±2σ bands (up/down)
TICKER TABLE
Dynamic table.new() with 9 rows:
• R² value (4 decimals)
• Lead period (days + months)
• M2 Global total (trillions USD)
• Country breakdown: CN, US, EU, JP, GB (absolute + %)
• Optional: Hide/show M2 details
VISUAL CUSTOMIZATION
All plot() elements support:
• Color picker inputs (group="Couleurs")
• Line width: 1-3px
• Transparency: 0-100% for zones
• Offset: M2 plot has +leadPeriodDays offset option
PERFORMANCE
• Max arrays size: lookbackPeriod + leadPeriodDays + 200
• Calculations: Only when array.size >= lookbackPeriod + leadPeriodDays
• Table update: barstate.islast (once per bar)
• Request.security: gaps_off mode
CODE STRUCTURE
1. Inputs (lines 7-54)
2. Data fetch (lines 56-76)
3. M2 aggregation (line 78)
4. Array management (lines 84-95)
5. Regression calc (lines 97-172)
6. Prediction + bands (lines 174-183)
7. Plots (lines 185-199)
8. Ticker table (lines 201-236)
9. Alerts (lines 238-246)
DEPENDENCIES
None. Pure Pine Script v6. No external libraries.
LIMITATIONS
• Daily timeframe recommended (1D)
• Requires 750+ bars history for optimal calculation
• M2 data availability: TradingView ECONOMICS feed
• Max lines: 500 (declared in indicator())
CUSTOMIZATION EXAMPLES
• Shorter lookback (200d): More reactive, lower R²
• Longer lookback (1500d): More stable, regime mixing
• No bands: Set showBands=false for clean view
• Different lead: Test 60d, 120d for sensitivity analysis
TECHNICAL NOTES
• Manual OLS implementation (no ta.linreg)
• Array-based lead application (not plot offset)
• M2 values stored in trillions (/ 1e12) for readability
• Residuals array cleared/rebuilt each calculation
OPEN SOURCE
Code fully visible. Modify, fork, analyze freely.
No hidden calculations. No proprietary data.
VERSION
1.0 | November 2025 | Pine Script v6
═══════════════════════════════════════════════════════════════
Price Distance from SMA (% with StdDev)Measures the % distance of current price from given sma and how it compares to historic.
Spot-Futures SpreadSpot-Futures Spread Indicator
A comprehensive indicator that automatically calculates and visualizes the percentage spread between spot and perpetual futures prices across multiple exchanges.
Key Features:
Automatic Exchange Detection - Automatically detects your current exchange and finds the corresponding spot/futures pair
Smart Fallback System - If the counterpart isn't available on your exchange, it automatically searches across 7+ major exchanges (Binance, Bybit, OKX, Gate.io, MEXC, KuCoin, HTX) and uses the first valid match
Multi-Exchange Support - Works with 14 exchanges including Binance, Bybit, OKX, MEXC, BitGet, Gate.io, KuCoin, and more
Clear Exchange Attribution - Shows exactly which exchanges are providing spot and futures data in the statistics table
Configurable Moving Average - Track the average spread with customizable period
Standard Deviation Bands - Identify unusual spread conditions with Bollinger-style bands
Built-in Alerts - Get notified when spread crosses bands or zero (parity)
Statistics Table - Real-time stats showing current spread, MA, std dev, and bands
Manual Override Options - Advanced users can manually specify exchanges and symbols
How It Works:
The indicator calculates the spread as: (Futures Price - Spot Price) / Spot Price × 100
Positive spread = Futures trading at a premium (contango)
Negative spread = Futures trading at a discount (backwardation)
Zero = Parity between spot and futures
Use Cases:
Funding Rate Analysis - Correlates with perpetual funding rates
Arbitrage Opportunities - Identify significant spot-futures divergences
Market Sentiment - Premium/discount indicates bullish/bearish positioning
Cross-Exchange Analysis - Compare spreads when spot and futures are on different exchanges
Smart Features:
Works whether you're viewing a spot or futures chart
Automatically handles exchange-specific perpetual contract naming (.P, PERP, SWAP, etc.)
Color-coded visualization (green for premium, red for discount)
Customizable colors and display options
Background shading based on spread direction
Perfect For:
Crypto traders monitoring funding rates, arbitrage traders, market makers, and anyone interested in spot-futures dynamics across multiple exchanges.
Getting Started:
Simply add the indicator to any spot or perpetual futures chart. It will automatically detect the exchange and find the corresponding pair. The statistics table shows which exchanges are being used for maximum transparency.
Note: The indicator automatically ignores invalid symbols, so you'll never see errors even if a specific pair doesn't exist on a particular exchange.
Kudos to @AlekMel that made the "Spot - Fut Spread v2" indicator that I enhance the Automatic detection feature which was not working in some case.
Breakouts & Pullbacks [Trendoscope®]🎲 Breakouts & Pullbacks - All-Time High Breakout Analyzer
Probability-Based Post-Breakout Behavior Statistics | Real-Time Pullback & Runup Tracker
A professional-grade Pine Script v6 indicator designed specifically for analyzing the historical and real-time behavior of price after strong All-Time High (ATH) breakouts. It automatically detects significant ATH breakouts (with configurable minimum gap), measures the depth and duration of pullbacks, the speed of recovery, and the subsequent run-up strength — then turns all this data into easy-to-read statistical probabilities and percentile ranks.
Perfect for swing traders, breakout traders, and anyone who wants objective, data-driven insight into questions like:
“How deep do pullbacks usually get after a strong ATH breakout?”
“How many bars does it typically take to recover the breakout level?”
“What is the median run-up after recovery?”
“Where is the current pullback or run-up relative to historical ones?”
🎲 Core Concept & Methodology
Indicator is more suitable for indices or index ETFs that generally trade in all-time highs however subjected to regular pullbacks, recovery and runups.
For every qualified ATH breakout, the script identifies 4 distinct phases:
Breakout Point – The exact bar where price closes above the previous ATH after at least Minimum Gap bars.
Pullback Phase – From breakout candle high → lowest low before price recovers back above the breakout level.
Recovery Phase – From the pullback low → the bar where price first trades back above the original breakout price.
Post-Recovery Run-up Phase – From the recovery point → current price (or highest high achieved so far).
Each completed cycle is stored permanently and used to build a growing statistical database unique to the loaded chart and timeframe.
🎲 Visual Elements
Yellow polyline triangle connecting Previous ATH / Pullback point(start), New ATH Breakout point (end), Recovery point (lowest pullback price), and extends to recent ATH price.
Small green label at the pullback low showing detailed tooltip on hover with all measured values
Clean, color-coded statistics table in the top-right corner (visible only on the last bar)
Powerful Statistics Table – The Heart of the Indicator
The table constantly compares the current situation against all past qualified breakouts and shows details about pullbacks, and runups that help us calculate the probability of next pullback, recovery or runup.
🎲 Settings & Inputs
Minimum Gap
The minimum number of bars that must pass between breaking a new ATH and the previous one.
Higher values = stricter filter → only the strongest, cleanest breakouts are counted.
Lower values = more data points (useful on lower timeframes or very trending instruments).
Recommendation:
Daily charts: 30–50
4H charts: 40–80
1H charts: 100–200
🎲 How to Use It in Practice
This indicator helps investors to understand when to be bullish, bearish or cautious and anticipate regular pullbacks, recovery of markets using quantitative methods.
The indicator does not generate buy/sell signals. However, helps traders set expectations and anticipate market movements based on past behavior.
Last CLOSED Bar OHLCThis TradingView Pine Script (@version=6) creates a label that displays the previous fully closed candlestick’s OHLC data on the chart.
Indicator for Confirming AccumulationStrong Buying Pressure Confirmation Indicator
This indicator helps identify stocks showing strong buying pressure, highlighting moments when significant money is flowing into a symbol. By analyzing active buying volume, price strength, momentum, and institutional-style accumulation, it automatically marks stocks with powerful upward behavior.
It is useful for spotting early accumulation, potential breakouts, and high-probability bullish setups.
Global M2 Money Supply Growth (GDP-Weighted)📊 Global M2 Money Supply Growth (GDP-Weighted)
This indicator tracks the weighted aggregate M2 money supply growth across the world's four largest economies: United States, China, Eurozone, and Japan. These economies represent approximately 69.3 trillion USD in combined GDP and account for the majority of global liquidity, making this a comprehensive macro indicator for analyzing worldwide monetary conditions.
════════════════════════════════════════════
🔧 KEY FEATURES:
📈 GDP-Weighted Aggregation
Each economy is weighted proportionally by its nominal GDP using 2025 IMF World Economic Outlook data:
• United States: 44.2% (30.62 trillion USD)
• China: 28.0% (19.40 trillion USD)
• Eurozone: 21.6% (15.0 trillion USD)
• Japan: 6.2% (4.28 trillion USD)
The weights are fully adjustable through the indicator settings, allowing you to update them annually as new IMF forecasts are released (typically April and October).
⏱️ Multiple Time Period Options
Choose between three calculation methods to analyze different timeframes:
• YoY (Year-over-Year): 12-month growth rate for identifying long-term liquidity trends and cycles
• MoM (Month-over-Month): 1-month growth rate for detecting short-term monetary policy shifts
• QoQ (Quarter-over-Quarter): 3-month growth rate for medium-term trend analysis
🔄 Advanced Offset Function
Shift the entire indicator forward by 0-365 days to test lead/lag relationships between global liquidity and asset prices. Research suggests a 56-70 day lag between M2 changes and Bitcoin price movements, but you can experiment with different offsets for various assets (equities, gold, commodities, etc.).
🌍 Individual Country Breakdown
Real-time display of each economy's M2 growth rate with:
• Current percentage change (YoY/MoM/QoQ)
• GDP weight contribution
• Color-coded values (green = monetary expansion, red = contraction)
📊 Smart Overlay Capability
Displays directly on your main price chart with an independent left-side scale, allowing you to visually correlate global liquidity trends with any asset's price action without cluttering the chart.
🔧 Customizable GDP Weights
All GDP values can be adjusted through the indicator settings without editing code, making annual updates simple and accessible for all users.
════════════════════════════════════════════
📡 DATA SOURCES:
All M2 money supply data is sourced from ECONOMICS (Trading Economics) for consistency and reliability:
• ECONOMICS:USM2 (United States)
• ECONOMICS:CNM2 (China)
• ECONOMICS:EUM2 (Eurozone)
• ECONOMICS:JPM2 (Japan)
All values are normalized to USD using current daily exchange rates (USDCNY, EURUSD, USDJPY) before GDP-weighted aggregation, ensuring accurate cross-country comparisons.
══════════════════════════════════════════════
💡 USE CASES & APPLICATIONS:
🔹 Liquidity Cycle Analysis
Track global monetary expansion/contraction cycles to identify when central banks are coordinating loose or tight monetary policies.
🔹 Market Timing & Risk Assessment
High M2 growth (>10%) historically correlates with risk-on environments and rising asset prices across crypto, equities, and commodities. Negative M2 growth signals monetary tightening and potential market corrections.
🔹 Bitcoin & Crypto Correlation
Compare with Bitcoin price using the offset feature to identify the optimal lag period. Many traders use 60-70 day offsets to predict crypto market movements based on liquidity changes.
🔹 Macro Portfolio Allocation
Use as a regime filter to adjust portfolio exposure: increase risk assets during liquidity expansion, reduce during contraction.
🔹 Central Bank Policy Divergence
Monitor individual country metrics to identify when major central banks are pursuing divergent policies (e.g., Fed tightening while China eases).
🔹 Inflation & Economic Forecasting
Rapid M2 growth often leads inflation by 12-18 months, making this a leading indicator for future inflation trends.
🔹 Recession Early Warning
Negative M2 growth is extremely rare and has preceded major recessions, making this a valuable risk management tool.
════════════════════════════════════════════
📊 INTERPRETATION GUIDE:
🟢 +10% or Higher
Aggressive monetary expansion, typically during crises (2001, 2008, 2020). The COVID-19 period saw M2 growth reach 20-27%, which preceded significant inflation and asset price surges. Strong bullish signal for risk assets.
🟢 +6% to +10%
Above-average liquidity growth. Central banks are providing stimulus beyond normal levels. Generally favorable for equities, crypto, and commodities.
🟡 +3% to +6%
Normal/healthy growth rate, roughly in line with GDP growth plus 2% inflation targets. Neutral environment with moderate support for risk assets.
🟠 0% to +3%
Slowing liquidity, potential tightening phase beginning. Central banks may be raising rates or reducing balance sheets. Caution warranted for high-beta assets.
🔴 Negative Growth
Monetary contraction - extremely rare. Only occurred during aggressive Fed tightening in 2022-2023. Strong warning signal for risk assets, often precedes recessions or major market corrections.
════════════════════════════════════════════
🎯 OPTIMAL USAGE:
📅 Recommended Timeframes:
• Daily or Weekly charts for macro analysis
• Monthly charts for very long-term trends
💹 Compatible Asset Classes:
• Cryptocurrencies (especially Bitcoin, Ethereum)
• Equity indices (S&P 500, NASDAQ, global markets)
• Commodities (Gold, Silver, Oil)
• Forex majors (DXY correlation analysis)
⚙️ Suggested Settings:
• Default: YoY calculation with 0 offset for current liquidity conditions
• Bitcoin traders: YoY with 60-70 day offset for predictive analysis
• Short-term traders: MoM with 0 offset for recent policy changes
• Quarterly rebalancers: QoQ with 0 offset for medium-term trends
════════════════════════════════════════════
📋 VISUAL DISPLAY:
The indicator plots a blue line showing the selected growth metric (YoY/MoM/QoQ), with a dashed reference line at 0% to clearly identify expansion vs. contraction regimes.
A comprehensive table in the top-right corner displays:
• Current global M2 growth rate (large, prominent display)
• Individual country breakdowns with their GDP weights
• Color-coded growth rates (green for positive, red for negative)
════════════════════════════════════════════
🔄 MAINTENANCE & UPDATES:
GDP weights should be updated annually (ideally in April or October) when the IMF releases new World Economic Outlook forecasts. Simply adjust the four GDP input parameters in the indicator settings - no code editing required.
The relative GDP proportions between the Big 4 economies change very gradually (typically <1-2% per year), so even if you update weights once every 1-2 years, the impact on the indicator's accuracy is minimal.
════════════════════════════════════════════
💭 TRADING PHILOSOPHY:
This indicator embodies the principle that "liquidity drives markets." By tracking the combined M2 money supply of the world's largest economies, weighted by their economic size, you gain insight into the fundamental liquidity conditions that underpin all asset prices.
Unlike single-country M2 indicators, this GDP-weighted approach captures the true global picture, accounting for the fact that US monetary policy has 2x the impact of Japanese policy due to economic size differences.
Perfect for macro-focused traders, long-term investors, and anyone seeking to understand the "tide that lifts all boats" in financial markets.
════════════════════════════════════════════
Created for traders and investors who incorporate global liquidity trends into their decision-making process. Best used alongside other technical and fundamental analysis tools for comprehensive market assessment.
⚠️ Disclaimer: M2 money supply is a lagging macroeconomic indicator. Past correlations do not guarantee future results. Always use proper risk management and combine with other analysis methods.
Mean Reversion Signals (v6.4) – VWAP ±SD use with "support and resistence levels with breaks {lux algo} " at 5m tf for better results
Price Drop CounterThe Price Drop Counter is a very basic statistical indicator.
See it as an analytical tool that tracks how many times an asset's price has dropped by a specified percentage from its recent peak within a defined date range.
The indicator monitors the highest price reached and counts each occurrence when the price falls by your chosen threshold, then resets its peak tracking point after each drop is registered.
Uses
Volatility Assessment: Measure how frequently significant price corrections occur during specific periods
Market Behavior Analysis: Compare drop frequency across different timeframes or market conditions
Risk Evaluation: Identify assets or periods with higher downside volatility
Historical Pattern Recognition: Study how often major pullbacks happened during bull or bear markets
Backtesting Support: Analyze how your strategy would perform based on the frequency of drawdowns
How to use it
Add the indicator to your TradingView chart
Configure the Percent Drop (%) to define your threshold (default: 10%). The indicator will count each time price falls by this percentage from the most recent high
IMPORTANT Set your Start Date and End Date to analyze a specific period of interest
The blue step-line plot shows the cumulative count of drops within your date range
Adjust the percentage threshold based on your analysis needs - use smaller values (2-5%) for more frequent signals or larger values (15-20%) for major corrections only
The counter resets its high-water mark after each qualifying drop, allowing it to track multiple sequential drops within the same period.
NormalizedIndicatorsNormalizedIndicators Library - Comprehensive Trend Normalization & Pre-Calibrated Systems
Overview
The NormalizedIndicators Library is an advanced Pine Script™ collection that provides normalized trend-following indicators, calculation functions, and pre-calibrated consensus systems for technical analysis. This library extends beyond simple indicator normalization by offering battle-tested, optimized parameter sets for specific assets and timeframes.
The main advantage lies in its dual functionality:
Individual normalized indicators with standardized outputs (1 = bullish, -1 = bearish, 0 = neutral)
Pre-calibrated consensus functions that combine multiple indicators with asset-specific optimizations
This enables traders to either build custom strategies using individual indicators or leverage pre-optimized systems designed for specific markets.
📊 Library Structure
The library is organized into three main sections:
1. Trend-Following Indicators
Individual indicators normalized to standard output format
2. Calculation Indicators
Statistical and mathematical analysis functions
3. Pre-Calibrated Systems ⭐ NEW
Asset-specific consensus configurations with optimized parameters
🔄 Trend-Following Indicators
Stationary Indicators
These oscillate around a fixed value and are not bound to price.
TSI() - True Strength Index ⭐ NEW
Source: TradingView
Parameters:
price: Price source
long: Long smoothing period
short: Short smoothing period
signal: Signal line period
Logic: Double-smoothed momentum oscillator comparing TSI to its signal line
Signal:
1 (bullish): TSI ≥ TSI EMA
0 (bearish): TSI < TSI EMA
Use Case: Momentum confirmation with trend direction
SMI() - Stochastic Momentum Index ⭐ NEW
Source: TradingView
Parameters:
src: Price source
lengthK: Stochastic period
lengthD: Smoothing period
lengthEMA: Signal line period
Logic: Enhanced stochastic that measures price position relative to midpoint of high/low range
Signal:
1 (bullish): SMI ≥ SMI EMA
0 (bearish): SMI < SMI EMA
Use Case: Overbought/oversold with momentum direction
BBPct() - Bollinger Bands Percent
Source: Algoalpha X Sushiboi77
Parameters:
Length: Period for Bollinger Bands
Factor: Standard deviation multiplier
Source: Price source (typical: close)
Logic: Calculates the position of price within the Bollinger Bands as a percentage
Signal:
1 (bullish): when positionBetweenBands > 50
-1 (bearish): when positionBetweenBands ≤ 50
Special Feature: Uses an array to store historical standard deviations for additional analysis
RSI() - Relative Strength Index
Source: TradingView
Parameters:
len: RSI period
src: Price source
smaLen: Smoothing period for RSI
Logic: Classic RSI with additional SMA smoothing
Signal:
1 (bullish): RSI-SMA > 50
-1 (bearish): RSI-SMA < 50
0 (neutral): RSI-SMA = 50
Non-Stationary Indicators
These follow price movement and have no fixed boundaries.
NorosTrendRibbonSMA() & NorosTrendRibbonEMA()
Source: ROBO_Trading
Parameters:
Length: Moving average and channel period
Source: Price source
Logic: Creates a price channel based on the highest/lowest MA value over a specified period
Signal:
1 (bullish): Price breaks above upper band
-1 (bearish): Price breaks below lower band
0 (neutral): Price within channel (maintains last state)
Difference: SMA version uses simple moving averages, EMA version uses exponential
TrendBands()
Source: starlord_xrp
Parameters: src (price source)
Logic: Uses 12 EMAs (9-30 period) and checks if all are rising or falling simultaneously
Signal:
1 (bullish): All 12 EMAs are rising
-1 (bearish): All 12 EMAs are falling
0 (neutral): Mixed signals
Special Feature: Very strict conditions - extremely strong trend filter
Vidya() - Variable Index Dynamic Average
Source: loxx
Parameters:
source: Price source
length: Main period
histLength: Historical period for volatility calculation
Logic: Adaptive moving average that adjusts to volatility
Signal:
1 (bullish): VIDYA is rising
-1 (bearish): VIDYA is falling
VZO() - Volume Zone Oscillator
Parameters:
source: Price source
length: Smoothing period
volumesource: Volume data source
Logic: Combines price and volume direction, calculates the ratio of directional volume to total volume
Signal:
1 (bullish): VZO > 14.9
-1 (bearish): VZO < -14.9
0 (neutral): VZO between -14.9 and 14.9
TrendContinuation()
Source: AlgoAlpha
Parameters:
malen: First HMA period
malen1: Second HMA period
theclose: Price source
Logic: Uses two Hull Moving Averages for trend assessment with neutrality detection
Signal:
1 (bullish): Uptrend without divergence
-1 (bearish): Downtrend without divergence
0 (neutral): Trend and longer MA diverge
LeonidasTrendFollowingSystem()
Source: LeonidasCrypto
Parameters:
src: Price source
shortlen: Short EMA period
keylen: Long EMA period
Logic: Simple dual EMA crossover system
Signal:
1 (bullish): Short EMA < Key EMA
-1 (bearish): Short EMA ≥ Key EMA
ysanturtrendfollower()
Source: ysantur
Parameters:
src: Price source
depth: Depth of Fibonacci weighting
smooth: Smoothing period
bias: Percentage bias adjustment
Logic: Complex system with Fibonacci-weighted moving averages and bias bands
Signal:
1 (bullish): Weighted MA > smoothed MA (with upward bias)
-1 (bearish): Weighted MA < smoothed MA (with downward bias)
0 (neutral): Within bias zone
TRAMA() - Trend Regularity Adaptive Moving Average
Source: LuxAlgo
Parameters:
src: Price source
length: Adaptation period
Logic: Adapts to trend regularity - accelerates in stable trends, slows in consolidations
Signal:
1 (bullish): Price > TRAMA
-1 (bearish): Price < TRAMA
0 (neutral): Price = TRAMA
HullSuite()
Source: InSilico
Parameters:
_length: Base period
src: Price source
_lengthMult: Length multiplier
Logic: Uses Hull Moving Average with lagged comparisons for trend determination
Signal:
1 (bullish): Current Hull > Hull 2 bars ago
-1 (bearish): Current Hull < Hull 2 bars ago
0 (neutral): No change
STC() - Schaff Trend Cycle
Source: shayankm (described as "Better MACD")
Parameters:
length: Cycle period
fastLength: Fast MACD period
slowLength: Slow MACD period
src: Price source
Logic: Combines MACD concepts with stochastic normalization for early trend signals
Signal:
1 (bullish): STC is rising
-1 (bearish): STC is falling
🧮 Calculation Indicators
These functions provide specialized mathematical calculations for advanced analysis.
LCorrelation() - Long-term Correlation
Creator: unicorpusstocks
Parameters:
Input: First time series
Compare: Second time series
Logic: Calculates the average of correlations across 6 different periods (30, 60, 90, 120, 150, 180)
Returns: Correlation value between -1 and 1
Application: Long-term relationship analysis between assets, markets, or indicators
MCorrelation() - Medium-term Correlation
Creator: unicorpusstocks
Parameters:
Input: First time series
Compare: Second time series
Logic: Calculates the average of correlations across 6 different periods (15, 30, 45, 60, 75, 90)
Returns: Correlation value between -1 and 1
Application: Medium-term relationship analysis with higher sensitivity
assetBeta() - Beta Coefficient
Creator: unicorpusstocks
Parameters:
measuredSymbol: The asset to be measured
baseSymbol: The reference asset (e.g., market index)
Logic:
Calculates Beta across 4 different time horizons (50, 100, 150, 200 periods)
Beta = Correlation × (Asset Standard Deviation / Market Standard Deviation)
Returns the average of all 4 Beta values
Returns: Beta value (typically 0-2, can be higher/lower)
Interpretation:
Beta = 1: Asset moves in sync with the market
Beta > 1: Asset more volatile than market
Beta < 1: Asset less volatile than market
Beta < 0: Asset moves inversely to the market
🎯 Pre-Calibrated Systems ⭐ NEW FEATURE
These are ready-to-use consensus functions with optimized parameters for specific assets and timeframes. Each calibration has been fine-tuned through extensive backtesting to provide optimal performance for its target market.
Universal Calibrations
virtual_4d_cal(src) - Virtual/General 4-Day Timeframe
Use Case: General purpose 4-day chart analysis
Optimized For: Broad crypto market on 4D timeframe
Indicators Used: BBPct, Noro's, RSI, VIDYA, HullSuite, TrendContinuation, Leonidas, TRAMA
Characteristics: Balanced sensitivity for swing trading
virtual_1d_cal(src) - Virtual/General 1-Day Timeframe
Use Case: General purpose daily chart analysis
Optimized For: Broad crypto market on 1D timeframe
Indicators Used: BBPct, Noro's, RSI, VIDYA, HullSuite, TrendContinuation, Leonidas, TRAMA
Characteristics: Standard daily trading parameters
Cryptocurrency Specific
sui_cal(src) - SUI Ecosystem Tokens
Use Case: Tokens in the SUI blockchain ecosystem
Timeframe: 1D
Characteristics: Fast-response parameters for high volatility projects
deep_1d_cal(src) - DEEP Token Daily
Use Case: Deepbook (DEEP) token analysis
Timeframe: 1D
Characteristics: Tuned for liquidity protocol token behavior
wal_1d_cal(src) - WAL Token Daily
Use Case: Specific for WAL token
Timeframe: 1D
Characteristics: Mid-range sensitivity parameters
sns_1d_cal(src) - SNS Token Daily
Use Case: Specific for SNS token
Timeframe: 1D
Characteristics: Balanced parameters for DeFi tokens
meme_cal(src) - Meme Coin Calibration
Use Case: Highly volatile meme coins
Timeframe: Various
Characteristics: Wider parameters to handle extreme volatility
Warning: Meme coins carry extreme risk
base_cal(src) - BASE Ecosystem Tokens
Use Case: Tokens on the BASE blockchain
Timeframe: Various
Characteristics: Optimized for L2 ecosystem tokens
Solana Ecosystem
sol_4d_cal(src) - Solana 4-Day
Use Case: SOL token on 4-day charts
Characteristics: Responsive parameters for major L1 blockchain
sol_meme_4d_cal(src) - Solana Meme Coins 4-Day
Use Case: Meme coins on Solana blockchain
Timeframe: 4D
Characteristics: Handles high volatility of Solana meme sector
Ethereum Ecosystem
eth_4d_cal(src) - Ethereum 4-Day
Use Case: ETH and major ERC-20 tokens
Timeframe: 4D
Indicators Used: BBPct, Noro's, RSI, TSI, HullSuite, TrendContinuation, Leonidas, SMI
Special: Uses TSI and SMI instead of VIDYA and TRAMA
Characteristics: Tuned for Ethereum's market cycles
Bitcoin
btc_4d_cal(src) - Bitcoin 4-Day
Use Case: Bitcoin on 4-day charts
Timeframe: 4D
Characteristics: Slower, smoother parameters for the most established crypto asset
Notes: Conservative parameters suitable for position trading
Traditional Markets
qqq_4d_cal(src) - QQQ (Nasdaq-100 ETF) 4-Day
Use Case: QQQ ETF and tech-heavy indices
Timeframe: 4D
Characteristics: Largest parameter sets reflecting lower volatility of traditional markets
Notes: Can be adapted for similar large-cap tech indices
💡 Usage Examples
Example 1: Using Pre-Calibrated System
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
// Simple one-line implementation for Bitcoin
btcSignal = lib.btc_4d_cal(close)
// Trading logic
longCondition = btcSignal > 0.5
shortCondition = btcSignal < -0.5
// Plot
plot(btcSignal, "BTC 4D Consensus", color.orange)
Example 2: Custom Multi-Indicator Consensus
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
// Build your own combination
signal1 = lib.BBPct(20, 2.0, close)
signal2 = lib.RSI(14, close, 5)
signal3 = lib.TRAMA(close, 50)
signal4 = lib.TSI(close, 25, 13, 13)
// Custom consensus
customConsensus = math.avg(signal1, signal2, signal3, signal4)
plot(customConsensus, "Custom Consensus", color.blue)
Example 3: Asset-Specific Strategy Switching
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
// Automatically use the right calibration
signal = switch syminfo.ticker
"BTCUSD" => lib.btc_4d_cal(close)
"ETHUSD" => lib.eth_4d_cal(close)
"SOLUSD" => lib.sol_4d_cal(close)
"QQQ" => lib.qqq_4d_cal(close)
=> lib.virtual_4d_cal(close) // Default
plot(signal, "Auto-Calibrated Signal", color.orange)
Example 4: Correlation-Filtered Trading
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
// Only trade when strong correlation with market exists
spy = request.security("SPY", timeframe.period, close)
correlation = lib.MCorrelation(close, spy)
trendSignal = lib.virtual_1d_cal(close)
// Only signals with positive market correlation
tradeBuy = trendSignal > 0.5 and correlation > 0.5
tradeSell = trendSignal < -0.5 and correlation > 0.5
Example 5: Beta-Adjusted Position Sizing
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
spy = request.security("SPY", timeframe.period, close)
beta = lib.assetBeta(close, spy)
// Adjust position size based on Beta
basePositionSize = 100
adjustedSize = basePositionSize / beta // Less size with high Beta
// Use with calibrated signal
signal = lib.qqq_4d_cal(close)
🎯 Choosing the Right Calibration
Decision Tree
1. What asset are you trading?
Bitcoin → btc_4d_cal()
Ethereum/ERC-20 → eth_4d_cal()
Solana → sol_4d_cal()
Solana memes → sol_meme_4d_cal()
SUI ecosystem → sui_cal()
BASE ecosystem → base_cal()
Meme coins (any chain) → meme_cal()
QQQ/Tech indices → qqq_4d_cal()
Other/General → virtual_4d_cal() or virtual_1d_cal()
2. What timeframe?
Most calibrations are optimized for 4D (4-day) or 1D (daily)
For other timeframes, start with virtual calibrations and adjust
3. What's the asset's volatility?
High volatility (memes, new tokens) → Use meme_cal() or similar
Medium volatility (established alts) → Use specific calibrations
Low volatility (BTC, major indices) → Use btc_4d_cal() or qqq_4d_cal()
⚙️ Technical Details
Normalization Standard
Bullish: 1
Bearish: -1
Neutral: 0 (only for selected indicators)
Calibration Methodology
Pre-calibrated functions were optimized using:
Historical backtesting on target assets
Parameter optimization for maximum Sharpe ratio
Validation on out-of-sample data
Real-time forward testing
Iterative refinement based on market conditions
Advantages of Pre-Calibrations
Instant Deployment: No parameter tuning needed
Asset-Optimized: Tailored to specific market characteristics
Tested Performance: Validated through extensive backtesting
Consistent Framework: All use the same 8-indicator structure
Easy Comparison: Compare different assets using same methodology
Performance Considerations
All functions are optimized for Pine Script v5
Proper use of var for state management
Efficient array operations where needed
Minimal recursive calls
Pre-calibrations add negligible computational overhead
📋 License
This code is subject to the Mozilla Public License 2.0 at mozilla.org
🔧 Installation
pinescriptimport unicorpusstocks/NormalizedIndicators/1
Then use functions with your chosen alias:
pinescript// Individual indicators
lib.BBPct(20, 2.0, close)
lib.RSI(14, close, 5)
lib.TSI(close, 25, 13, 13)
// Pre-calibrated systems
lib.btc_4d_cal(close)
lib.eth_4d_cal(close)
lib.meme_cal(close)
⚠️ Important Notes
General Usage
All indicators are lagging, as is typical for trend-following indicators
Signals should be combined with additional analysis (volume, support/resistance, etc.)
Backtesting is recommended before starting live trading with these signals
Different assets and timeframes may require different parameter optimizations
Pre-Calibrated Systems
Calibrations are optimized for specific timeframes - using them on different timeframes may reduce effectiveness
Market conditions change - what worked historically may need adjustment
Pre-calibrations are starting points, not guaranteed solutions
Always validate performance on your specific use case
Consider current market regime (trending vs. ranging)
Risk Management
Meme coin calibrations are designed for extremely volatile assets - use appropriate position sizing
Pre-calibrated systems do not eliminate risk
Always use stop losses and proper risk management
Past performance does not guarantee future results
Customization
Pre-calibrations can serve as templates for your own optimizations
Feel free to adjust individual parameters within calibration functions
Test modifications thoroughly before live deployment
🎓 Advanced Use Cases
Multi-Asset Portfolio Dashboard
Create a dashboard showing consensus across different assets:
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
btc = request.security("BTCUSD", "4D", close)
eth = request.security("ETHUSD", "4D", close)
sol = request.security("SOLUSD", "4D", close)
btcSignal = lib.btc_4d_cal(btc)
ethSignal = lib.eth_4d_cal(eth)
solSignal = lib.sol_4d_cal(sol)
// Plot all three for comparison
plot(btcSignal, "BTC", color.orange)
plot(ethSignal, "ETH", color.blue)
plot(solSignal, "SOL", color.purple)
Regime Detection
Use correlation and calibrations together:
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
// Detect market regime
btc = request.security("BTCUSD", timeframe.period, close)
correlation = lib.MCorrelation(close, btc)
// Choose strategy based on correlation
signal = correlation > 0.7 ? lib.btc_4d_cal(close) : lib.virtual_4d_cal(close)
Comparative Analysis
Compare asset-specific vs. general calibrations:
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib
specificSignal = lib.btc_4d_cal(close) // BTC-specific
generalSignal = lib.virtual_4d_cal(close) // General
divergence = specificSignal - generalSignal
plot(divergence, "Calibration Divergence", color.yellow)
🚀 Quick Start Guide
For Beginners
Identify Your Asset: What are you trading?
Find the Calibration: Use the decision tree above
One-Line Implementation: signal = lib.btc_4d_cal(close)
Set Thresholds: Buy when > 0.5, sell when < -0.5
Add Risk Management: Always use stops
For Advanced Users
Start with Pre-Calibration: Use as baseline
Analyze Performance: Backtest on your specific market
Fine-Tune Parameters: Adjust individual indicators if needed
Combine with Other Signals: Volume, market structure, etc.
Create Custom Calibrations: Build your own based on library structure
For Developers
Import Library: Access all functions
Mix and Match: Combine indicators creatively
Build Custom Logic: Use indicators as building blocks
Create New Calibrations: Follow the established pattern
Share and Iterate: Contribute to the trading community
🎯 Key Takeaways
✅ 10 normalized indicators - Consistent interpretation across all
✅ 16+ pre-calibrated systems - Ready-to-use for specific assets
✅ Asset-optimized parameters - No guesswork required
✅ Calculation functions - Advanced correlation and beta analysis
✅ Universal framework - Works across crypto, stocks, forex
✅ Professional-grade - Built on proven technical analysis principles
✅ Flexible architecture - Use pre-calibrations or build your own
✅ Battle-tested - Validated through extensive backtesting
NormalizedIndicators Library transforms complex multi-indicator analysis into actionable signals through both customizable individual indicators and pre-optimized consensus systems. Whether you're a beginner looking for plug-and-play solutions or an advanced trader building sophisticated strategies, this library provides the foundation for data-driven trading decisions.WiederholenClaude kann Fehler machen. Bitte überprüfen Sie die Antworten. Sonnet 4.5
indicator CalibrationIndicator Calibration - Multi-Indicator Consensus System
Overview
Indicator Calibration is a powerful consensus-based trading indicator that leverages the MyIndicatorLibrary (NormalizedIndicators) to combine multiple trend-following indicators into a single, actionable signal. By averaging the normalized outputs of up to 8 different trend indicators, this tool provides traders with a clear consensus view of market direction, reducing noise and false signals inherent in single-indicator approaches.
The indicator outputs a value between -1 (strong bearish) and +1 (strong bullish), with 0 representing a neutral market state. This creates an intuitive, easy-to-read oscillator that synthesizes multiple analytical perspectives into one coherent signal.
🎯 Core Concept
Consensus Trading Philosophy
Rather than relying on a single indicator that may give conflicting or premature signals, Indicator Calibration employs a democratic voting system where multiple indicators contribute their normalized opinion:
Each enabled indicator votes: +1 (bullish), -1 (bearish), or 0 (neutral)
The votes are averaged to create a consensus signal
Strong consensus (closer to ±1) indicates high agreement among indicators
Weak consensus (closer to 0) indicates market indecision or transition
Key Benefits
Reduced False Signals: Multiple indicators must agree before strong signals appear
Noise Filtering: Individual indicator quirks are smoothed out by averaging
Customizable: Enable/disable indicators and adjust parameters to suit your trading style
Universal Application: Works across all timeframes and asset classes
Clear Visualization: Simple line oscillator with clear bull/bear zones
📊 Included Indicators
The system can utilize up to 8 normalized trend-following indicators from the library:
1. BBPct - Bollinger Bands Percent
Parameters: Length (default: 20), Factor (default: 2)
Type: Stationary oscillator
Strength: Mean reversion and volatility detection
2. NorosTrendRibbonEMA
Parameters: Length (default: 20)
Type: Non-stationary trend follower
Strength: Breakout detection with momentum confirmation
3. RSI - Relative Strength Index
Parameters: Length (default: 9), SMA Length (default: 4)
Type: Stationary momentum oscillator
Strength: Overbought/oversold with smoothing
4. Vidya - Variable Index Dynamic Average
Parameters: Length (default: 30), History Length (default: 9)
Type: Adaptive moving average
Strength: Volatility-adjusted trend following
5. HullSuite
Parameters: Length (default: 55), Multiplier (default: 1)
Type: Fast-response moving average
Strength: Low-lag trend identification
6. TrendContinuation
Parameters: MA Length 1 (default: 50), MA Length 2 (default: 25)
Type: Dual HMA system
Strength: Trend quality assessment with neutral states
7. LeonidasTrendFollowingSystem
Parameters: Short Length (default: 21), Key Length (default: 10)
Type: Dual EMA crossover
Strength: Simple, reliable trend tracking
8. TRAMA - Trend Regularity Adaptive Moving Average
Parameters: Length (default: 50)
Type: Adaptive trend follower
Strength: Adjusts to trend stability
⚙️ Input Parameters
Source Settings
Source: Choose your price input (default: close)
Can be modified to: open, high, low, close, hl2, hlc3, ohlc4, hlcc4
Indicator Selection
Each indicator can be enabled or disabled via checkboxes:
use_bbpct: Enable/disable Bollinger Bands Percent
use_noros: Enable/disable Noro's Trend Ribbon
use_rsi: Enable/disable RSI
use_vidya: Enable/disable VIDYA
use_hull: Enable/disable Hull Suite
use_trendcon: Enable/disable Trend Continuation
use_leonidas: Enable/disable Leonidas System
use_trama: Enable/disable TRAMA
Parameter Customization
Each indicator has its own parameter group where you can fine-tune:
val 1: Primary period/length parameter
val 2: Secondary parameter (multiplier, smoothing, etc.)
📈 Signal Interpretation
Output Line (Orange)
The main output oscillates between -1 and +1:
+1.0 to +0.5: Strong bullish consensus (all or most indicators agree on uptrend)
+0.5 to +0.2: Moderate bullish bias (bullish indicators outnumber bearish)
+0.2 to -0.2: Neutral zone (mixed signals or transition phase)
-0.2 to -0.5: Moderate bearish bias (bearish indicators outnumber bullish)
-0.5 to -1.0: Strong bearish consensus (all or most indicators agree on downtrend)
Reference Lines
Green line (+1): Maximum bullish consensus
Red line (-1): Maximum bearish consensus
Gray line (0): Neutral midpoint
💡 Trading Strategies
Strategy 1: Consensus Threshold Trading
Entry Rules:
- Long: Output crosses above +0.5 (strong bullish consensus)
- Short: Output crosses below -0.5 (strong bearish consensus)
Exit Rules:
- Exit Long: Output crosses below 0 (consensus lost)
- Exit Short: Output crosses above 0 (consensus lost)
Strategy 2: Zero-Line Crossover
Entry Rules:
- Long: Output crosses above 0 (bullish shift in consensus)
- Short: Output crosses below 0 (bearish shift in consensus)
Exit Rules:
- Exit on opposite crossover
Strategy 3: Divergence Trading
Look for divergences between:
- Price making higher highs while indicator makes lower highs (bearish divergence)
- Price making lower lows while indicator makes higher lows (bullish divergence)
Strategy 4: Extreme Reading Reversal
Entry Rules:
- Long: Output reaches -0.8 or below (extreme bearish consensus = potential reversal)
- Short: Output reaches +0.8 or above (extreme bullish consensus = potential reversal)
Use with caution - best combined with other reversal signals
🔧 Optimization Tips
For Trending Markets
Enable trend-following indicators: Noro's, VIDYA, Hull Suite, Leonidas
Use higher threshold levels (±0.6) to filter out minor retracements
Increase indicator periods for smoother signals
For Range-Bound Markets
Enable oscillators: BBPct, RSI
Use zero-line crossovers for entries
Decrease indicator periods for faster response
For Volatile Markets
Enable adaptive indicators: VIDYA, TRAMA
Use wider threshold levels to avoid whipsaws
Consider disabling fast indicators that may overreact
Custom Calibration Process
Start with all indicators enabled using default parameters
Backtest on your chosen timeframe and asset
Identify which indicators produce the most false signals
Disable or adjust parameters for problematic indicators
Test different threshold levels for entry/exit
Validate on out-of-sample data
📊 Visual Guide
Color Scheme
Orange Line: Main consensus output
Green Horizontal: Bullish extreme (+1)
Red Horizontal: Bearish extreme (-1)
Gray Horizontal: Neutral zone (0)
Reading the Chart
Line above 0: Net bullish sentiment
Line below 0: Net bearish sentiment
Line near extremes: Strong consensus
Line fluctuating near 0: Indecision or transition
Smooth line movement: Stable consensus
Erratic line movement: Conflicting signals
⚠️ Important Considerations
Lag Characteristics
This is a lagging indicator by design (consensus takes time to form)
Best used for trend confirmation rather than early entry
May miss the first portion of strong moves
Reduces false entries at the cost of delayed entries
Number of Active Indicators
More indicators = smoother but slower signals
Fewer indicators = faster but potentially noisier signals
Minimum recommended: 4 indicators for reliable consensus
Optimal: 6-8 indicators for balanced performance
Market Conditions
Best: Strong trending markets (up or down)
Good: Volatile markets with clear directional moves
Poor: Choppy, sideways markets with no clear trend
Worst: Low-volume, range-bound conditions
Complementary Tools
Consider combining with:
Volume analysis for confirmation
Support/resistance levels for entry/exit points
Market structure analysis (higher timeframe trends)
Risk management tools (ATR-based stops)
🎓 Example Use Cases
Swing Trading
Timeframe: Daily or 4H
Enable: All 8 indicators with default parameters
Entry: Consensus > +0.5 or < -0.5
Hold: Until consensus reverses to opposite extreme
Day Trading
Timeframe: 15m or 1H
Enable: Faster indicators (RSI, BBPct, Noro's, Hull Suite)
Entry: Zero-line crossover with volume confirmation
Exit: Opposite crossover or profit target
Position Trading
Timeframe: Weekly or Daily
Enable: Slower indicators (TRAMA, VIDYA, Trend Continuation)
Entry: Strong consensus (±0.7) with higher timeframe confirmation
Hold: Months until consensus weakens significantly
🔬 Technical Details
Calculation Method
1. Each enabled indicator calculates its normalized signal (-1, 0, or +1)
2. All active signals are stored in an array
3. Array.avg() computes the arithmetic mean
4. Result is plotted as a continuous line
Output Range
Theoretical: -1.0 to +1.0
Practical: Typically ranges between -0.8 to +0.8
Rare: All indicators perfectly aligned at ±1.0
Performance
Lightweight calculation (simple averaging)
No repainting (all indicators are non-repainting)
Compatible with all Pine Script features
Works on all TradingView plans
📋 License
This code is subject to the Mozilla Public License 2.0 at mozilla.org
🚀 Quick Start Guide
Add to Chart: Apply indicator to your chart
Choose Timeframe: Select appropriate timeframe for your trading style
Enable Indicators: Start with all 8 enabled
Observe Behavior: Watch how consensus forms during different market conditions
Calibrate: Adjust parameters and indicator selection based on observations
Backtest: Validate your settings on historical data
Trade: Apply with proper risk management
🎯 Key Takeaways
✅ Consensus beats individual indicators - Multiple perspectives reduce errors
✅ Customizable to your style - Enable/disable and tune to preference
✅ Simple interpretation - One line tells the story
✅ Works across markets - Stocks, crypto, forex, commodities
✅ Reduces emotional trading - Clear, objective signal generation
✅ Professional-grade - Built on proven technical analysis principles
Indicator Calibration transforms complex multi-indicator analysis into a single, actionable signal. By harnessing the collective wisdom of multiple proven trend-following systems, traders gain a powerful edge in identifying high-probability trade setups while filtering out market noise.
NormalizedIndicatorsNormalizedIndicators - Comprehensive Trend Normalization Library
Overview
This Pine Script™ library provides an extensive collection of normalized trend-following indicators and calculation functions for technical analysis. The main advantage of this library lies in its unified signal output: All trend indicators are normalized to a standardized format where 1 represents a bullish signal, -1 represents a bearish signal, and 0 (where applicable) represents a neutral signal.
This normalization enables traders to seamlessly combine different indicators, create consensus signals, and develop complex multi-indicator strategies without worrying about different scales and interpretations.
📊 Categories
The library is divided into two main categories:
1. Trend-Following Indicators
2. Calculation Indicators
🔄 Trend-Following Indicators
Stationary Indicators
These oscillate around a fixed value and are not bound to price.
BBPct() - Bollinger Bands Percent
Source: Algoalpha X Sushiboi77
Parameters:
Length: Period for Bollinger Bands
Factor: Standard deviation multiplier
Source: Price source (typical: close)
Logic: Calculates the position of price within the Bollinger Bands as a percentage
Signal:
1 (bullish): when positionBetweenBands > 50
-1 (bearish): when positionBetweenBands ≤ 50
Special Feature: Uses an array to store historical standard deviations for additional analysis
RSI() - Relative Strength Index
Source: TradingView
Parameters:
len: RSI period
src: Price source
smaLen: Smoothing period for RSI
Logic: Classic RSI with additional SMA smoothing
Signal:
1 (bullish): RSI-SMA > 50
-1 (bearish): RSI-SMA < 50
0 (neutral): RSI-SMA = 50
Non-Stationary Indicators
These follow price movement and have no fixed boundaries.
NorosTrendRibbonSMA() & NorosTrendRibbonEMA()
Source: ROBO_Trading
Parameters:
Length: Moving average and channel period
Source: Price source
Logic: Creates a price channel based on the highest/lowest MA value over a specified period
Signal:
1 (bullish): Price breaks above upper band
-1 (bearish): Price breaks below lower band
0 (neutral): Price within channel (maintains last state)
Difference: SMA version uses simple moving averages, EMA version uses exponential
TrendBands()
Source: starlord_xrp
Parameters: src (price source)
Logic: Uses 12 EMAs (9-30 period) and checks if all are rising or falling simultaneously
Signal:
1 (bullish): All 12 EMAs are rising
-1 (bearish): All 12 EMAs are falling
0 (neutral): Mixed signals
Special Feature: Very strict conditions - extremely strong trend filter
Vidya() - Variable Index Dynamic Average
Source: loxx
Parameters:
source: Price source
length: Main period
histLength: Historical period for volatility calculation
Logic: Adaptive moving average that adjusts to volatility
Signal:
1 (bullish): VIDYA is rising
-1 (bearish): VIDYA is falling
VZO() - Volume Zone Oscillator
Parameters:
source: Price source
length: Smoothing period
volumesource: Volume data source
Logic: Combines price and volume direction, calculates the ratio of directional volume to total volume
Signal:
1 (bullish): VZO > 14.9
-1 (bearish): VZO < -14.9
0 (neutral): VZO between -14.9 and 14.9
TrendContinuation()
Source: AlgoAlpha
Parameters:
malen: First HMA period
malen1: Second HMA period
theclose: Price source
Logic: Uses two Hull Moving Averages for trend assessment with neutrality detection
Signal:
1 (bullish): Uptrend without divergence
-1 (bearish): Downtrend without divergence
0 (neutral): Trend and longer MA diverge
LeonidasTrendFollowingSystem()
Source: LeonidasCrypto
Parameters:
src: Price source
shortlen: Short EMA period
keylen: Long EMA period
Logic: Simple dual EMA crossover system
Signal:
1 (bullish): Short EMA < Key EMA
-1 (bearish): Short EMA ≥ Key EMA
ysanturtrendfollower()
Source: ysantur
Parameters:
src: Price source
depth: Depth of Fibonacci weighting
smooth: Smoothing period
bias: Percentage bias adjustment
Logic: Complex system with Fibonacci-weighted moving averages and bias bands
Signal:
1 (bullish): Weighted MA > smoothed MA (with upward bias)
-1 (bearish): Weighted MA < smoothed MA (with downward bias)
0 (neutral): Within bias zone
TRAMA() - Trend Regularity Adaptive Moving Average
Source: LuxAlgo
Parameters:
src: Price source
length: Adaptation period
Logic: Adapts to trend regularity - accelerates in stable trends, slows in consolidations
Signal:
1 (bullish): Price > TRAMA
-1 (bearish): Price < TRAMA
0 (neutral): Price = TRAMA
HullSuite()
Source: InSilico
Parameters:
_length: Base period
src: Price source
_lengthMult: Length multiplier
Logic: Uses Hull Moving Average with lagged comparisons for trend determination
Signal:
1 (bullish): Current Hull > Hull 2 bars ago
-1 (bearish): Current Hull < Hull 2 bars ago
0 (neutral): No change
STC() - Schaff Trend Cycle
Source: shayankm (described as "Better MACD")
Parameters:
length: Cycle period
fastLength: Fast MACD period
slowLength: Slow MACD period
src: Price source
Logic: Combines MACD concepts with stochastic normalization for early trend signals
Signal:
1 (bullish): STC is rising
-1 (bearish): STC is falling
🧮 Calculation Indicators
These functions provide specialized mathematical calculations for advanced analysis.
LCorrelation() - Long-term Correlation
Creator: unicorpusstocks
Parameters:
Input: First time series
Compare: Second time series
Logic: Calculates the average of correlations across 6 different periods (30, 60, 90, 120, 150, 180)
Returns: Correlation value between -1 and 1
Application: Long-term relationship analysis between assets, markets, or indicators
MCorrelation() - Medium-term Correlation
Creator: unicorpusstocks
Parameters:
Input: First time series
Compare: Second time series
Logic: Calculates the average of correlations across 6 different periods (15, 30, 45, 60, 75, 90)
Returns: Correlation value between -1 and 1
Application: Medium-term relationship analysis with higher sensitivity
assetBeta() - Beta Coefficient
Creator: unicorpusstocks
Parameters:
measuredSymbol: The asset to be measured
baseSymbol: The reference asset (e.g., market index)
Logic:
Calculates Beta across 4 different time horizons (50, 100, 150, 200 periods)
Beta = Correlation × (Asset Standard Deviation / Market Standard Deviation)
Returns the average of all 4 Beta values
Returns: Beta value (typically 0-2, can be higher/lower)
Interpretation:
Beta = 1: Asset moves in sync with the market
Beta > 1: Asset more volatile than market
Beta < 1: Asset less volatile than market
Beta < 0: Asset moves inversely to the market
💡 Usage Examples
Example 1: Multi-Indicator Consensus
pinescriptimport unicorpusstocks/MyIndicatorLibrary/1 as lib
// Combine multiple indicators
signal1 = lib.BBPct(20, 2.0, close)
signal2 = lib.RSI(14, close, 5)
signal3 = lib.TRAMA(close, 50)
// Consensus signal: At least 2 of 3 must agree
consensus = (signal1 + signal2 + signal3)
strongBuy = consensus >= 2
strongSell = consensus <= -2
Example 2: Correlation-Filtered Trading
pinescriptimport unicorpusstocks/MyIndicatorLibrary/1 as lib
// Only trade when strong correlation with market exists
spy = request.security("SPY", timeframe.period, close)
correlation = lib.MCorrelation(close, spy)
trendSignal = lib.NorosTrendRibbonEMA(50, close)
// Only bullish signals with positive correlation
tradeBuy = trendSignal == 1 and correlation > 0.5
tradeSell = trendSignal == -1 and correlation > 0.5
Example 3: Beta-Adjusted Position Sizing
pinescriptimport unicorpusstocks/MyIndicatorLibrary/1 as lib
spy = request.security("SPY", timeframe.period, close)
beta = lib.assetBeta(close, spy)
// Adjust position size based on Beta
basePositionSize = 100
adjustedSize = basePositionSize / beta // Less size with high Beta
⚙️ Technical Details
Normalization Standard
Bullish: 1
Bearish: -1
Neutral: 0 (only for selected indicators)
Advantages of Normalization
Simple Aggregation: Signals can be added/averaged
Consistent Interpretation: No confusion about different scales
Strategy Development: Simplified logic for backtesting
Combinability: Seamlessly mix different indicator types
Performance Considerations
All functions are optimized for Pine Script v5
Proper use of var for state management
Efficient array operations where needed
Minimal recursive calls
📋 License
This code is subject to the Mozilla Public License 2.0. More details at: mozilla.org
🎯 Use Cases
This library is ideal for:
Quantitative Traders: Systematic strategy development with unified signals
Multi-Timeframe Analysis: Consensus across different timeframes
Portfolio Managers: Beta and correlation analysis for diversification
Algo Traders: Machine learning with standardized features
Retail Traders: Simplified signal interpretation without deep technical knowledge
🔧 Installation
pinescriptimport unicorpusstocks/MyIndicatorLibrary/1
Then use the functions with your chosen alias:
pinescriptlib.BBPct(20, 2.0, close)
lib.RSI(14, close, 5)
// etc.
⚠️ Important Notes
All indicators are lagging, as is typical for trend-following indicators
Signals should be combined with additional analysis (volume, support/resistance, etc.)
Backtesting is recommended before starting live trading with these signals
Different assets and timeframes may require different parameter optimizations
This library provides a solid foundation for professional trading system design with the flexibility to develop your own complex strategies while abstracting away technical complexity.
D+P All-in-OneD+P=DARVAS+PIVOT
In this script i tried make small combo of multiple metrics.
Along with Darvas+Pivot we have EMA10,20&RSI d,w,m table. i fixed this table to middle right so that its easy to use while using phone.
There is floater table having Day Low& Previous Day Low-% differnce from current price
We have RS rating of O'Neil
Small table having MarketCap,Industry and sector.
Baseline Deviation Oscillator [Alpha Extract]A sophisticated normalized oscillator system that measures price deviation from a customizable moving average baseline using ATR-based scaling and dynamic threshold adaptation. Utilizing advanced HL median filtering and multi-timeframe threshold calculations, this indicator delivers institutional-grade overbought/oversold detection with automatic zone adjustment based on recent oscillator extremes. The system's flexible baseline architecture supports six different moving average types while maintaining consistent ATR normalization for reliable signal generation across varying market volatility conditions.
🔶 Advanced Baseline Construction Framework
Implements flexible moving average architecture supporting EMA, RMA, SMA, WMA, HMA, and TEMA calculations with configurable source selection for optimal baseline customization. The system applies HL median filtering to the raw baseline for exceptional smoothing and outlier resistance, creating ultra-stable trend reference levels suitable for precise deviation measurement.
// Flexible Baseline MA System
ma(src, length, type) =>
if type == "EMA"
ta.ema(src, length)
else if type == "TEMA"
ema1 = ta.ema(src, length)
ema2 = ta.ema(ema1, length)
ema3 = ta.ema(ema2, length)
3 * ema1 - 3 * ema2 + ema3
// Baseline with HL Median Smoothing
Baseline_Raw = ma(src, MA_Length, MA_Type)
Baseline = hlMedian(Baseline_Raw, HL_Filter_Length)
🔶 ATR Normalization Engine
Features sophisticated ATR-based scaling methodology that normalizes price deviations relative to current volatility conditions, ensuring consistent oscillator readings across different market regimes. The system calculates ATR bands around the baseline and uses half the band width as the normalization factor for volatility-adjusted deviation measurement.
🔶 Dynamic Threshold Adaptation System
Implements intelligent threshold calculation using rolling window analysis of oscillator extremes with configurable smoothing and expansion parameters. The system identifies peak and trough levels over dynamic windows, applies EMA smoothing, and adds expansion factors to create adaptive overbought/oversold zones that adjust to changing market conditions.
1D
3D
1W
🔶 Multi-Source Configuration Architecture
Provides comprehensive source selection including Close, Open, HL2, HLC3, and OHLC4 options for baseline calculation, enabling traders to optimize oscillator behavior for specific trading styles. The flexible source system allows adaptation to different market characteristics while maintaining consistent ATR normalization methodology.
🔶 Signal Generation Framework
Generates bounce signals when oscillator crosses back through dynamic thresholds and zero-line crossover signals for trend confirmation. The system identifies both standard threshold bounces and extreme zone bounces with distinct alert conditions for comprehensive reversal and continuation pattern detection.
Bull_Bounce = ta.crossover(OSC, -Active_Lower) or
ta.crossover(OSC, -Active_Lower_Extreme)
Bear_Bounce = ta.crossunder(OSC, Active_Upper) or
ta.crossunder(OSC, Active_Upper_Extreme)
// Zero Line Signals
Zero_Cross_Up = ta.crossover(OSC, 0)
Zero_Cross_Down = ta.crossunder(OSC, 0)
🔶 Enhanced Visual Architecture
Provides color-coded oscillator line with bullish/bearish dynamic coloring, signal line overlay for trend confirmation, and optional cloud fills between oscillator and signal. The system includes gradient zone fills for overbought/oversold regions with configurable transparency and threshold level visualization with automatic label generation.
snapshot
🔶 HL Median Filter Integration
Features advanced high-low median filtering identical to DEMA Flow for exceptional baseline smoothing without lag introduction. The system constructs rolling windows of baseline values, performs median extraction for both odd and even window lengths, and eliminates outliers for ultra-clean deviation measurement baseline.
🔶 Comprehensive Alert System
Implements multi-tier alert framework covering bullish bounces from oversold zones, bearish bounces from overbought zones, and zero-line crossovers in both directions. The system provides real-time notifications for critical oscillator events with customizable message templates for automated trading integration.
🔶 Performance Optimization Framework
Utilizes efficient calculation methods with optimized array management for median filtering and minimal computational overhead for real-time oscillator updates. The system includes intelligent null value handling and automatic scale factor protection to prevent division errors during extreme market conditions.
🔶 Why Choose Baseline Deviation Oscillator ?
This indicator delivers sophisticated normalized oscillator analysis through flexible baseline architecture and dynamic threshold adaptation. Unlike traditional oscillators with fixed levels, the BDO automatically adjusts overbought/oversold zones based on recent oscillator behavior while maintaining consistent ATR normalization for reliable cross-market and cross-timeframe comparison. The system's combination of multiple MA type support, HL median filtering, and intelligent zone expansion makes it essential for traders seeking adaptive momentum analysis with reduced false signals and comprehensive reversal detection across cryptocurrency, forex, and equity markets.
Session Range Boxes (Budapest time) GR V2.0Session Range Boxes (Budapest time)
This indicator draws intraday range boxes for the main Forex sessions based on Europe/Budapest time (CET/CEST).
Tracked sessions (Budapest time):
Asia: 01:00 – 08:00
Frankfurt (pre-London): 08:00 – 09:00
London: 09:00 – 18:00
New York: 14:30 – 23:00
For each session, the script:
Detects the session start and session end using the current chart timeframe and the Europe/Budapest time zone.
Tracks the high and low of price during the entire session.
Draws a box (rectangle) from session open to session close, covering the full price range between session high and low.
Optionally prints a small label above the first bar of each session (Asia, Fra, London, NY).
Color scheme:
Asia: soft orange box
Frankfurt: light aqua box
London: darker blue box
New York: light lime box
Use this tool to:
Quickly see which session created the high/low of the day,
Identify liquidity zones and session ranges that price may revisit,
Visually separate Asia, Frankfurt, London and New York volatility on intraday charts.
Optimized for intraday trading (Forex / indices), but it works on any symbol where session behavior matters.
Michael's Custom Watermark🔷 MICHAEL'S CUSTOM WATERMARK INDICATOR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 OVERVIEW
A comprehensive chart watermark overlay that displays essential fundamental and technical information for stocks in a clean, customizable table format. Perfect for traders who want quick access to key metrics without cluttering their charts.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✨ KEY FEATURES
📊 Fundamental Data Display — Shows Industry, Sector, Market Cap, and P/E Ratio
📅 Earnings Information — Displays next earnings date with countdown timer
📈 ATR Volatility Indicator — 14-day ATR with color-coded visual alerts (🔴🟡🟢)
🎨 Auto Theme Detection — Automatically adjusts text color based on chart background
⚙️ Fully Customizable — Position, colors, size, and displayed metrics all adjustable
🏢 GICS Sector Mapping — Heuristic-based sector classification aligned with industry standards
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT MAKES THIS INDICATOR UNIQUE?
Unlike basic watermarks, this indicator provides:
Real-time fundamental data integration
Smart theme-aware color adaptation for both light and dark charts
Configurable volatility alerts using ATR thresholds
Earnings countdown feature to never miss important dates
Optimized display that only shows relevant data for the current symbol type
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📖 HOW TO USE
1. BASIC SETUP
Add the indicator to your chart. By default, it displays in the top-left corner with all features enabled.
2. POSITIONING
Vertical Location: Top, Middle, or Bottom
Horizontal Location: Left, Center, or Right
Vertical Offset: Fine-tune position with 0-50 pixel offset from top
3. CUSTOMIZATION OPTIONS
TEXT APPEARANCE:
Auto Text Color — Enable to automatically adapt text color to your chart theme
Manual Color — Set a fixed text color if auto-color is disabled
Text Size — Choose from Huge, Large, Normal, or Small
Theme Colors — Customize text color for light and dark backgrounds separately
DATA DISPLAY TOGGLES:
Show Industry & Sector — Display heuristic-based GICS-aligned sector and industry classification
Show Market Cap — View market capitalization in T/B/M format
Show P/E Ratio — Display Price-to-Earnings ratio (stocks only)
Show ATR (14-Day) — Display Average True Range with percentage and visual indicator
Show Next Earnings — Display upcoming earnings information
Show Earnings Countdown — Show days remaining until next earnings (requires earnings display)
4. ATR VOLATILITY ALERTS
Configure custom thresholds to monitor volatility:
Red Threshold — ATR percentage that triggers red alert 🔴 (default: 6%)
Yellow Threshold — ATR percentage that triggers yellow alert 🟡 (default: 3%)
Green — Shows automatically when ATR is below yellow threshold 🟢
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 UNDERSTANDING THE DISPLAY
🏢 SECTOR & INDUSTRY
Shows the GICS sector classification followed by the specific industry. The indicator uses heuristic-based mapping to align TradingView sectors with standard GICS classifications. Note that this mapping is based on keyword detection and industry analysis, so while generally accurate, it may not perfectly match official GICS classifications in all cases.
💰 MARKET CAP
Displays market capitalization using standard abbreviations:
T = Trillion
B = Billion
M = Million
📊 P/E RATIO
Shows the trailing twelve-month Price-to-Earnings ratio. Only displayed for stocks when enabled. Shows "N/A" if data is unavailable.
📈 ATR (14-DAY)
Displays the 14-period Average True Range in both absolute value and percentage terms, with a color-coded indicator:
🔴 Red: High volatility (above red threshold)
🟡 Yellow: Moderate volatility (between yellow and red thresholds)
🟢 Green: Low volatility (below yellow threshold)
📅 EARNINGS
Shows earnings information in three formats:
"X days remaining" — When countdown is enabled and earnings date is known
"Upcoming" — When date is in the future but countdown is disabled
"Recently Reported" — When earnings just occurred
"N/A" — When no earnings data is available
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ TECHNICAL DETAILS
SUPPORTED INSTRUMENTS:
Optimized for stocks with full fundamental data
Works with other instruments (crypto, forex, futures) but only displays applicable metrics
Automatically suppresses irrelevant data (e.g., P/E for non-stocks)
PERFORMANCE:
Lightweight overlay with minimal resource usage
Updates only on last bar for efficiency
No historical recalculation needed
COMPATIBILITY:
Pine Script v6
Works on all timeframes
Compatible with all chart types
Auto-adapts to theme changes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 TIPS & BEST PRACTICES
Enable Auto Text Color for seamless theme switching between light and dark modes
Adjust vertical offset to avoid overlap with price action in high-volatility periods
Use ATR thresholds appropriate to your trading style and asset class
Disable features you don't use to keep the watermark clean and focused
Position in corners to maximize chart viewing space
Use smaller text size for multi-panel layouts
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 TROUBLESHOOTING
"N/A" SHOWING FOR P/E RATIO:
This is normal for non-stock instruments
May occur for stocks with negative earnings
Check if fundamental data is available for the symbol
EARNINGS SHOWING "N/A":
Earnings data may not be available for all stocks
Check TradingView's data coverage for your symbol
TEXT COLOR NOT VISIBLE:
Enable Auto Text Color feature
Manually set text color to contrast with your chart background
Adjust custom light/dark text colors in settings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER
This indicator is for informational purposes only. The fundamental data displayed is sourced from TradingView's data providers. Always verify critical information before making trading decisions. Past performance is not indicative of future results.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
If you find this indicator helpful, please give it a boost 🚀 and share your feedback in the comments!
Version: 1.0
Pine Script Version: v6
Created by: Michael
Psychological Levels (Zones + Alerts) - StableThis technical indicator plot support and resistance levels based on the psychological numbers






















