RSRCH: DC-VWMA Width Calc// Research intention of this script
// Objective : to find the direction of movement of index indicators
// Methodology : take the Donchian and VWMA input
// Compute Donchian and VWMA
// find the total width of Donchian = upper donchian value - lower donchian value
// Find the upper segment = upper donchian value - VWMA value
// find the lower segment = VWMA value - lower donchian value
// Plot them to see the trends glaringly.
// This works best with linebreak or Hiekin Ashi
Dönemler
IPDA Ranges – Pro
### IPDA Ranges – Pro
**Overview**
The **IPDA Ranges – Pro** indicator brings the core concepts of the Interbank Price Delivery Algorithm (IPDA) from ICT (Inner Circle Trader) mentorship to life on TradingView. Inspired by ICT's foundational video on (www.youtube.com), this tool visualizes multi-period price ranges (20, 40, or 60 days) to decode institutional order flow, identify discount/premium zones, and highlight algorithmic price delivery points.
IPDA, as explained by ICT, is the "source code" behind market structure—grading ranges into quadrants to reveal high-probability support/resistance, fair value gaps, and liquidity draws. By anchoring on daily highs/lows, it filters noise, anticipates retracements, and aligns price action with time-based delivery (e.g., during key sessions like 10 AM–2 PM ET). This indicator automates the process, making it easier to spot "permissible" moves without manual charting.
**Key Features**
- **Dynamic Ranges**: Plots customizable IPDA periods (IPDA20, IPDA40, IPDA60) based on daily highest highs and lowest lows. Equilibrium (50% midpoint) acts as the core reference for mean reversion.
- **Quadrant Breakdown**: Divides each range into 25% steps—lower quadrant (deep discount), 25%/75% lines (consequent encroachment edges), and upper quadrant (premium). Optional subquadrants (12.5% steps) for finer granularity.
- **Visual Modes**:
- **Boxes**: Shade discount (below equilibrium) and premium (above) areas for intuitive zoning.
- **Lines**: Clean horizontal lines for highs, lows, equilibrium, and quadrants—ideal for lower timeframes.
- **Mid-Zone Highlight**: Optional shading of the 25%–75% "fair value" zone (customizable color/opacity) to flag balanced delivery areas where bodies often respect levels.
- **Info Table**: Choose from:
- **Table A**: Labels current price location as "Discount" or "Premium" per range (green for mid-zone).
- **Table B**: Shows distance from equilibrium in % (e.g., "52.3%") for precise positioning.
- **Customization**:
- Toggle labels (high/low, quadrants, prices), line styles (solid/dotted/dashed), extensions, and table position.
- Colors for discount/premium, equilibrium, and zones.
- Alerts for mid-zone entry/exit to catch order flow shifts.
- **Performance**: Runs efficiently on any timeframe/symbol, pulling daily data via `request.security` for accuracy.
**How It Works**
1. **Range Calculation**: For each selected period (e.g., IPDA20), it fetches the highest high and lowest low over the past N daily bars. Equilibrium = (High + Low) / 2.
2. **Zoning**:
- **Discount**: Below equilibrium (institutional buying opportunity).
- **Premium**: Above equilibrium (potential selling pressure).
- **Quadrants**: 25% (q1) and 75% (q3) lines mark edges of the "mid-zone," where price often consolidates or traps retail before directional runs.
3. **Plotting**: On the last bar, draws boxes/lines from the range start to current bar. Labels show levels (e.g., "IPDA20 High @ 1.2345").
4. **Usage Example**: On EURUSD daily, enable IPDA20. If price pierces a premium wick's low into the lower quadrant during a bullish shift (per ICT), expect a run to liquidity—use the table's % reading to gauge strength (e.g., <25% = deep discount buy). Transpose to 5-min for entries aligning with FVGs or order blocks.
**Trading Tips**
- **Higher Timeframe Bias**: Use on daily/4H for structure; drop to 1H/15M for entries. Focus on bodies (not wicks) respecting quadrants—wicks signal traps.
- **ICT Alignment**: Pair with PD Arrays (premium/discount wicks) or Market Maker models. In trends, extend to IPDA40/60; ignore extremes unless full reversals occur.
- **Risk Management**: Target liquidity pools at equal highs/lows. Avoid overleveraging—IPDA shines in 7–10 AM ET for optimal delivery. Backtest random 20-day periods to validate.
- **Best For**: Forex, indices (e.g., NAS100), commodities (e.g., Gold). Test on demo first.
Special Thanks to toodegrees for sharing the original base script.
More features to be added.
**Disclaimer**
This indicator is for educational purposes only and does not constitute financial advice. Past performance isn't indicative of future results. Trading involves substantial risk—use at your own discretion. Hypothetical results may not reflect real-market factors like slippage or liquidity. Always consult a licensed advisor.
**Author**: © MadMonkTrading (Mozilla Public License 2.0)
**Version**: Pine Script v5 | Questions? Drop a comment below!
Puell Multiple Variants [OperationHeadLessChicken]Overview
This script contains three different, but related indicators to visualise Bitcoin miner revenue.
The classical Puell Multiple : historically, it has been good at signaling Bitcoin cycle tops and bottoms, but due to the diminishing rewards miners get after each halving, it is not clear how you determine overvalued and undervalued territories on it. Here is how the other two modified versions come into play:
Halving-Corrected Puell Multiple : The idea is to multiply the miner revenue after each halving with a correction factor, so overvalued levels are made comparable by a horizontal line across cycles. After experimentation, this correction factor turned out to be around 1.63. This brings cycle tops close to each other, but we lose the ability to see undervalued territories as a horizontal region. The third variant aims to fix this:
Miner Revenue Relative Strength Index (Miner Revenue RSI) : It uses RSI to map miner revenue into the 0-100 range, making it easy to visualise over/undervalued territories. With correct parameter settings, it eliminates the diminishing nature of the original Puell Multiple, and shows both over- and undervalued revenues correctly.
Example usage
The goal is to determine cycle tops and bottoms. I recommend using it on high timeframes, like monthly or weekly . Lower than that, you will see a lot of noise, but it could still be used. Here I use monthly as the example.
The classical Puell Multiple is included for reference. It is calculated as Miner Revenue divided by the 365-day Moving Average of the Miner Revenue . As you can see in the picture below, it has been good at signaling tops at 1,3,5,7.
The problems:
- I have to switch the Puell Multiple to a logarithmic scale
- Still, I cannot use a horizontal oversold territory
- 5 didn't touch the trendline, despite being a cycle top
- 9 touched the trendline despite not being a cycle top
Halving-Corrected Puell Multiple (yellow): Multiplies the Puell Multiple by 1.63 (a number determined via experimentation) after each halving. In the picture below, you can see how the Classical (white) and Corrected (yellow) Puell Multiples compare:
Advantages:
- Now you can set a constant overvalued level (12.49 in my case)
- 1,3,7 are signaled correctly as cycle tops
- 9 is correctly not signaled as a cycle top
Caveats:
- Now you don't have bottom signals anymore
- 5 is still not signaled as cycle top
Let's see if we can further improve this:
Miner Revenue RSI (blue):
On the monthly, you can see that an RSI period of 6, an overvalued threshold of 90, and an undervalued threshold of 35 have given historically pretty good signals.
Advantages:
- Uses two simple and clear horizontal levels for undervalued and overvalued levels
- Signaling 1,3,5,7 correctly as cycle tops
- Correctly does not signal 9 as a cycle top
- Signaling 4,6,8 correctly as cycle bottoms
Caveats:
- Misses two as a cycle bottom, although it was a long time ago when the Bitcoin market was much less mature
- In the past, gave some early overvalued signals
Usage
Using the example above, you can apply these indicators to any timeframe you like and tweak their parameters to obtain signals for overvalued/undervalued BTC prices
You can show or hide any of the three indicators individually
Set overvalued/undervalued thresholds for each => the background will highlight in green (undervalued) or red (overvalued)
Set special parameters for the given indicators: correction factor for the Corrected Puell and RSI period for Revenue RSI
Show or hide halving events on the indicator panel
All parameters and colours are adjustable
Advanced MTF Dashboard with RSIThis is essentially an entire trading analysis workstation condensed into one indicator that gives you institutional-grade multi-timeframe analysis in a clean, actionable format
Supersonic Volatility & Momentum IndicatorChange/update the setting as per your trading requirements!
Gold–Bitcoin Correlation (Offset Model) by KManus88This indicator analyzes the correlation between Gold (XAU/USD) and Bitcoin (BTC/USD) using a time-offset model adjustable by the user.
The goal is to detect cyclical leads or lags between both assets, highlighting how capital flows into Gold may precede or follow movements in the crypto market.
Key Features:
Dynamic correlation calculation between Gold and Bitcoin.
Adjustable offset in days (default: 107) to fine-tune the temporal shift.
Automatic labels and on-chart visualization.
Compatible with multiple timeframes and logarithmic scales.
Interpretation:
Positive correlation suggests synchronized trends between both assets.
Negative correlation signals divergence or rotation of liquidity.
The time-offset parameter helps estimate when a shift in Gold could later reflect in Bitcoin.
Recommended use:
For macro-financial and global liquidity cycle analysis.
As a complementary tool in cross-asset momentum strategies.
© 2025 – Developed by KManus88 | Inspired by monetary correlation studies and global liquidity cycles.
This script is for educational purposes only and does not constitute financial advice.
RSI(14) Divergence — Enhanced Hidden Detection (v6) — exterm hidTitle:
RSI(14) Divergence — Regular + Hidden + HTF EMA Filter (Scalping Edition)
🔹 Description:
This indicator automatically detects RSI(14) divergences — both Regular (Reversal) and Hidden (Continuation) — and plots them directly on the chart for precision scalping and intraday trading.
It’s optimized for low timeframes (1-minute) such as Bank Nifty, Nifty 50, and Sensex, where spotting early divergence can help confirm short-term momentum shifts.
⚙️ Core Features:
Regular Divergence Detection
Bullish Divergence: Price makes a lower low while RSI makes a higher low → potential reversal upward.
Bearish Divergence: Price makes a higher high while RSI makes a lower high → potential reversal downward.
Hidden Divergence Detection
Hidden Bullish Divergence: Price makes a higher low while RSI makes a lower low → continuation of bullish trend.
Hidden Bearish Divergence: Price makes a lower high while RSI makes a higher high → continuation of bearish trend.
HTF EMA Trend Alignment (Smart Filter)
Optional feature that aligns signals with the higher timeframe (HTF) trend using a 200 EMA.
Example: Only shows bullish divergences when the 5-minute price is above the 5-minute 200 EMA (uptrend alignment).
Helps filter false signals and keeps divergence trading directional.
Chart Visualization
Regular divergences: Bold solid lines (Green for bullish, Red for bearish).
Hidden divergences: Thin dashed lines (Teal for hidden bull, Maroon for hidden bear) — subtle enough to stay unnoticed by casual chart viewers.
Optional labels (“Bull Div”, “Bear Div”, etc.) and minimalistic markers for scalping clarity.
Option to extend divergence lines for future reference.
Custom Alerts (for all divergence types)
Get instant alerts when any regular or hidden divergence is detected.
Works seamlessly for both long and short bias setups.
📈 Recommended Usage:
Timeframe: 1-Minute (Scalping) or 3-Minute (Micro Intraday)
Markets: Bank Nifty, Nifty 50, Sensex, or any high-volatility index/stocks
Combine With:
Higher timeframe structure (H1/H4 bias)
Volume spikes or order block retests
Key support/resistance zones
Semáforo MAsSimple indicator that relates the position of the MAs with the price in the lower right corner in the form of a traffic light.
Aurum DCX AVE Gold and Silver StrategySummary in one paragraph
Aurum DCX AVE is a volatility break strategy for gold and silver on intraday and swing timeframes. It aligns a new Directional Convexity Index with an Adaptive Volatility Envelope and an optional USD/DXY bias so trades appear only when direction quality and expansion agree. It is original because it fuses three pieces rarely combined in one model for metals: a convexity aware trend strength score, a percentile based envelope that widens with regime heat, and an intermarket DXY filter.
Scope and intent
• Markets. Gold and silver futures or spot, other liquid commodities, major indices
• Timeframes. Five minutes to one day. Defaults to 30min for swing pace
• Default demo used in this publication. TVC:GOLD on 30m
• Purpose. Enter confirmed volatility breaks while muting chop using regime heat and USD bias
• Limits. This is a strategy. Orders are simulated on standard candles only
Originality and usefulness
• Unique fusion. DCX combines DI strength with path efficiency and curvature. AVE blends ATR with a high TR percentile and widens with DCX heat. DXY adds an intermarket bias
• Failure mode addressed. False starts inside compression and unconfirmed breakouts during USD swings
• Testability. Each component has a named input. Entry names L and S are visible in the list of trades
• Portable yardstick. Weekly ATR for stops and R multiples for targets
• Open source. Method and implementation are disclosed for community review
Method overview in plain language
You score direction quality with DCX, size an adaptive envelope with a blend of ATR and a high TR percentile, and only allow breaks that clear the band while DCX is above a heat threshold in the same direction. An optional DXY filter favors long when USD weakens and short when USD strengthens. Orders are bracketed with a Weekly ATR stop and an R multiple target, with optional trailing to the envelope.
Base measures
• Range basis. True Range and ATR over user windows. A high TR percentile captures expansion tails used by AVE
• Return basis. Not required
Components
• Directional Convexity Index DCX. Measures directional strength with DX, multiplies by path efficiency, blends a curvature term from acceleration, scales to 0 to 100, and uses a rise window
• Adaptive Volatility Envelope AVE. Midline ALMA or HMA or EMA plus bands sized by a blend of ATR and a high TR percentile. The blend weight follows volatility of volatility. Band width widens with DCX heat
• DXY Bias optional. Daily EMA trend of DXY. Long bias when USD weakens. Short bias when USD strengthens
• Risk block. Initial stop equals Weekly ATR times a multiplier. Target equals an R multiple of the initial risk. Optional trailing to AVE band
Fusion rule
• All gates must pass. DCX above threshold and rising. Directional lead agrees. Price breaks the AVE band in the same direction. DXY bias agrees when enabled
Signal rule
• Long. Close above AVE upper and DCX above threshold and DCX rising and plus DI leads and DXY bias is bearish
• Short. Close below AVE lower and DCX above threshold and DCX falling and minus DI leads and DXY bias is bullish
• Exit and flip. Bracket exit at stop or target. Optional trailing to AVE band
Inputs with guidance
Setup
• Symbol. Default TVC:GOLD (Correlation Asset for internal logic)
• Signal timeframe. Blank follows the chart
• Confirm timeframe. Default 1 day used by the bias block
Directional Convexity Index
• DCX window. Typical 10 to 21. Higher filters more. Lower reacts earlier
• DCX rise bars. Typical 3 to 6. Higher demands continuation
• DCX entry threshold. Typical 15 to 35. Higher avoids soft moves
• Efficiency floor. Typical 0.02 to 0.06. Stability in quiet tape
• Convexity weight 0..1. Typical 0.25 to 0.50. Higher gives curvature more influence
Adaptive Volatility Envelope
• AVE window. Typical 24 to 48. Higher smooths more
• Midline type. ALMA or HMA or EMA per preference
• TR percentile 0..100. Typical 75 to 90. Higher favors only strong expansions
• Vol of vol reference. Typical 0.05 to 0.30. Controls how much the percentile term weighs against ATR
• Base envelope mult. Typical 1.4 to 2.2. Width of bands
• Regime adapt 0..1. Typical 0.6 to 0.95. How much DCX heat widens or narrows the bands
Intermarket Bias
• Use DXY bias. Default ON
• DXY timeframe. Default 1 day
• DXY trend window. Typical 10 to 50
Risk
• Risk percent per trade. Reporting field. Keep live risk near one to two percent
• Weekly ATR. Default 14. Basis for stops
• Stop ATR weekly mult. Typical 1.5 to 3.0
• Take profit R multiple. Typical 1.5 to 3.0
• Trail with AVE band. Optional. OFF by default
Properties visible in this publication
• Initial capital. 20000
• Base currency. USD
• request.security lookahead off everywhere
• Commission. 0.03 percent
• Slippage. 5 ticks
• Default order size method percent of equity with value 3% of the total capital available
• Pyramiding 0
• Process orders on close ON
• Bar magnifier ON
• Recalculate after order is filled OFF
• Calc on every tick OFF
Realism and responsible publication
• No performance claims. Past results never guarantee future outcomes
• Shapes can move while a bar forms and settle on close
• Strategies use standard candles for signals and orders only
Honest limitations and failure modes
• Economic releases and thin liquidity can break assumptions behind the expansion logic
• Gap heavy symbols may prefer a longer ATR window
• Very quiet regimes can reduce signal contrast. Consider higher DCX thresholds or wider bands
• Session time follows the exchange of the chart and can change symbol to symbol
• Symbol sensitivity is expected. Use the gates and length inputs to find stable settings
Open source reuse and credits
• None
Mode
Public open source. Source is visible and free to reuse within TradingView House Rules
Legal
Education and research only. Not investment advice. You are responsible for your decisions. Test on historical data and in simulation before any live use. Use realistic costs.
Cyclical Phases of the Market🧭 Overview
“Cyclical Phases of the Market” automatically detects major market cycles by connecting swing lows and measuring the average number of bars between them.
Once it learns the rhythm of past cycles, it projects the next expected cycle (in time and price) using a dashed orange line and a forecast label.
In simple terms:
The indicator shows where the next potential low is statistically expected to occur, based on the timing and depth of previous cycles.
⚙️ Core Logic – Step by Step
1️⃣ Pivot Detection
The script uses the built-in ta.pivotlow() and ta.pivothigh() functions to find local turning points:
pivotLow marks a local swing low, defined by pivotLeft and pivotRight bars on each side.
Only confirmed lows are used to define the major cycle points.
Each new pivot low is stored in two arrays:
cycleLows → price level of the low
cycleBars → bar index where the low occurred
2️⃣ Cycle Identification and Drawing
Every time two consecutive swing lows are found, the indicator:
Calculates the number of bars between them (cycle length).
If that distance is greater than or equal to minCycleBars, it draws a teal line connecting the two lows — visually representing one complete cycle.
These teal lines form the historical cycle structure of the market.
3️⃣ Average Cycle Length
Once there are at least three completed cycles, the script calculates the average duration (mean number of bars between lows).
This value — avgCycleLength — represents the dominant periodicity or cycle rhythm of the market.
4️⃣ Forecasting the Next Cycle
When a valid average cycle length exists, the model projects the next expected cycle:
Time projection:
Adds avgCycleLength to the last cycle’s ending bar index to find where the next low should occur.
Price projection:
Estimates the vertical amplitude by taking the difference between the last two cycle lows (priceDiff).
Adds this same difference to the last low price to forecast the next probable low level.
The result is drawn as an orange dashed line extending into the future, representing the Next Expected Cycle.
5️⃣ Forecast Label
An orange label 🔮 appears at the projected future point showing:
Text:
🔮 Upcoming Cycle Forecast
Price:
The label marks the probable area and timing of the next cyclical low.
(Note: the date/time calculation currently multiplies bar count by 7 days, so it’s designed mainly for daily charts. On other timeframes, that conversion can be adapted.)
📊 How to Read It on the Chart
Visual Element Meaning Interpretation
Teal lines Completed historical cycles (low to low) Show actual periodic rhythm of the market
Orange dashed line Projection of the next expected cycle Anticipated path toward the next cyclical low
Orange label 🔮 Upcoming Cycle Forecast Displays expected price and bar location
Average cycle length Internal variable (bars between lows) Represents the dominant cycle period
📈 Interpretation
When teal segments show consistent spacing, the market is following a stable rhythm → cycles are predictable.
When cycle spacing shortens, the market is accelerating (volatility rising).
When it widens, the market is slowing down or entering accumulation.
The orange dashed line represents the next expected low zone:
If the market drops near this line → cyclical pattern confirmed.
If the market breaks well below → cycle amplitude has increased (trend weakening).
If the market rises above and delays → a new longer cycle may be forming.
🧠 Practical Use
Combine with oscillators (e.g., RSI or TSI) to confirm momentum alignment near projected lows.
Use in conjunction with volume to identify accumulation or exhaustion near the expected turning point.
Compare across timeframes: weekly cycles confirm long-term rhythm; daily cycles refine short-term entries.
⚡ Summary
Aspect Description
Purpose Detect and forecast recurring market cycles
Cycle basis Low-to-Low pivot analysis
Visuals Teal historical cycles + Orange forecast line
Forecast Next expected low (price and time)
Ideal timeframe Daily
Main outputs Average cycle length, next projected cycle, visual cycle map
Adaptive Pulse Frequency & Amplitude TrendAdaptive Pulse Frequency & Amplitude Trend Indicator
This Pine Script indicator is designed to identify strong bullish or bearish trends by analyzing volume dynamics on a lower timeframe than the one currently displayed on the chart. It operates on the principle of detecting significant spikes in buying or selling pressure, referred to as "pulses," and then evaluating their frequency, strength, and dominance over the opposing market forces.
Core Concepts
Lower Timeframe Volume Analysis: The script requests up-volume and down-volume data from a more granular, lower timeframe (e.g., 1-minute data when on a 15-minute chart). This provides a higher-resolution view of the flow of buy and sell orders.
Adaptive Pulse Detection: A "pulse" is defined as a bar with an unusually high net volume (up volume minus down volume). Instead of using a fixed value, the indicator calculates an adaptive threshold based on the 90th percentile of net volume over a 100-bar lookback period. Any bar with a net volume exceeding this dynamic threshold is flagged as a pulse, categorized as either bullish (positive net volume) or bearish (negative net volume).
Frequency and Amplitude: The indicator measures two key aspects of these pulses over user-defined lookback periods:
Net Frequency: The number of bullish pulses minus the number of bearish pulses. A positive value indicates more buying pulses, while a negative value indicates more selling pulses.
Net Amplitude : The cumulative volume of bullish pulses minus the cumulative volume of bearish pulses. This measures the overall strength and conviction behind the pulses.
Primary Trend Signal
The indicator's primary signal comes from a strict dominance condition. It doesn't just look for more buying or selling pulses; it checks if these pulses are powerful enough to overwhelm the total opposite pressure in the market.
Bullish Dominance (Green Background): A strong bullish signal is generated when the total volume of all bullish pulses within a lookback period is greater than the total down-volume from all bars (not just pulses) in that same period.
Bearish Dominance (Red Background): A strong bearish signal is generated when the total volume of all bearish pulses is greater than the total up-volume from all bars in that period.
The chart background is colored green for bullish dominance and red for bearish dominance, providing a clear visual cue for when one side has taken decisive control.
Plotted Data
In addition to the background coloring, the indicator plots several lines in its own pane for more detailed analysis:
Net Frequency: Shows the trend in the number of bull vs. bear pulses.
Net Amplitude: Shows the trend in the strength of bull vs. bear pulses.
Bullish/Bearish Amplitude: The individual cumulative volumes for bull and bear pulses.
Dynamic Threshold: The adaptive value used to identify pulses.
By combining an adaptive detection method with a strict dominance condition, this tool aims to filter out market noise and highlight periods of genuinely strong, volume-backed trends.
Goldbach Time Indicatorgoldbach time indicator.
draws box from candle before the goldbach candle to the candle after it. so forgiveness of 1 minute. works only on the 1 minute. predraws the box to the end candle. shows gb numbers and non gb numbers.
Goldbach partitions: 3,11,17,29,41,47,53,59,71,83,89 and 97 +
non gb numbers 35,65,23,77
come to 99 if ur cool : discord.gg
Gap @ the 369wickless candle that is touching the 369
then indicator draws a line which you can use as an alert
RSI Colored by Relative StrengthThis indicator enhances the traditional RSI by combining it with Relative Strength (RS) — the ratio of an asset’s price to a chosen benchmark (e.g., SPY, QQQ, BTCUSD) — to create a more accurate, powerful, and dynamic momentum confirmation tool.
Instead of relying solely on RSI’s internal momentum, this version color-codes RSI values and backgrounds based on whether the asset is outperforming, underperforming, or neutral relative to the benchmark, not only identifying the RSI value, but color codes it in relation to the overall market to give more accurate confirmations.
• RS > 1 → The asset is outperforming the benchmark (relative strength).
• RS < 1 → The asset is underperforming.
• RS ≈ 1 → Neutral or moving in sync with the benchmark.
Gradient background zones:
• Green tones = outperformance (RS > 1).
• Red tones = underperformance (RS < 1).
• Gray neutral band = parity (RS ≈ 1).
Intensity adjusts dynamically based on how far RS deviates from 1, giving an at-a-glance view of market leadership strength.
• Color-coded RSI line: Green when RS > 1, red when RS < 1.
• Optional markers and labels show confirmed RS+RSI crossovers with smart spacing to prevent clutter.
• Alerts included for bullish and bearish RS+RSI alignment events.
How to Use
1. Add your preferred benchmark symbol (default: SPY).
2. Move this indicator into the same pane as your RSI (No need to overlay, does so automatically) and can also be used standalone.
3. Watch for:
• Green RSI & background: Significant momentum strength (asset trending upward and outpacing the market).
• Red RSI & background: False or insignificant momentum (asset lagging).
• Gray zone: neutral phase — consolidation or rotation period.
Use this as a trend-confirmation filter rather than a signal generator.
For example:
• Confirm and refine breakout entries when RS > 1 (RSI support = stronger conviction).
• Take profits when RSI weakens and RS slips below 1.
Earnings Day - Price Predictor [DunesIsland]It's designed to analyze and visualize historical stock price movements on earnings report days, focusing on percentage changes.
Here's a breakdown of what it does, step by step:
Key Inputs and Setup
User Input: There's a single input for "Lookback Years" (default: 10), which determines how far back in time (approximately) the indicator analyzes earnings data. It uses a rough calculation of milliseconds in that period to filter historical data.
Data Fetching: It uses TradingView's request.earnings function to pull actual earnings per share (EPS) data for the current ticker. Earnings days are identified where EPS data exists on a bar but not on the previous one (to avoid duplicates).
Price Change Calculation: For each detected earnings day, it computes the percentage price movement as (close - close ) / close * 100, representing the change from the previous close to the current close on that day.
Processing and Calculations (on the Last Bar)
Lookback Filter: It calculates a cutoff timestamp for the lookback period and processes only earnings events within that window.
Overall Averages:
Separates positive (≥0%) and negative (<0%) percentage changes.
Seasonality (Next Quarter Prediction):
Identifies the most recent earnings quarter (latest_q).
Predicts the "next" quarter (e.g., if latest is Q4, next is Q1;
Again, separates positive and negative changes, computing their respective averages.
Visual Outputs
Lookback: How far to fetch the data in years.
Average Change (Green): Showing the average of all positive changes.
Average Change (Red): Showing the average of all negative changes.
Seasonality Change (Green): Showing the average of positive changes for the predicted next quarter.
Seasonality Change (Red): Showing the average of negative changes for the predicted next quarter.
Purpose and Usage
This indicator helps traders assess a stock's historical reaction to earnings announcements. The overall averages give a broad sense of typical gains/losses, while the seasonality focuses on quarter-specific trends to "predict" potential movement for the upcoming earnings (based on past same-quarter performance). It's best used on daily charts for stocks with reliable earnings data. Note that quarter inference is calendar-based and may not perfectly match fiscal calendars for all companies—it's an approximation.
Custom Session highlighter - Dual Sessions + TimezoneCustom Session highlighter - Dual Sessions + Timezone
Monthly, Weekly, Daily Levels + Asian BoxMonthly, Weekly, Daily Levels + Asian Box best of ict and sessions trader good luck
6am Candle High/Low Indicator with Highlight6am Candle High/Low Indicator with Highlight
6am Candle High/Low Indicator with Highlight
6am Candle High/Low Indicator with Highlight
6am Candle High/Low Indicator with Highlight 6am Candle High/Low Indicator with Highlight
Economic Cycle Signal (Pakistan)📊 Economic Cycle Signal (Pakistan)
This indicator overlays both the Pakistan Policy Rate (PKINTR) and the Pakistan Inflation Rate YoY (PKIRYY) directly onto your KSE or Pakistan market chart. It visually connects monetary policy and inflation dynamics with market performance, helping traders and analysts understand how shifts in economic conditions impact risk assets in Pakistan.
🔹 Key Features
• Plots the monthly Pakistan Policy Rate alongside your chart.
• Overlays the Pakistan Inflation Rate YoY to track how price pressures evolve before policy rate adjustments.
• Shades the background to reflect different economic cycle phases (recovery, recession, expansion, late cycle).
• Highlights how equities and other risk assets react during shifting monetary and inflationary conditions.
• Provides a clear traffic-light style signal for quick macro interpretation.
• Now includes dynamic inflation color logic based on the State Bank of Pakistan’s (SBP) 5–7% target range and thresholds for overheating or cooling inflation.
🔹 Inflation Line Color Logic (New)
The inflation line color dynamically reflects whether inflation is within or outside SBP’s target range, and whether it’s rising or falling:
Inflation Condition Interpretation Line Color
Inflation > 7% and Rising Inflation overheating (well above SBP target) 🔴 Red
Inflation > 7% and Falling Cooling off from high levels 💚 Lime
Inflation < 5% and Falling Disinflation / stable price environment 🟢 Green
Inflation < 5% and Rising Early inflation rebound 🟡 Yellow
This adaptive color logic mirrors the interest rate cycle signals, helping traders instantly interpret Pakistan’s inflation trajectory and anticipate potential monetary policy turning points.
🔹 How Traders & Analysts Can Use It
• Visualize Pakistan’s monetary policy cycles and inflation trends in real time.
• Identify supportive phases when rate cuts or low policy rates follow controlled inflation.
• Detect tightening cycles when inflation spikes and the SBP reacts with rate hikes, often creating headwinds for equities.
• Use as a macro compass to anticipate inflation pressure, potential policy actions, and shifts in market risk appetite.
• Combine with technical analysis, fundamentals, or macro indicators for deeper insights into Pakistan’s economic conditions.
🔹 Color Legend (Economic Phases)
🟩 Light Green → Recovery (Early Cycle)
• Rates: low or falling
• Inflation: low/stable
🟩 Green → Recession (Down Cycle)
• Rates: cut aggressively
• Inflation: falling
🟨 Yellow → Expansion (Mid Cycle)
• Rates: rising gradually
• Inflation: moderate
🟥 Red → Overheating (Late Cycle)
• Rates: high / rising fast
• Inflation: high
🔹 Inflation Context
• SBP’s medium-term inflation target range is 5–7%, aimed at balancing growth and price stability.
• The script applies the same visual logic used in the U.S. version, now calibrated to Pakistan’s macro environment.
• The Pakistan Inflation Rate YoY (PKIRYY) line color shifts dynamically — clearly showing when inflation is rising above target, cooling, or stabilizing.
• This dual-overlay helps interpret both the cause (inflation) and effect (policy response) within Pakistan’s economic cycle, giving investors a clear macro perspective.
⚠️ Disclaimer
This script is for educational and informational purposes only. It does not provide financial advice or trading signals. Always combine it with your own research, proper risk management, and professional judgment.
RSI(14) Divergence Only — Scalping (v6)Title:
RSI(14) Divergence — Regular + Hidden + HTF EMA Filter (Scalping Edition)
🔹 Description:
This indicator automatically detects RSI(14) divergences — both Regular (Reversal) and Hidden (Continuation) — and plots them directly on the chart for precision scalping and intraday trading.
It’s optimized for low timeframes (1-minute) such as Bank Nifty, Nifty 50, and Sensex, where spotting early divergence can help confirm short-term momentum shifts.
⚙️ Core Features:
Regular Divergence Detection
Bullish Divergence: Price makes a lower low while RSI makes a higher low → potential reversal upward.
Bearish Divergence: Price makes a higher high while RSI makes a lower high → potential reversal downward.
Hidden Divergence Detection
Hidden Bullish Divergence: Price makes a higher low while RSI makes a lower low → continuation of bullish trend.
Hidden Bearish Divergence: Price makes a lower high while RSI makes a higher high → continuation of bearish trend.
HTF EMA Trend Alignment (Smart Filter)
Optional feature that aligns signals with the higher timeframe (HTF) trend using a 200 EMA.
Example: Only shows bullish divergences when the 5-minute price is above the 5-minute 200 EMA (uptrend alignment).
Helps filter false signals and keeps divergence trading directional.
Chart Visualization
Regular divergences: Bold solid lines (Green for bullish, Red for bearish).
Hidden divergences: Thin dashed lines (Teal for hidden bull, Maroon for hidden bear) — subtle enough to stay unnoticed by casual chart viewers.
Optional labels (“Bull Div”, “Bear Div”, etc.) and minimalistic markers for scalping clarity.
Option to extend divergence lines for future reference.
Custom Alerts (for all divergence types)
Get instant alerts when any regular or hidden divergence is detected.
Works seamlessly for both long and short bias setups.
📈 Recommended Usage:
Timeframe: 1-Minute (Scalping) or 3-Minute (Micro Intraday)
Markets: Bank Nifty, Nifty 50, Sensex, or any high-volatility index/stocks
Combine With:
Higher timeframe structure (H1/H4 bias)
Volume spikes or order block retests
Key support/resistance zones
Moon_TimeBreaks_Indicator🌙 Moon + Timeframe Breaks (Daily, Weekly, Monthly, Quarterly, Yearly)
A unique indicator that combines lunar cycles with major time-based breaks to reveal potential rhythm and cycle shifts in price behavior.
🔹 Features
Displays New Moon and Full Moon phases directly on the chart.
Highlights background color during lunar events.
Draws dynamic timeframe separators for Day, Week, Month, Quarter, and Year.
Helps identify cyclical turning points and time-based reactions in markets.
🔹 Customization
Toggle moon phases, background, or time breaks individually.
Adjust colors for each period (daily, weekly, etc.).
Works on all instruments and timeframes.
🔹 Use Case
Perfect for traders interested in time-price harmony, cyclical analysis, or astro-based market timing.
It pairs well with structure or liquidity tools to enhance timing accuracy.
Fair Value Lead-Lag Model [BackQuant]Fair Value Lead-Lag Model
A cross-asset model that estimates where price "should" be relative to a chosen reference series, then tracks the deviation as a normalized oscillator. It helps you answer two questions: 1) is the asset rich or cheap vs its driver, and 2) is the driver leading or lagging price over the next N bars.
Concept in one paragraph
Many assets co-move with a macro or sector driver. Think BTC vs DXY, gold vs real yields, a stock vs its sector ETF. This tool builds a rolling fair value of the charted asset from a reference series and shows how far price is above or below that fair value in standard deviation units. You can shift the reference forward or backward to test who leads whom, then use the deviation and its bands to structure mean-reversion or trend-following ideas.
What the model does
Reference mapping : Pulls a reference symbol at a chosen timeframe, with an optional lead or lag in bars to test causality.
Fair value engine : Converts the reference into a synthetic fair value of the chart using one of four methods:
Ratio : price/ref with a rolling average ratio. Good when the relationship is proportional.
Spread : price minus ref with a rolling average spread. Good when the relationship is additive.
Z-Score : normalizes both series, aligns on standardized units, then re-projects to price space. Good when scale drifts.
Beta-Adjusted : rolling regression style. Uses covariance and variance to compute beta, then builds a fair value = mean(price) + beta * (ref − mean(ref)).
Deviation and bands : Computes a z-scored deviation of price vs fair value and plots sigma bands (±1, ±2, ±3) around the fair value line on the chart.
Correlation context : Shows rolling correlation so you can judge if deviations are meaningful or just noise when co-movement is weak.
Visuals :
Fair value line on price chart with sigma envelopes.
Deviation as a column oscillator and optional line.
Threshold shading beyond user-set upper and lower levels.
Summary table with reference, deviation, status, correlation, and method.
Why this is useful
Mean reversion framework : When correlation is healthy and deviation stretches beyond your sigma threshold, probability favors reversion toward fair value. This is classic pairs logic adapted to a driver and a target.
Trend confirmation : If price rides the fair value line and deviation stays modest while correlation is positive, it supports trend persistence. Pullbacks to negative deviation in an uptrend can be buyable.
Lead-lag discovery : Shift the reference forward by +N bars. If correlation improves, the reference tends to lead. Shift backward for the reverse. Use the best setting for planning early entries or hedges.
Regime detection : Large persistent deviations with falling correlation hint at regime change. The relationship you relied on may be breaking down, so reduce confidence or switch methods.
How to use it step by step
Pick a sensible reference : Choose a macro, index, currency, or sector driver that logically explains the asset’s moves. Example: gold with DXY, a semiconductor stock with SOXX.
Test lead-lag : Nudge Lead/Lag Periods to small positive values like +1 to +5 to see if the reference leads. If correlation improves, keep that offset. If correlation worsens, try a small negative value or zero.
Select a method :
Start with Beta-Adjusted when the relationship is approximately linear with drift.
Use Ratio if the assets usually move in proportional terms.
Use Spread when they trade around a level difference.
Use Z-Score when scales wander or volatility regimes shift.
Tune windows :
Rolling Window controls how quickly fair value adapts. Shorter equals faster but noisier.
Normalization Period controls how deviations are standardized. Longer equals stabler sigma sizing.
Correlation Length controls how co-movement is measured. Keep it near the fair value window.
Trade the edges :
Mean reversion idea : Wait for deviation beyond your Upper or Lower Threshold with positive correlation. Fade back toward fair value. Exit at the fair value line or the next inner sigma band.
Trend idea : In an uptrend, buy pullbacks when deviation dips negative but correlation remains healthy. In a downtrend, sell bounces when deviation spikes positive.
Read the table : Deviation shows how many sigmas you are from fair value. Status tells you overvalued or undervalued. Correlation color hints confidence. Method tells you the projection style used.
Reading the display
Fair value line on price chart: the model’s estimate of where price should trade given the reference, updated each bar.
Sigma bands around fair value: a quick sense of residual volatility. Reversions often target inner bands first.
Deviation oscillator : above zero means rich vs fair value, below zero means cheap. Color bins intensify with distance.
Correlation line (optional): scale is folded to match thresholds. Higher values increase trust in deviations.
Parameter tips
Start with Rolling Window 20 to 30, Normalization Period 100, Correlation Length 50.
Upper and Lower Threshold at ±2.0 are classic. Tighten to ±1.5 for more signals or widen to ±2.5 to focus on outliers.
When correlation drifts below about 0.3, treat deviations with caution. Consider switching method or reference.
If the fair value line whipsaws, increase Rolling Window or move to Beta-Adjusted which tends to be smoother.
Playbook examples
Pairs-style reversion : Asset is +2.3 sigma rich vs reference, correlation 0.65, trend flat. Short the deviation back toward fair value. Cover near the fair value line or +1 sigma.
Pro-trend pullback : Uptrend with correlation 0.7. Deviation dips to −1.2 sigma while price sits near the −1 sigma band. Buy the dip, target the fair value line, trail if the line is rising.
Lead-lag timing : Reference leads by +3 bars with improved correlation. Use reference swings as early cues to anticipate deviation turns on the target.
Caveats
The model assumes a stable relationship over the chosen windows. Structural breaks, policy shocks, and index rebalances can invalidate recent history.
Correlation is descriptive, not causal. A strong correlation does not guarantee future convergence.
Do not force trades when the reference has low liquidity or mismatched hours. Use a reference timeframe that captures real overlap.
Bottom line
This tool turns a loose cross-asset intuition into a quantified, visual fair value map. It gives you a consistent way to find rich or cheap conditions, time mean-reversion toward a statistically grounded target, and confirm or fade trends when the driver agrees.