Previous Day Fibonacci + Opening RangePrev Day Fibonacci & Opening Range Levels
This indicator is designed for professional traders who want to combine yesterday’s market structure with today’s intraday levels.
🔹 Features:
Automatic Fibonacci Retracements: Draws customizable Fibonacci retracement/extension levels based on the previous day’s High & Low.
Full Customization: Users can adjust the Fibonacci ratios and colors directly in settings.
Opening Range Levels: Plots today’s first candle High & Low (user-selectable timeframe for OR).
Clear Visuals: Helps identify key reversal zones, breakout levels, and confluence areas between higher timeframe structure and intraday moves.
🔹 Usage Ideas:
Spot potential reversal zones when price reacts to previous-day Fib levels.
Combine Opening Range breakout strategies with daily Fib levels for high-probability setups.
Use as confluence levels with your existing price action or indicator-based strategy.
⚡ Pro Tip: Look for overlaps between the Opening Range and Fibonacci retracements — these zones often act as strong support/resistance areas.
Indicators and strategies
CNS - Multi-Timeframe Bollinger Band OscillatorMy hope is to optimize the settings for this indicator and reintroduce it as a "strategy" with suggested position entry and exit points shown in the price pane.
I’ve been having good results setting the “Bollinger Band MA Length” in the Input tab to between 5 and 10. You can use the standard 20 period, but your results will not be as granular.
This indicator has proven very good at finding local tops and bottoms by combining data from multiple timeframes. Use BB timeframes that are lower than the timeframe you are viewing in your price pane.
The default settings work best on the weekly timeframe, but can be adjusted for most timeframes including intraday.
Be cognizant that the indicator, like other oscillators, does occasionally produce divergences at tops and bottoms.
Any feedback is appreciated.
Overview
This indicator is an oscillator that measures the normalized position of the price relative to Bollinger Bands across multiple timeframes. It takes the price's position within the Bollinger Bands (calculated on different timeframes) and averages those positions to create a single value that oscillates between 0 and 1. This value is then plotted as the oscillator, with reference lines and colored regions to help interpret the price's relative strength or weakness.
How It Works
Bollinger Band Calculation:
The indicator uses a custom function f_getBBPosition() to calculate the position of the price within Bollinger Bands for a given timeframe.
Price Position Normalization:
For each timeframe, the function normalizes the price's position between the upper and lower Bollinger Bands.
It calculates three positions based on the high, low, and close prices of the requested timeframe:
pos_high = (High - Lower Band) / (Upper Band - Lower Band)
pos_low = (Low - Lower Band) / (Upper Band - Lower Band)
pos_close = (Close - Lower Band) / (Upper Band - Lower Band)
If the upper band is not greater than the lower band or if the data is invalid (e.g., na), it defaults to 0.5 (the midline).
The average of these three positions (avg_pos) represents the normalized position for that timeframe, ranging from 0 (at the lower band) to 1 (at the upper band).
Multi-Timeframe Averaging:
The indicator fetches Bollinger Band data from four customizable timeframes (default: 30min, 60min, 240min, daily) using request.security() with lookahead=barmerge.lookahead_on to get the latest available data.
It calculates the normalized position (pos1, pos2, pos3, pos4) for each timeframe using f_getBBPosition().
These four positions are then averaged to produce the final avg_position:avg_position = (pos1 + pos2 + pos3 + pos4) / 4
This average is the oscillator value, which is plotted and typically oscillates between 0 and 1.
Moving Averages:
Two optional moving averages (MA1 and MA2) of the avg_position can be enabled, calculated using simple moving averages (ta.sma) with customizable lengths (default: 5 and 10).
These can be potentially used for MA crossover strategies.
What Is Being Averaged?
The oscillator (avg_position) is the average of the normalized price positions within the Bollinger Bands across the four selected timeframes. Specifically:It averages the avg_pos values (pos1, pos2, pos3, pos4) calculated for each timeframe.
Each avg_pos is itself an average of the normalized positions of the high, low, and close prices relative to the Bollinger Bands for that timeframe.
This multi-timeframe averaging smooths out short-term fluctuations and provides a broader perspective on the price's position within the volatility bands.
Interpretation
0.0 The price is at or below the lower Bollinger Band across all timeframes (indicating potential oversold conditions).
0.15: A customizable level (green band) which can be used for exiting short positions or entering long positions.
0.5: The midline, where the price is at the average of the Bollinger Bands (neutral zone).
0.85: A customizable level (orange band) which can be used for exiting long positions or entering short positions.
1.0: The price is at or above the upper Bollinger Band across all timeframes (indicating potential overbought conditions).
The colored regions and moving averages (if enabled) help identify trends or crossovers for trading signals.
Example
If the 30min timeframe shows the close at the upper band (position = 1.0), the 60min at the midline (position = 0.5), the 240min at the lower band (position = 0.0), and the daily at the upper band (position = 1.0), the avg_position would be:(1.0 + 0.5 + 0.0 + 1.0) / 4 = 0.625
This value (0.625) would plot in the orange region (between 0.85 and 0.5), suggesting the price is relatively strong but not at an extreme.
Notes
The use of lookahead=barmerge.lookahead_on ensures the indicator uses the latest available data, making it more real-time, though its effectiveness depends on the chart timeframe and TradingView's data feed.
The indicator’s sensitivity can be adjusted by changing bb_length ("Bollinger Band MA Length" in the Input tab), bb_mult ("Bollinger Band Standard Deviation," also in the Input tab), or the selected timeframes.
Средний дневной ATR (по High–Low)Test v.1
we calculate in % the average ATR passed in 1 day (for 5 days)
BTC Power Law Valuation BandsBTC Power Law Rainbow
A long-term valuation framework for Bitcoin based on Power Law growth — designed to help identify macro accumulation and distribution zones, aligned with long-term investor behavior.
🔍 What Is a Power Law?
A Power Law is a mathematical relationship where one quantity varies as a power of another. In this model:
Price ≈ a × (Time)^b
It captures the non-linear, exponentially slowing growth of Bitcoin over time. Rather than using linear or cyclical models, this approach aligns with how complex systems, such as networks or monetary adoption curves, often grow — rapidly at first, and then more slowly, but persistently.
🧠 Why Power Law for BTC?
Bitcoin:
Has finite supply and increasing adoption.
Operates as a monetary network , where Metcalfe’s Law and power laws naturally emerge.
Exhibits exponential growth over logarithmic time when viewed on a log-log chart .
This makes it uniquely well-suited for power law modeling.
🌈 How to Use the Valuation Bands
The central white line represents the modeled fair value according to the power law.
Colored bands represent deviations from the model in logarithmic space, acting as macro zones:
🔵 Lower Bands: Deep value / Accumulation zones.
🟡 Mid Bands: Fair value.
🔴 Upper Bands: Euphoria / Risk of macro tops.
📐 Smart Money Concepts (SMC) Alignment
Accumulation: Occurs when price consolidates near lower bands — often aligning with institutional positioning.
Markup: As price re-enters or ascends the bands, we often see breakout behavior and trend expansion.
Distribution: When price extends above upper bands, potential for exit liquidity creation and distribution events.
Reversion: Historically, price mean-reverts toward the model — rarely staying outside the bands for long.
This makes the model useful for:
Cycle timing
Long-term DCA strategy zones
Identifying value dislocations
Filtering short-term noise
⚠️ Disclaimer
This tool is for educational and informational purposes only . It is not financial advice. The power law model is a non-predictive, mathematical framework and does not guarantee future price movements .
Always use additional tools, risk management, and your own judgment before making trading or investment decisions.
ATR-limited Donchian ChannelThe ATR-limited Donchian Channel is a modified version of the classic Donchian Channel that adapts more quickly to changing market conditions.
While a traditional Donchian Channel is based only on the highest high and lowest low over a given lookback period, this version introduces an ATR-based constraint that prevents the channel lines from extending too far away from price. This makes the channel more responsive and reduces lag compared to the standard Donchian Channel.
How it works
The upper band is based on the highest high of the last N candles, but it cannot exceed a maximum distance of ATR × Factor above the current median price (midpoint of high and low).
The lower band is based on the lowest low of the last N candles, but it cannot drop more than ATR × Factor below the median price.
If the Donchian Channel would normally extend further than this ATR-limited boundary, the line is capped and marked in blue .
Otherwise, the upper band is drawn in red and the lower band in green .
A middle line is also plotted as the average of the modified upper and lower bands.
An optional offset allows you to shift the channel backward or forward in time for easier visual alignment.
Why use this version?
Faster reaction: By constraining the channel with ATR, the indicator adapts quicker to volatility changes and avoids long periods of overextended levels.
Noise control: ATR filtering prevents extreme spikes or outlier highs/lows from stretching the channel unnecessarily.
Visual clarity: Color-coding highlights when ATR filtering is active, making it easy to distinguish capped vs. natural Donchian levels.
Typical use cases
Trend-following breakout systems, but with volatility-aware limits.
Identifying dynamic support and resistance zones that adjust to market conditions.
Filtering false breakouts by monitoring when the Donchian channel is capped by ATR.
✅ This indicator is designed for traders who want the structure of a Donchian Channel but with an adaptive, volatility-sensitive adjustment that makes it react faster and more reliably than the classic version.
Forecasting Quadratic Regression [UPDATED V6] Forecasting Quadratic Regression applies a second-degree polynomial regression model to price data, offering a non-linear alternative to traditional linear regression. By fitting a quadratic curve of the form:
y=a+bx+cx2
the indicator captures both directional trend and curvature, allowing traders to detect momentum shifts earlier than with straight-line models.
🔹 Core Features
Fits a quadratic regression curve to user-defined lookback periods
Extends the fitted curve forward to generate forecast projections
Calculates slope curvature to highlight trend acceleration or deceleration
Adapts dynamically as new bars are added
🔹 Trading Applications
Identify potential reversal zones when the curve inflects (2nd derivative sign change)
Forecast near-term mean reversion targets or extended trend continuations
Filter trades by measuring momentum curvature rather than linear slope
Visualize higher-order structure in price beyond standard regression lines
⚠️ Note: This model is statistical and assumes past curvature informs short-term future price paths. It should be combined with confirmation signals (volume, oscillators, support/resistance) to reduce false inflection points.
Multi-Currency Desk Screener + XAU & US30Stay ahead in the market with our Multi-Currency Desk Screener, designed for Traders and Analysts. This TradingView indicator monitors multiple currency pairs, XAU/USD (Gold), and US30 (Dow Jones Index) simultaneously, providing clear Buy, Sell, or Neutral signals based on Stochastic Oscillator, Moving Average, and Breakout strategy.
Features include:
Real-time multi-symbol scanning for Forex, XAU, and US30.
Visual table displaying signal status for each symbol: Buy (green), Sell (red), Neutral (yellow).
Uses Stochastic crossovers with overbought/oversold levels combined with trend filter (MA) for higher probability trades.
Breakout confirmation ensures signals align with market momentum.
Lightweight and fully compatible with TradingView charts.
Perfect for traders who want a quick overview of multiple markets and efficient decision-making without switching charts. Maximize your trading edge with a desk-style visual screener that highlights trading opportunities instantly.
Keywords: Multi-Currency Screener, Forex Trading Indicator, XAUUSD Signals, US30 Signals, Stochastic MA Breakout, TradingView Indicator, Multi-Symbol Scanner
Want to get access to this powerful indicator and stay ahead of the market?
⚡ Contact me now for details!Join Telegram for get Trading bot, Indicators Free:t.me/forexmillionsdollar
Ruptura + EMAs + VWAP + Vela Impulsiva Indicator: Breakout + EMAs + VWAP + Impulsive Candle + TP/SL
This indicator is designed to identify breakout trading opportunities by combining price action, moving averages, volume-weighted price, and impulsive candles, with clearly defined Take Profit (TP) and Stop Loss (SL) levels.
⏱️ Timeframe Logic:
The 15-minute chart is used to define the price range.
Entries are made on the 2-minute chart when breakout conditions align with momentum confirmation.
📌 Key Components:
Range Definition:
Calculates a price range based on a customizable number of candles (rangeBars), typically from the 15-minute timeframe.
Displays a shaded box highlighting this range.
Trend Filters:
Uses a fast EMA (9) and a slow EMA (21) to determine short-term and medium-term trends.
Includes VWAP as a dynamic support/resistance and directional filter.
Only allows trades when both EMAs and price confirm alignment above (for long) or below (for short) the VWAP.
Impulsive Candle Detection:
Confirms breakouts using large-bodied candles that engulf the previous candle's range.
The candle must exceed a certain multiple of the average range (minRangeMult) to qualify.
Breakout Entry Conditions:
Long Setup: Price breaks above the range high, with EMAs and VWAP confirming bullish alignment, and confirmed by an impulsive candle.
Short Setup: Price breaks below the range low, with EMAs and VWAP aligned bearishly, confirmed by an impulsive candle.
Trade Management:
Automatically plots Take Profit and Stop Loss levels based on the size of the entry candle and a customizable TP multiplier.
Visual dashed lines indicate TP (green) and SL (red) zones.
Session Filter:
Entry signals are limited to a specific time window (e.g., 9:00 to 10:00 AM New York time), typically during the NY session open.
Visual Aids:
Background color highlights potential entry zones (green for long, red for short).
Icons mark confirmed impulsive candles and entry signals.
Range box is updated periodically to reflect the active breakout zone.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Multi-Timeframe Bollinger BandsMy hope is to optimize the settings for this indicator and reintroduce it as a "strategy" with suggested position entry and exit points shown in the price pane.
I’ve been having good results setting the “Bollinger Band MA Length” in the Input tab to between 5 and 10. You can use the standard 20 period, but your results will not be as granular.
This indicator has proven very good at finding local tops and bottoms by combining data from multiple timeframes. Use timeframes that are lower than the timeframe you are viewing in your price pane. Be cognizant that the indicator, like other oscillators, does occasionally produce divergences at tops and bottoms.
Any feedback is appreciated.
Overview
This indicator is an oscillator that measures the normalized position of the price relative to Bollinger Bands across multiple timeframes. It takes the price's position within the Bollinger Bands (calculated on different timeframes) and averages those positions to create a single value that oscillates between 0 and 1. This value is then plotted as the oscillator, with reference lines and colored regions to help interpret the price's relative strength or weakness.
How It Works
Bollinger Band Calculation:
The indicator uses a custom function f_getBBPosition() to calculate the position of the price within Bollinger Bands for a given timeframe.
Price Position Normalization:
For each timeframe, the function normalizes the price's position between the upper and lower Bollinger Bands.
It calculates three positions based on the high, low, and close prices of the requested timeframe:
pos_high = (High - Lower Band) / (Upper Band - Lower Band)
pos_low = (Low - Lower Band) / (Upper Band - Lower Band)
pos_close = (Close - Lower Band) / (Upper Band - Lower Band)
If the upper band is not greater than the lower band or if the data is invalid (e.g., na), it defaults to 0.5 (the midline).
The average of these three positions (avg_pos) represents the normalized position for that timeframe, ranging from 0 (at the lower band) to 1 (at the upper band).
Multi-Timeframe Averaging:
The indicator fetches Bollinger Band data from four customizable timeframes (default: 30min, 60min, 240min, daily) using request.security() with lookahead=barmerge.lookahead_on to get the latest available data.
It calculates the normalized position (pos1, pos2, pos3, pos4) for each timeframe using f_getBBPosition().
These four positions are then averaged to produce the final avg_position:avg_position = (pos1 + pos2 + pos3 + pos4) / 4
This average is the oscillator value, which is plotted and typically oscillates between 0 and 1.
Moving Averages:
Two optional moving averages (MA1 and MA2) of the avg_position can be enabled, calculated using simple moving averages (ta.sma) with customizable lengths (default: 5 and 10).
These can be potentially used for MA crossover strategies.
What Is Being Averaged?
The oscillator (avg_position) is the average of the normalized price positions within the Bollinger Bands across the four selected timeframes. Specifically:It averages the avg_pos values (pos1, pos2, pos3, pos4) calculated for each timeframe.
Each avg_pos is itself an average of the normalized positions of the high, low, and close prices relative to the Bollinger Bands for that timeframe.
This multi-timeframe averaging smooths out short-term fluctuations and provides a broader perspective on the price's position within the volatility bands.
Interpretation
0.0 The price is at or below the lower Bollinger Band across all timeframes (indicating potential oversold conditions).
0.15: A customizable level (green band) which can be used for exiting short positions or entering long positions.
0.5: The midline, where the price is at the average of the Bollinger Bands (neutral zone).
0.85: A customizable level (orange band) which can be used for exiting long positions or entering short positions.
1.0: The price is at or above the upper Bollinger Band across all timeframes (indicating potential overbought conditions).
The colored regions and moving averages (if enabled) help identify trends or crossovers for trading signals.
Example
If the 30min timeframe shows the close at the upper band (position = 1.0), the 60min at the midline (position = 0.5), the 240min at the lower band (position = 0.0), and the daily at the upper band (position = 1.0), the avg_position would be:(1.0 + 0.5 + 0.0 + 1.0) / 4 = 0.625
This value (0.625) would plot in the orange region (between 0.85 and 0.5), suggesting the price is relatively strong but not at an extreme.
Notes
The use of lookahead=barmerge.lookahead_on ensures the indicator uses the latest available data, making it more real-time, though its effectiveness depends on the chart timeframe and TradingView's data feed.
The indicator’s sensitivity can be adjusted by changing bb_length ("Bollinger Band MA Length" in the Input tab), bb_mult ("Bollinger Band Standard Deviation," also in the Input tab), or the selected timeframes.
RSI Diode PanelA small and clean RSI panel that simultaneously shows the 15m, 30m, 1h, 2h, 4h, and 1d timeframes, which can help you with basic trend orientation.
MA44 StrategyMA-44 Strategy
• The previous candle closes below the 44-day MA,
• The current candle closes just above or immediately above the 44-day MA,
• Followed by a green candle,
• With the 44-day MA above the 50-day MA (indicating an uptrend).
Multi SMA by GreenDecodeThis indicator, created by GreenDecode, plots eight Simple Moving Averages (SMAs) with customizable lengths and resolutions. Each SMA can be toggled on or off, and the colors are distinctly set for easy identification: SMA1 (yellow), SMA2 (cyan), SMA3 (green), SMA4 (red), SMA5 (blue), SMA6 (lightblue), SMA7 (teal), and SMA8 (gold). The SMAs are calculated to avoid repainting by using the 'lookahead=barmerge.lookahead_off' parameter, ensuring historical accuracy. Ideal for technical analysis to identify trends and potential reversal points on various timeframes.
MACD BILE
📊 How to Interpret
Green histogram → strong bullish momentum, favoring buy/long setups.
Red histogram → strong bearish momentum, favoring sell/short setups.
MACD crossing above Signal → buy signal.
MACD crossing below Signal → sell signal.
Because the cycle is adaptive, the indicator becomes more responsive in volatile markets and more stable during sideways conditions, reducing noise compared to the standard fixed-period MACD.
🔑 Key Advantages over Standard MACD
Adaptive to market conditions → no need to manually choose fixed periods.
Reduces false signals during sideways or ranging markets.
Provides clearer trend detection, especially in highly volatile assets such as crypto, forex, and stocks.
RSI Buy Signal below 25 with 5% Target RSI Buy Signal below 25 with 5% Target . Candle indicates Buy and Target when the RSI falls below the 25
CleanBreak Lines (Break + First Retest)CleanBreak lines draws one robust support line (green) from swing lows and one robust resistance line (red) from swing highs, then optionally signals a confirmed break and the first clean retest back to that line. Lines are scored with a transparent W-Score (0–100) so traders can judge quality at a glance. The script is non-repainting and uses only confirmed bar data.
What it does
Auto-builds two trendlines that aim to represent meaningful support and resistance.
Uses a median-based slope so outliers and single spikes do not distort the line.
Computes a W-Score per line from three things: touches, span (how long it held), and respect (staying on the correct side).
Optionally triggers a single, tightly-gated signal on Break + First Retest.
How it works (plain English)
Detect recent swing highs and swing lows.
Fit one line through highs and one through lows using a robust, median-style slope estimate.
Score each line: more clean touches and longer span raise the W-Score; frequent violations lower it.
A break requires a candle close beyond the line by a small ATR margin.
A first retest requires price to come back to the line within a limited number of bars and hold on close.
A single arrow may print on that confirmed retest, with optional alerts.
What it is not
Not a prediction model and not a promises-of-profit tool.
Not a multi-signal spammer: by design it aims to allow one retest entry per break.
Not a regression channel or machine-learning system.
How to use
At a glance: treat the green line as candidate support and the red line as candidate resistance.
Conservative approach: wait for a break on close and then the first retest to hold; use the arrow as a prompt, not a command.
Context-only mode: hide arrows in Style if you want the lines and W-Score only.
Inputs (brief)
Core: Swing Length, Max Pivots, Min Touches, Min Span Bars.
Scoring: Touches Max (cap), Weights for touches vs span, Min W-Score to arm.
Break and Retest: Break Margin x ATR, Retest Tolerance x ATR, Retest Window (bars).
Visuals: Show Labels, Show Table, Line Width, Fade When Refit.
Recommended presets
Cleaner, fewer signals: Min Touches 4–5, Min Span Bars 100–150, Min W-Score 70–80, Break Margin 0.40–0.60 ATR, Retest Tolerance 0.10–0.15 ATR, Retest Window 8–12 bars.
Lines-only: keep defaults and uncheck the two plotshapes in Style.
Alerts
CB Long Retest: break above the red line and first retest holds.
CB Short Retest: break below the green line and first retest holds.
Use “Once per bar close” for consistency.
On-chart table (if enabled)
RES / SUP: W-Score and distance from price in ATR terms.
Status: “Waiting Long RT”, “Waiting Short RT”, or “Idle”.
Thresholds: MinScore and Retest bars for quick context.
Timeframes
Works well on 1h to 1D. On very low timeframes, raise Break Margin x ATR to reduce whipsaw effects. On higher timeframes, increase Min Touches and Min Span Bars.
Non-repainting policy
All logic uses confirmed pivots and confirmed bar closes.
Breaks and retests are validated on close; alerts reference only confirmed conditions.
No lookahead in any request.security call.
Original implementation focused on a median-based robust slope for auto trendlines, plus a transparent W-Score and a single retest gate.
Disclosure
This script is for education and charting. It does not guarantee outcomes, and past behavior does not imply future results. Always validate on historical data and practice risk management.
BeginerBeginner Forex Template — Price (overlay on candles): EMA20/EMA50, BUY/SELL signals, trend background, alertconditions.
HTF Bias Signals (Daily EMA Bias + LTF EMA Cross)clean, flexible indicator (Pine v5). It defines higher-timeframe (HTF) bias from Daily and/or Weekly EMAs, then only fires entries on your chart’s timeframe when that bias agrees with a simple fast/slow EMA trigger. It also includes alertconditions so you can automate alerts.
EMA Golden & Death Cross with Profit Takingjust showing golden crosses and death crosses based on ema lines
Pivot Points with CPR by Fin Virajఈ indicator ద్వారా మీరు Pivot Points మరియు Central Pivot Range (CPR) రెండింటినీ ఒకే chartలో చూడవచ్చు.
ఇది Intraday traders మరియు Swing traders కి చాలా ఉపయోగపడే tool, ఎందుకంటే ఇది clear support & resistance zones ని చూపిస్తుంది.
🔑 Key Features:
✅ Daily Pivot Points (Classic formula ఆధారంగా)
✅ Central Pivot Range (CPR) with Top, Bottom & Pivot levels
✅ Next Day Pivot Levels కూడా calculation ద్వారా చూపిస్తుంది
✅ Institutional traders ఎక్కువగా use చేసే Opening Range Reference తో confluence చెక్ చేయడానికి perfect
✅ Easy-to-use, clutter-free visualization
🎯 Why use this?
Intradayలో సరైన Support & Resistance levels identify చేయడానికి
CPR ద్వారా మార్కెట్లోని trend strength ని అర్థం చేసుకోవడానికి
Next day preparation కోసం pivot levels ముందే readyగా ఉండటానికి
Professional trading styleకి దగ్గరగా ఉండే price action + pivot confluence ను చూసేందుకు
👉 ఈ indicatorని consistentగా practice చేస్తే, మీ entries & exits మరింత confidentగా చేయగలరు.
Created & Published by Fin Viraj
📌 Visit: finviraj.com
🔥 "Master the market with the power of Pivots & CPR!"
RSI, CCI, ADX Panel (Custom TF for Each)RSI, CCI, ADX Panel (Custom TF for Each)
This indicator combines RSI, CCI, and ADX into a single panel, allowing traders to view three key momentum/trend signals together. Each indicator can be calculated on its own custom timeframe, making it useful for multi-timeframe analysis.
Features:
RSI (Relative Strength Index): Measures momentum, useful for identifying overbought/oversold conditions.
CCI (Commodity Channel Index): Detects cyclical movements and potential reversals.
ADX (Average Directional Index): Evaluates trend strength without regard to direction.
Independent timeframe selection for RSI, CCI, and ADX.
Distinct colors for each indicator (RSI = Blue, CCI = Orange, ADX = Purple).
Single consolidated panel for compact analysis.
This tool is designed to give a multi-perspective view of market strength, momentum, and trend in one place.
Global M2 + BTCUSD (90-day displacement)the Global M2 and the BTCUSD charts with a 90-day relative displacement
Smart Money Confluence Scanner// Smart Money Confluence Scanner v2.0
// Combines Fair Value MS + Zero Lag Trend + Target Trend + Gann High Low
// © Smart Money Trading System
//
// USAGE NOTES:
// ============
// 1. This indicator combines 4 different trend analysis methods for confluence trading
// 2. Signals require multiple confirmations (default: 3 out of 4 indicators)
// 3. Best used on higher timeframes (4H, Daily) for more reliable signals
// 4. Always use proper risk management - suggested 1-2% risk per trade
//
// INDICATOR COMPONENTS:
// ====================
// - Zero Lag EMA: Trend direction with volatility bands
// - Gann High/Low: Market structure analysis
// - Target Trend: Momentum-based trend detection
// - Fair Value Gaps: Price inefficiency identification
//
// SIGNAL INTERPRETATION:
// ======================
// GREEN ARROW (BUY): Multiple bullish confirmations aligned
// RED ARROW (SELL): Multiple bearish confirmations aligned
// TABLE: Shows real-time status of each indicator
// FVG BOXES: Price gaps that may act as support/resistance
// AOI CIRCLES: Near significant Fair Value Gap levels
//
// ALERTS AVAILABLE:
// ================
// - Main Buy/Sell Signals (high confidence)
// - Bull/Bear Watch (3 confirmations, prepare for entry)
// - Trend Change Detection (early warning)
//
// RISK MANAGEMENT:
// ===============
// - Stop Loss: Automatically calculated based on market structure
// - Take Profit: 2:1 risk/reward ratio (configurable)
// - Position sizing considers volatility (ATR-based)
//
// OPTIMIZATION TIPS:
// ==================
// - Adjust "Minimum Confirmations" based on market conditions
// - In volatile markets: increase confirmations to 4
// - In trending markets: decrease to 2 for more signals
// - Backtest parameters on your specific timeframe/asset
//
// VERSION HISTORY:
// ===============
// v2.0: Fixed Pine Script v5 compatibility issues
// - Resolved boolean type inference problems
// - Fixed dynamic hline() issues with AOI levels
// - Improved null value handling throughout
//@version=5
indicator("Smart Money Confluence Scanner", shorttitle="SMCS", overlay=true, max_lines_count=500, max_boxes_count=500, max_labels_count=500)
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// INPUTS
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// === TREND DETECTION SETTINGS ===
zlLength = input.int(70, "Zero Lag EMA Length", group="Trend Detection")
zlMult = input.float(1.2, "Volatility Band Multiplier", group="Trend Detection")
gannHigh = input.int(13, "Gann High Period", group="Trend Detection")
gannLow = input.int(21, "Gann Low Period", group="Trend Detection")
trendLength = input.int(10, "Target Trend Length", group="Trend Detection")
// === STRUCTURE SETTINGS ===
showFVG = input.bool(true, "Show Fair Value Gaps", group="Market Structure")
showAOI = input.bool(true, "Show Areas of Interest", group="Market Structure")
aoiCount = input.int(3, "Max AOIs to Display", minval=1, group="Market Structure")
// === SIGNAL SETTINGS ===
requireMultiConfirm = input.bool(true, "Require Multi-Indicator Confirmation", group="Signal Filtering")
minConfirmations = input.int(3, "Minimum Confirmations Required", minval=2, maxval=4, group="Signal Filtering")
riskReward = input.float(2.0, "Minimum Risk:Reward Ratio", group="Risk Management")
// === VISUAL SETTINGS ===
bullColor = input.color(#00ff88, "Bullish Color", group="Appearance")
bearColor = input.color(#ff0044, "Bearish Color", group="Appearance")
fvgBullColor = input.color(color.new(#00ff88, 80), "FVG Bull Fill", group="Appearance")
fvgBearColor = input.color(color.new(#ff0044, 80), "FVG Bear Fill", group="Appearance")
aoiColor = input.color(color.yellow, "AOI Color", group="Appearance")
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// FUNCTIONS
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// ATR-based calculations
atr20 = ta.atr(20)
atr200 = ta.sma(ta.atr(200), 200) * 0.8
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// ZERO LAG TREND
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
lag = math.floor((zlLength - 1) / 2)
zlema = ta.ema(close + (close - close ), zlLength)
volatility = ta.highest(ta.atr(zlLength), zlLength*3) * zlMult
var int zlTrend = 0
if ta.crossover(close, zlema + volatility)
zlTrend := 1
if ta.crossunder(close, zlema - volatility)
zlTrend := -1
// Zero Lag signals with explicit boolean typing
zlBullEntry = bool(ta.crossover(close, zlema) and zlTrend == 1 and zlTrend == 1)
zlBearEntry = bool(ta.crossunder(close, zlema) and zlTrend == -1 and zlTrend == -1)
zlTrendChange = bool(ta.change(zlTrend) != 0)
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// GANN HIGH LOW
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
gannSmaHigh = ta.sma(high, gannHigh)
gannSmaLow = ta.sma(low, gannLow)
gannDirection = close > nz(gannSmaHigh ) ? 1 : close < nz(gannSmaLow ) ? -1 : 0
gannValue = ta.valuewhen(gannDirection != 0, gannDirection, 0)
gannLine = gannValue == -1 ? gannSmaHigh : gannSmaLow
// Gann signals with explicit boolean typing
gannBullCross = bool(ta.crossover(close, gannLine) and gannValue == 1)
gannBearCross = bool(ta.crossunder(close, gannLine) and gannValue == -1)
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// TARGET TREND
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
targetSmaHigh = ta.sma(high, trendLength) + atr200
targetSmaLow = ta.sma(low, trendLength) - atr200
var bool targetTrend = false // Explicit initialization
if ta.crossover(close, targetSmaHigh)
targetTrend := true
if ta.crossunder(close, targetSmaLow)
targetTrend := false
targetValue = targetTrend ? targetSmaLow : targetSmaHigh
targetBullSignal = bool(ta.change(targetTrend) and not targetTrend )
targetBearSignal = bool(ta.change(targetTrend) and targetTrend )
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// FAIR VALUE GAPS
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// FVG Detection with explicit boolean typing
fvgBull = bool(low > high and close > high )
fvgBear = bool(high < low and close < low )
// Basic Market Structure
var int msDirection = 0
var float msHigh = high
var float msLow = low
if fvgBull and msDirection <= 0
msDirection := 1
msHigh := high
msLow := low
if fvgBear and msDirection >= 0
msDirection := -1
msHigh := high
msLow := low
if msDirection == 1 and high > msHigh
msHigh := high
if msDirection == -1 and low < msLow
msLow := low
// Structure breaks with explicit boolean typing
structureBreakBull = bool(msDirection == 1 and ta.crossover(close, msHigh ))
structureBreakBear = bool(msDirection == -1 and ta.crossunder(close, msLow ))
// Areas of Interest (AOI) - Store significant FVG levels (simplified approach)
var float aoiLevels = array.new_float(0)
if showAOI and (fvgBull or fvgBear)
newLevel = fvgBull ? high : low
// Check if this level is significantly different from existing ones
addLevel = true
if array.size(aoiLevels) > 0
for existingLevel in aoiLevels
if math.abs(newLevel - existingLevel) < atr20 * 0.5
addLevel := false
break
if addLevel
array.push(aoiLevels, newLevel)
if array.size(aoiLevels) > aoiCount
array.shift(aoiLevels)
// Note: AOI levels are stored in array for reference and marked with visual indicators
// Visual AOI markers - place small indicators when price is near AOI levels
aoiNearby = false
if showAOI and array.size(aoiLevels) > 0
for level in aoiLevels
if not na(level) and math.abs(close - level) <= atr20
aoiNearby := true
break
// Plot AOI proximity indicator
plotshape(aoiNearby, title="Near AOI Level", location=location.belowbar,
color=color.new(aoiColor, 0), style=shape.circle, size=size.tiny)
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// SIGNAL INTEGRATION
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// Count confirmations for each direction
// NOTE: This is the core logic - we need multiple indicators agreeing for high-confidence signals
var int bullConfirmations = 0
var int bearConfirmations = 0
// Reset counters each bar
bullConfirmations := 0
bearConfirmations := 0
// Check each indicator (4 total possible confirmations)
// 1. Zero Lag Trend Direction
if zlTrend == 1
bullConfirmations += 1
if zlTrend == -1
bearConfirmations += 1
// 2. Gann High/Low Position
if close > gannLine and nz(gannValue) == 1
bullConfirmations += 1
if close < gannLine and nz(gannValue) == -1
bearConfirmations += 1
// 3. Target Trend Direction
if targetTrend == true
bullConfirmations += 1
if targetTrend == false
bearConfirmations += 1
// 4. Market Structure Direction
if msDirection == 1
bullConfirmations += 1
if msDirection == -1
bearConfirmations += 1
// CONFLUENCE FILTER: Only trade when multiple indicators agree
baseConditionsMet = bool(requireMultiConfirm ? (bullConfirmations >= minConfirmations or bearConfirmations >= minConfirmations) : true)
// Enhanced entry signals with proper null handling
strongBullSignal = bool(baseConditionsMet and bullConfirmations >= minConfirmations and (zlBullEntry or gannBullCross or targetBullSignal or structureBreakBull or fvgBull))
strongBearSignal = bool(baseConditionsMet and bearConfirmations >= minConfirmations and (zlBearEntry or gannBearCross or targetBearSignal or structureBreakBear or fvgBear))
// RISK MANAGEMENT: Dynamic stop loss and take profit calculation
// Stop losses are placed at logical market structure levels, not arbitrary percentages
stopLossLevelBull = nz(targetTrend ? targetSmaLow : nz(msLow, low) - atr20, low - atr20)
stopLossLevelBear = nz(targetTrend ? targetSmaHigh : nz(msHigh, high) + atr20, high + atr20)
// Calculate risk amount (distance to stop loss)
riskAmountBull = math.max(close - stopLossLevelBull, 0)
riskAmountBear = math.max(stopLossLevelBear - close, 0)
// Multiple take profit levels for scaling out positions
target1Bull = close + (riskAmountBull * riskReward) // 1st target: 2R (default)
target2Bull = close + (riskAmountBull * riskReward * 1.5) // 2nd target: 3R
target3Bull = close + (riskAmountBull * riskReward * 2.5) // 3rd target: 5R
target1Bear = close - (riskAmountBear * riskReward) // 1st target: 2R (default)
target2Bear = close - (riskAmountBear * riskReward * 1.5) // 2nd target: 3R
target3Bear = close - (riskAmountBear * riskReward * 2.5) // 3rd target: 5R
// Risk/Reward filter with explicit boolean typing
validRRBull = bool(riskAmountBull > 0 and (riskAmountBull * riskReward) > (close * 0.01))
validRRBear = bool(riskAmountBear > 0 and (riskAmountBear * riskReward) > (close * 0.01))
// Final signals with explicit boolean typing and proper null handling
finalBullSignal = bool(nz(strongBullSignal, false) and nz(validRRBull, false) and barstate.isconfirmed)
finalBearSignal = bool(nz(strongBearSignal, false) and nz(validRRBear, false) and barstate.isconfirmed)
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// VISUALS
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// Plot main trend lines
plot(zlema, "Zero Lag EMA", color=zlTrend == 1 ? bullColor : zlTrend == -1 ? bearColor : color.gray, linewidth=2)
plot(gannLine, "Gann Line", color=nz(gannValue) == 1 ? color.new(bullColor, 50) : color.new(bearColor, 50), linewidth=1)
// Plot FVGs
if showFVG and fvgBull
box.new(bar_index , high , bar_index, low, border_color=bullColor, bgcolor=fvgBullColor)
if showFVG and fvgBear
box.new(bar_index , low , bar_index, high, border_color=bearColor, bgcolor=fvgBearColor)
// Signal arrows
plotshape(finalBullSignal, "BUY Signal", shape.triangleup, location.belowbar, bullColor, size=size.normal)
plotshape(finalBearSignal, "SELL Signal", shape.triangledown, location.abovebar, bearColor, size=size.normal)
// Entry and target labels
if finalBullSignal
label.new(bar_index, low - atr20,
text="BUY SIGNAL Check Details on Chart",
style=label.style_label_up, color=bullColor, textcolor=color.white, size=size.normal)
if finalBearSignal
label.new(bar_index, high + atr20,
text="SELL SIGNAL Check Details on Chart",
style=label.style_label_down, color=bearColor, textcolor=color.white, size=size.normal)
// Confirmation status table
if barstate.islast
var table infoTable = table.new(position.top_right, 3, 6, bgcolor=color.new(color.white, 80), border_width=1)
table.cell(infoTable, 0, 0, "Indicator", text_color=color.black, bgcolor=color.new(color.gray, 70))
table.cell(infoTable, 1, 0, "Bull", text_color=color.black, bgcolor=color.new(color.gray, 70))
table.cell(infoTable, 2, 0, "Bear", text_color=color.black, bgcolor=color.new(color.gray, 70))
table.cell(infoTable, 0, 1, "Zero Lag", text_color=color.black)
table.cell(infoTable, 1, 1, zlTrend == 1 ? "✓" : "✗", text_color=zlTrend == 1 ? bullColor : color.gray)
table.cell(infoTable, 2, 1, zlTrend == -1 ? "✓" : "✗", text_color=zlTrend == -1 ? bearColor : color.gray)
table.cell(infoTable, 0, 2, "Gann", text_color=color.black)
table.cell(infoTable, 1, 2, (close > gannLine and nz(gannValue) == 1) ? "✓" : "✗", text_color=(close > gannLine and nz(gannValue) == 1) ? bullColor : color.gray)
table.cell(infoTable, 2, 2, (close < gannLine and nz(gannValue) == -1) ? "✓" : "✗", text_color=(close < gannLine and nz(gannValue) == -1) ? bearColor : color.gray)
table.cell(infoTable, 0, 3, "Target", text_color=color.black)
table.cell(infoTable, 1, 3, targetTrend == true ? "✓" : "✗", text_color=targetTrend == true ? bullColor : color.gray)
table.cell(infoTable, 2, 3, targetTrend == false ? "✓" : "✗", text_color=targetTrend == false ? bearColor : color.gray)
table.cell(infoTable, 0, 4, "Structure", text_color=color.black)
table.cell(infoTable, 1, 4, msDirection == 1 ? "✓" : "✗", text_color=msDirection == 1 ? bullColor : color.gray)
table.cell(infoTable, 2, 4, msDirection == -1 ? "✓" : "✗", text_color=msDirection == -1 ? bearColor : color.gray)
table.cell(infoTable, 0, 5, "TOTAL", text_color=color.black, bgcolor=color.new(color.gray, 70))
table.cell(infoTable, 1, 5, str.tostring(bullConfirmations) + "/4", text_color=bullConfirmations >= minConfirmations ? bullColor : color.gray, bgcolor=color.new(color.gray, 70))
table.cell(infoTable, 2, 5, str.tostring(bearConfirmations) + "/4", text_color=bearConfirmations >= minConfirmations ? bearColor : color.gray, bgcolor=color.new(color.gray, 70))
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// ALERTS
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// Main alert conditions with proper boolean handling
alertcondition(finalBullSignal, title="SMCS Buy Signal", message="SMCS Buy Signal at {{close}}")
alertcondition(finalBearSignal, title="SMCS Sell Signal", message="SMCS Sell Signal at {{close}}")
// Additional watch alerts for near-signals
bullWatch = bool(bullConfirmations >= 3 and not finalBullSignal)
bearWatch = bool(bearConfirmations >= 3 and not finalBearSignal)
trendChange = bool(zlTrendChange)
alertcondition(bullWatch, title="SMCS Bull Watch", message="SMCS Bull Watch: 3 Confirmations")
alertcondition(bearWatch, title="SMCS Bear Watch", message="SMCS Bear Watch: 3 Confirmations")
alertcondition(trendChange, title="SMCS Trend Change", message="SMCS Trend Change Detected")
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
// CONFIGURATION GUIDE
//═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
//
// RECOMMENDED SETTINGS BY TIMEFRAME:
// ==================================
//
// SCALPING (1M-5M):
// - Zero Lag Length: 50
// - Gann High: 8, Gann Low: 13
// - Min Confirmations: 4 (strict filtering)
// - Risk/Reward: 1.5
//
// SWING TRADING (1H-4H):
// - Zero Lag Length: 70 (default)
// - Gann High: 13, Gann Low: 21 (default)
// - Min Confirmations: 3 (default)
// - Risk/Reward: 2.0 (default)
//
// POSITION TRADING (Daily+):
// - Zero Lag Length: 100
// - Gann High: 21, Gann Low: 34
// - Min Confirmations: 2 (more signals)
// - Risk/Reward: 3.0
//
// MARKET CONDITIONS:
// ==================
// TRENDING MARKETS: Reduce confirmations to 2, increase RR to 3:1
// RANGING MARKETS: Increase confirmations to 4, keep RR at 2:1
// HIGH VOLATILITY: Increase volatility multiplier to 1.5-2.0
// LOW VOLATILITY: Decrease volatility multiplier to 0.8-1.0