eBacktesting - Learning: Order BlockseBacktesting – Learning: Order Blocks helps you spot Order Blocks on your chart in a clean, beginner-friendly way.
When price breaks structure, the indicator highlights the last opposite candle that often becomes a key reaction zone later (the Order Block). You’ll see the OB marked as a zone, and when price comes back and mitigates it (returns into the zone), that OB is removed so your chart stays uncluttered and focused on what matters now.
This indicator is built to pair perfectly with the eBacktesting extension, where traders can practice these concepts step-by-step. Backtesting concepts visually like this is one of the fastest ways to learn, build confidence, and improve trading performance.
Educational use only. Not financial advice.
Indikator dan strategi
T3 MACD BB flow What this script does – in plain words
Smoothes the MACD with a special T3 filter, turning the raw MACD into a smoother line so short‑term noise is reduced.
Draws Bollinger‑style bands around that smoothed MACD, giving a “mid line” and upper/lower envelopes that show how far the line is from its recent average.
Colors the main line green when it’s rising and red when it’s falling, helping you see the trend at a glance.
Adds a bold zero line plus light gray markers on the bands so you can spot crossovers easily.
Includes a translucent blue fill between the upper and lower bands for visual emphasis.
This gives a clear, color‑coded view of MACD momentum plus volatility bands—all on the same indicator pane.
Volume-Adjusted CCI Trend [Alpha Extract]A sophisticated trend identification system that combines dual EMA direction analysis with volume-weighted normalization and CCI momentum filtering for comprehensive trend validation. Utilizing Volume RSI integration and standard deviation-based bands that expand and contract with volume characteristics, this indicator delivers institutional-grade trend detection with multi-layered confirmation requirements. The system's volume adjustment mechanism modulates signal sensitivity based on participation strength while CCI thresholds prevent false signals during weak momentum conditions, creating a robust trend-following framework with reduced whipsaw susceptibility.
🔶 Advanced Dual EMA Direction Engine
Implements fast and slow exponential moving average comparison to establish primary trend direction bias with configurable period parameters for timeframe optimization. The system calculates trend direction as binary +1 (bullish when fast EMA exceeds slow EMA) or -1 (bearish when slow exceeds fast), providing foundational directional input that requires additional confirmation before generating actionable trend states.
🔶 Volume-Adjusted Normalization Framework
Features sophisticated normalization calculation that measures price deviation from basis EMA, scales by standard deviation, then applies volume-weighted adjustment factor for participation-sensitive signal generation. The system calculates Volume RSI to quantify relative volume strength, converts to ratio format, and multiplies normalized deviation by volume factor scaled by impact parameter, creating signals that strengthen during high-volume confirmations and weaken during low-volume moves.
// Volume-Adjusted Normalization
Vol_Ratio = Volume_RSI / 50
Vol_Factor = 1 + (Vol_Ratio - 1) * Vol_Impact
Dev = src - Basis_EMA
Raw_Normalized = Dev / (StdDev * Multiplier)
Vol_Adjusted_Norm = Raw_Normalized * Vol_Factor
🔶 CCI Momentum Filter Integration
Implements Commodity Channel Index threshold system with configurable upper and lower bounds to validate trend strength and filter sideways market conditions. The system calculates standard CCI with adjustable length, compares against asymmetric thresholds (default +100 bullish, -50 bearish), and requires CCI confirmation in addition to EMA direction and normalized deviation before transitioning trend states, ensuring only high-conviction signals generate entries.
🔶 Multi-Layer Trend State Logic
Provides intelligent trend state machine requiring simultaneous confirmation from EMA direction, volume-adjusted normalization threshold breach, and optional CCI momentum validation. The system maintains persistent trend state that only transitions when all three conditions align, preventing premature reversals during temporary retracements or low-volume fluctuations while capturing genuine trend changes with institutional-grade confirmation requirements.
🔶 Dynamic Volume Band Architecture
Creates volatility-adjusted bands around basis EMA using standard deviation multiplied by volume factor, producing channels that widen during high-volume periods and contract during low-volume consolidations. The system applies identical volume adjustment to band calculations as normalization metric, ensuring visual envelope consistency with underlying signal logic and providing intuitive reference boundaries for trend-following price action.
🔶 Gradient Strength Visualization System
Implements color intensity modulation based on normalized signal strength relative to threshold requirements, creating visual feedback that communicates trend conviction. The system calculates strength ratio by dividing absolute normalized value by threshold, caps at 1.0, and applies gradient interpolation from muted to vivid colors, instantly conveying whether current trend exhibits marginal or strong characteristics through line and candle coloring.
🔶 Volume RSI Calculation Engine
Utilizes RSI methodology applied to volume series rather than price to quantify relative participation strength with normalization to 0.5-1.5 range for factor multiplication. The system processes volume through standard RSI calculation, divides by 50 to center around 1.0, and produces ratio values where readings above 1.0 indicate above-average volume and below 1.0 suggest below-average participation for signal adjustment purposes.
🔶 Asymmetric Threshold Configuration
Features separate positive and negative normalization thresholds with independent CCI upper and lower bounds enabling optimization for bullish versus bearish signal generation characteristics. The system defaults to symmetric normalized thresholds (±0.2) but asymmetric CCI levels (+100/-50), recognizing that bullish momentum often requires stronger confirmation than bearish reversals in typical market structures.
🔶 Comprehensive Visual Integration
Provides multi-dimensional trend visualization through color-coded basis line, volume-adjusted bands with gradient fills, trend-synchronized candle coloring, and transition signal labels. The system enables selective display toggling for each visual component while maintaining consistent color scheme and strength-based intensity across all elements for cohesive chart presentation without overwhelming information density.
🔶 Alert and Signal Framework
Generates trend change alerts when state transitions occur with all confirmation requirements satisfied, providing notifications for bullish (transition to +1) and bearish (transition to -1) signals. The system implements state change detection through comparison with previous bar trend state, ensuring single alert per transition rather than continuous notifications during sustained trends.
🔶 Performance Optimization Architecture
Employs efficient calculation methods with null value handling for Volume RSI initialization and nz() functions preventing calculation errors during early bars. The system includes intelligent state persistence maintaining previous trend during ambiguous conditions and optimized gradient calculations balancing visual quality with computational efficiency across extended historical periods.
🔶 Why Choose Volume-Adjusted CCI Trend ?
This indicator delivers sophisticated trend identification through multi-layered confirmation combining directional EMA analysis, volume-weighted normalization, and momentum validation via CCI filtering. Unlike traditional trend indicators relying solely on price-based calculations, the volume adjustment mechanism ensures signals strengthen during high-participation moves and weaken during low-volume drifts, reducing false breakouts and choppy market whipsaws. The system's requirement for simultaneous EMA direction, normalized threshold breach, and CCI momentum confirmation creates institutional-grade signal quality suitable for systematic trend-following approaches across cryptocurrency, forex, and equity markets. The volume-adjusted bands provide dynamic support/resistance references while the gradient strength visualization enables instant assessment of trend conviction for position sizing and risk management decisions.
Sakata Reversal MatrixThis indicator automatically detects key candlestick reversal patterns based on the traditional Japanese "Sakata Five Methods."
Key Features: Identifies patterns such as Hammer, Engulfing, Harami, Piercing/Dark Cloud, and Gaps (Sanku).
Strict Star Detection: "Morning Star" and "Evening Star" signals are filtered using a strict logic where the second candle (the star) must be visually isolated from the surrounding candles.
High-Accuracy Filter: Combines RSI (below 30 or above 70) with Bollinger Bands to ensure signals appear only during overbought or oversold conditions, reducing false signals.
Bilingual Support: Easily toggle between Japanese and English labels in the settings.
このインジケーターは、日本の伝統的な相場分析法である「酒田五法」をベースに、主要な反転ローソク足パターンを自動検知します。
主な機能: ハンマー(首吊り線)、包み足、はらみ足、切り込み線、三空などを表示。
厳格な明星判定: 「明けの明星」「宵の明星」は、2本目のローソク足の実体が前後の足から窓を開けて孤立している場合のみ検知する厳格なロジックを採用しています。
高精度フィルタ: RSI(35以下/65以上)とボリンジャーバンドを組み合わせ、相場が過熱しているポイントでのみサインを出すことで、騙しを軽減しています。
バイリンガル対応: 設定から日本語と英語の表示を切り替え可能です。
Kadunagra-Pivot Point SuperTrend-trades analysis
📊 Pivot Point SuperTrend Strategy (MA-Filtered, 100% Equity)
This strategy is a trend-following system that combines Pivot Point–based SuperTrend logic with a higher-timeframe Moving Average filter and percentage-based risk control.
---
🔹 Core Logic
1️⃣ Trend Detection (Pivot Point SuperTrend)
Uses pivot highs and lows to calculate a dynamic center line
Builds ATR-based upper and lower bands
Determines market trend:
Bullish trend when price breaks above the trailing band
Bearish trend when price breaks below the trailing band
Trend changes generate:
Buy signal → trend flips from bearish to bullish
Sell signal → trend flips from bullish to bearish
---
2️⃣ Moving Average Trend Filter (User-Selectable)
A single Moving Average is used as a higher-timeframe confirmation
User can select the MA type from a dropdown:
SMA, EMA, WMA, VWMA, RMA, or HMA
Trade rules:
Long trades only when price is above the selected MA
Short trades only when price is below the selected MA
This helps avoid counter-trend trades and improves signal quality.
---
3️⃣ Trade Execution & Position Sizing
Strategy uses 100% of account equity per trade
No pyramiding
Long and short trades are handled symmetrically
---
4️⃣ Risk Management (Percentage Stop-Loss)
Uses a fixed percentage stop-loss
Stop-loss is calculated from the actual entry price:
Long SL → Entry Price − SL%
Short SL → Entry Price + SL%
Ensures consistent risk control across all trades
---
⏱ Recommended Timeframe & Market
✅ Default / Optimized Use Case
Timeframe: 4-Hour (4H)
Market: BTC (Bitcoin)
MA Length (default): 200 EMA
ATR Factor & Period: Tuned for swing-style trend moves
These default parameters are best suited for 4H BTC based on trend behavior and volatility.
---
⚙️ Customization & Flexibility
All parameters are fully adjustable and can be optimized for:
Different timeframes (1H, Daily, etc.)
Other cryptocurrencies or markets
More aggressive or conservative risk profiles
You can modify:
Pivot period
ATR factor & period
MA type and length
Stop-loss percentage
---
🧠 Strategy Style Summary
✔ Trend-following
✔ MA-filtered confirmation
✔ No repaint logic
✔ Works best in trending markets
✔ Suitable for swing trading
Swing trend Pro Buy and Sell Alerts Bu AMit NamdeoThis script, "Swing Pro ", is a complete Trend Following system designed for Swing Trading. It moves away from the complexity of needing all 3 EMAs to align perfectly and instead uses a simpler, more robust logic that filters out noise using a "Base Support" concept.
Here is a breakdown of exactly how it works:
1. The Strategy Logic (The Core)
The script combines Momentum (Crossovers) with Location (Base Support) to generate high-probability signals.
The Trigger (Entry):
It watches for a crossover between the Fast EMA (20) and Medium EMA (50).
Buy Trigger: 20 EMA crosses Above 50 EMA.
Sell Trigger: 20 EMA crosses Below 50 EMA.
The Filter (Location):
Signals are only valid if they happen on the correct side of the Slow EMA (200) (The Blue Line).
For Buys: The price must be ABOVE the Blue 200 EMA. This ensures you are buying in a long-term uptrend where the 200 EMA acts as a floor/support.
For Sells: The price must be BELOW the Blue 200 EMA. This ensures you are selling in a downtrend where the 200 EMA acts as a ceiling/resistance.
ADX Filter:
It checks the ADX (Average Directional Index). If the ADX is below 20 (default), the market is considered "Choppy/Sideways," and the signal is ignored. This saves you from entering false breakouts.
2. Risk Management (Automated)
Once a trade is entered, the script automatically handles the risk math for you based on the ATR (Average True Range).
Stop Loss (SL):
Initial SL: Placed at 1.5x ATR away from the entry price.
Trailing SL: As the price moves in your favor, the Orange SL line automatically moves up (for buys) or down (for sells). It acts as a ratchet—it never moves backwards, locking in your profit.
Take Profits (TP):
TP1: 2.0x ATR (Conservative target).
TP2: 3.5x ATR (Standard swing target).
TP3: 5.0x ATR (Extended trend target).
3. Visuals & Layout
Modern Badges: Bright Green "BUY" and Red "SELL" buttons appear directly on the chart candles.
Dynamic Lines:
Orange Line: Your Trailing Stop Loss. It disappears when the trade is over.
Blue Dashed Lines: Your TP1, TP2, and TP3 targets.
EMA Colors:
Green Line: Fast EMA (20).
Orange Line: Medium EMA (50).
Thick Blue Line: Slow EMA (200 / Base Support).
Bar Coloring: The candles turn bright Green or Red during an active trade to help you instantly see the trend state.
4. How to Trade with It
The Buy Setup:
Wait for the price to be floating above the Thick Blue Line (200 EMA).
Wait for the Green Line (20) to cross up through the Orange Line (50).
A "BUY" badge appears.
Action: Enter the trade. Set your physical Stop Loss at the price shown by the Orange SL line.
The Sell Setup:
Wait for the price to be below the Thick Blue Line (200 EMA).
Wait for the Green Line (20) to cross down through the Orange Line (50).
A "SELL" badge appears.
Action: Enter Short. Follow the Orange SL line down as price drops.
5. Settings Menu
You can customize almost everything in the indicator settings:
Lengths: Change the EMA lengths (e.g., to 9/21/200 if you prefer faster scalping).
Risk: Change the ATR multipliers to make the Stop Loss tighter (e.g., 1.0) or wider (e.g., 2.0).
Visuals: Change the badge sizes (Small/Normal/Large) and colors to fit your dark/light theme.
eBacktesting - Learning: Equal Highs & LowseBacktesting - Learning: Equal Highs & Lows helps you spot Equal Highs (EQH) and Equal Lows (EQL) — price areas where the market has paused or reacted multiple times at nearly the same level.
These zones often act like “magnets” because many traders place stops and pending orders around them. When price returns, it can lead to a quick grab (a sweep) and reversal, or it can break through and continue. Learning to recognize EQH/EQL can improve your timing, help you anticipate where volatility may appear, and give you clearer areas for invalidation and targets.
These indicators are built to pair perfectly with the eBacktesting extension, where traders can practice these concepts step-by-step. Backtesting concepts visually like this is one of the fastest ways to learn, build confidence, and improve trading performance.
Educational use only. Not financial advice.
Liquidity Zones (Pivot-based) Buyside/SellsideDescription
This indicator highlights potential liquidity zones based on confirmed swing highs and swing lows (pivot-based logic).
Buyside liquidity zones are drawn above swing highs, where short stops and breakout liquidity are likely to rest.
Sellside liquidity zones are drawn below swing lows, where long stops are typically clustered.
Zones are sized dynamically using ATR-based thickness, extended forward in time, and automatically removed once price trades through them (wick-based or close-based, configurable).
The script is designed to help traders:
Visualize areas where liquidity is likely to be targeted
Anticipate stop hunts and liquidity grabs
Improve timing around reversals, continuations, and range extremes
This tool is not a liquidation heatmap and does not rely on exchange or order book data.
Instead, it provides a price-action–based proxy for liquidity, fully compatible with ICT / SMC-style market structure analysis.
Key features :
-Pivot-based buyside & sellside liquidity zones
-ATR-adjusted zone thickness
-Automatic extension and cleanup of zones
-Adjustable sensitivity and zone limits
-Works on any market and timeframe
Opening Range {basic}Introduction
Opening range {basic} is a clean and reliable indicator designed to help traders visualize the opening range of a trading session with minimal setup and visual clutter.
This version focuses on the core components of opening range analysis, making it ideal for traders who want a simple, effective framework for identifying early-session structure across futures, forex and crypto markets.
Description
The indicator automatically calculates the opening range high, low and midpoint over a user-defined opening window (5m, 15m, 30m or 60m) within a selected trading session (default: NY session).
During the opening range window, the indicator dynamically tracks price to form the range. Once the opening range is complete, the high, low and midpoint are extended forward for the remainder of the session, providing clear reference levels that can be used for bias, mean reversion or breakout-based decision making.
A shaded fill highlights the opening range area, with an optional size display showing the total range in price units. Styling and logic are intentionally simplified to keep the chart clean and easy to interpret.
Features
Configurable opening range length
Choose between 5m, 15m, 30m or 60m opening ranges.
Session-based calculation
Opening range is calculated only within the selected trading session.
Opening range levels
Opening range high, low and midpoint.
Range fill & size display
Shaded fill between the opening range high and low.
Text showing total opening range size.
Clean, minimal design
Fixed line styles and thickness for clarity.
Dark and light theme support.
Minimal settings for fast, intuitive use.
Optimized performance
Designed for intraday timeframes compatible with the selected opening range length.
Terms & Conditions
This indicator is provided for educational and informational purposes only and does not constitute financial advice.
Trading involves risk and past performance is not indicative of future results.
The user assumes full responsibility for any trading decisions made using this indicator.
UT Bot Alerts with R-Targets & Results< DONE BY RM ALOWAIS >
Indicator Overview
This indicator provides rule-based BUY and SELL signals with automatic risk management levels.
Each trade setup includes a predefined Stop Loss and up to three Take Profit targets (TP1, TP2, TP3), allowing traders to manage risk and scale exits systematically.
How It Works
BUY and SELL signals are generated based on internal market conditions.
Each signal plots:
Entry point
Stop Loss (SL)
Take Profit levels (TP1, TP2, TP3)
After price action completes, the indicator displays the actual result of the trade:
Result: TP1 / TP2 / TP3 / SL
Exit labels may appear when a trade is closed early due to invalidation or opposite conditions.
Key Features
Non-repainting signals
Built-in risk-to-reward structure
Visual trade tracking with clear outcomes
Suitable for intraday and swing trading
Works on multiple markets and timeframes
Usage Notes
This indicator is a decision-support tool, not financial advice.
Best results are achieved when used with proper risk management and higher-timeframe confirmation.
Performance may vary depending on market conditions (trend vs range).
Disclaimer
This script is provided for educational and informational purposes only.
The author is not responsible for any financial losses. Always test and validate before using in live trading.
Balubas Candlestick Pattern DetectorDetects candlestick patterns. Developed for Godzilla Trader's Substack. 12/01/2026.
ATH Dip Levels - Crypto Edition with Reactive TPHarika bir fikir! Bu indikatörü toplulukla paylaşırken (TradingView Public Library veya GitHub gibi), insanların stratejinin mantığını ve gücünü anlamaları için etkileyici bir İngilizce açıklama hazırladım.
İşte paylaşımın için kullanabileceğin başlık, özet ve özellikler listesi:
🚀 Indicator Title: ATH Dip Levels - Crypto Reactive Strategy
Overview
This indicator is a specialized "Buy the Dip" and "Reactive Take Profit" system designed specifically for the high volatility of the crypto market. Instead of following lagging indicators, it focuses on the most fundamental metric: Percentage drawdown from the rolling All-Time High (ATH).
It identifies historical discount zones and automatically calculates a "Reactive Take Profit" target for each entry, allowing you to scale out during market bounces.
Key Features
📉 1. Dynamic Buy Zones (DCA Levels)
The script tracks a rolling 220-day ATH and plots 7 distinct discount levels:
Minor Pullbacks: 10%, 20%
Major Corrections: 30%, 40%
Capitulation / Bear Market Bottoms: 55%, 70%, 85% (Highlighted in Neon for max opportunity).
💰 2. Reactive Take Profit (The "Half-Drop" Rule)
This is the core of the strategy. For every buy level triggered, the script automatically sets a "RE-SELL" target based on the severity of the drop:
Logic: The profit target is exactly half of the percentage drop.
Example: If you buy at a 30% dip, the target is a +15% recovery from that entry.
Example: If you buy at a 70% dip, the target is a +35% recovery from that entry. This captures the natural "Dead Cat Bounce" or "Mean Reversion" common in crypto.
🧠 3. Intelligent State Management
Single Trigger per Cycle: Each level triggers only once per ATH cycle to avoid "choppy" market noise.
Automatic Reset: All levels and status flags reset automatically when the price makes a New ATH, preparing you for the next market cycle.
📊 4. Live Status Dashboard
A clean, real-time table on the top-right shows you:
Current ATH price.
Which buy levels have been Hit (✅).
Which profit targets have been Sold (💰).
How to Use
Accumulate: When price hits a green "BUY" label, it's a historical discount zone.
Scale Out: When price hits the purple "RE-SELL" label, take profits on that specific position to reclaim liquidity.
HODL the Rest: Use this to lower your break-even price while keeping a "moon bag" for the next ATH.
Author's Note
Best used on 4H and 1D timeframes. This is a mathematical approach to volatility, removing emotions from your trading.
SSL MACD - nhuthang83supertrend method, supertrend method, supertrend method, supertrend method, supertrend method,
eBacktesting - Learning: Fibonacci RetracementeBacktesting - Learning: Fibonacci Retracement helps you practice one of the most common “pullback” tools in trading: Fibonacci retracements.
It automatically finds the most recent swing and draws your chosen Fibonacci levels (for example 0.382, 0.5, 0.618, 0.786) so you can clearly see where price is pulling back into “discount/premium” areas. When price taps a level (or the Golden Zone), the indicator marks it so you can review what happened next and build pattern recognition.
These indicators are built to pair perfectly with the eBacktesting extension, where traders can practice these concepts step-by-step. Backtesting concepts visually like this is one of the fastest ways to learn, build confidence, and improve trading performance.
Educational use only. Not financial advice.
MINI Lead Osc v2_ CCI_ Impulse_ REG🔹 MINI Lead Osc v2 — Momentum, Impulse & Early Reversal Tool
MINI Lead Osc v2 is a leading momentum oscillator designed to detect early shifts in market strength, impulse exhaustion, and potential reversals before they become obvious on price.
This indicator is part of the ICT Suite ecosystem and is engineered to work in confluence with:
Regression SuperTrend (WAIT)
Liquidity Oscillator (Structure & Bias)
Used together, they form a complete top-down trading framework.
⚙️ Core Logic
MINI Lead Osc v2 blends multiple engines into a single clean signal:
• CCI + RSI slope momentum
• ATR volatility shift
• Pivot-based divergence detection
• Adaptive Sensitivity+ engine
• Regression channel (linreg + RMSE bands)
The output is a normalized lead line that reacts before classic lagging indicators.
🚀 What This Indicator Is Best For
✔ Early trend continuation signals
✔ Detecting impulse starts, weakness, and distribution
✔ Filtering noise during ranges
✔ Momentum confirmation for pullback entries
✔ Spotting divergence without repainting
This is not a standalone “buy/sell spam” indicator — it is a decision-quality tool.
🔁 How to Use (Recommended Setup)
For best results, use MINI Lead Osc v2 together with:
1️⃣ Regression SuperTrend (WAIT)
→ Defines dominant trend & market regime
→ Filters counter-trend signals
2️⃣ Liquidity Oscillator (Structure)
→ Confirms break → pullback → continuation logic
→ Adds HTF bias & session context
3️⃣ MINI Lead Osc v2 (this script)
→ Times entries
→ Detects early momentum shifts
→ Confirms impulse quality
📌 Trade only when all three align.
🧠 Important Notes
• Signals are non-repainting (bar-close confirmed)
• Designed for discretionary trading, not automation
• Works best on 5m – 15m – 1h timeframes
• Crypto, Futures, and FX friendly
⚠️ Disclaimer
This indicator is for educational and analytical purposes only.
It does not constitute financial advice.
Always manage risk and confirm with price action.
XAUUSD lucky trendThis version introduces a strict midline filter to keep signals trend-aligned without revealing any specific settings. Long signals are permitted only when price is clearly established on the bullish side of the midline for the entire candle, so brief dips through the line are ignored. Short signals are permitted only when price is clearly established on the bearish side of the midline for the entire candle, so brief spikes through the line are ignored. This helps avoid whipsaws around the midline and reduces counter-trend entries, especially during choppy transitions. All other components of the indicator remain unchanged: the original signal logic, quality filters, and frequency controls still determine when a setup is valid. The result is fewer but cleaner prompts that better reflect sustained directional bias rather than temporary noise around the midline.
SVE Pivot Points v5//@version=6
indicator(title="SVE Pivot Points", overlay=true, max_lines_count=500)
// Input Parameters
agg_period = input.timeframe("D", title="Aggregation period")
show_labels = input.bool(true, title="Show Labels")
line_width = input.int(1, title="Line Width", minval=1, maxval=4)
// Detect new aggregation period
bool new_agg_bar = bool(ta.change(time(agg_period)))
// Calculate how many chart bars fit in one aggregation period
get_bars_in_period(string tf) =>
tf_secs = timeframe.in_seconds(tf)
chart_secs = timeframe.in_seconds(timeframe.period)
// If aggregation period is smaller than or equal to chart timeframe, use 1 bar
// Otherwise calculate how many chart bars fit
math.max(1, int(math.ceil(tf_secs / chart_secs)))
bars_in_period = get_bars_in_period(agg_period)
// Fetch previous period's high, low, close
ph = request.security(syminfo.tickerid, agg_period, high , barmerge.gaps_off, barmerge.lookahead_on)
pl = request.security(syminfo.tickerid, agg_period, low , barmerge.gaps_off, barmerge.lookahead_on)
pc = request.security(syminfo.tickerid, agg_period, close , barmerge.gaps_off, barmerge.lookahead_on)
// Calculate pivot points
pp = (ph + pl + pc) / 3
r1 = 2 * pp - pl
r2 = pp + (ph - pl)
r3 = 2 * pp + (ph - 2 * pl)
s1 = 2 * pp - ph
s2 = pp - (ph - pl)
s3 = 2 * pp - (2 * ph - pl)
// Calculate mean levels
r1m = (pp + r1) / 2
r2m = (r1 + r2) / 2
r3m = (r2 + r3) / 2
s1m = (pp + s1) / 2
s2m = (s1 + s2) / 2
s3m = (s2 + s3) / 2
// Previous high and low
hh = ph
ll = pl
// Colors
color_r = color.red
color_s = color.green
color_pp = color.blue
color_hl = color.gray
// Arrays to store historical lines (for showing past periods)
var line lines_r3 = array.new_line()
var line lines_r3m = array.new_line()
var line lines_r2 = array.new_line()
var line lines_r2m = array.new_line()
var line lines_r1 = array.new_line()
var line lines_r1m = array.new_line()
var line lines_hh = array.new_line()
var line lines_pp = array.new_line()
var line lines_ll = array.new_line()
var line lines_s1m = array.new_line()
var line lines_s1 = array.new_line()
var line lines_s2m = array.new_line()
var line lines_s2 = array.new_line()
var line lines_s3m = array.new_line()
var line lines_s3 = array.new_line()
// Current period labels (only show for current period)
var label lbl_r3 = na
var label lbl_r3m = na
var label lbl_r2 = na
var label lbl_r2m = na
var label lbl_r1 = na
var label lbl_r1m = na
var label lbl_hh = na
var label lbl_pp = na
var label lbl_ll = na
var label lbl_s1m = na
var label lbl_s1 = na
var label lbl_s2m = na
var label lbl_s2 = na
var label lbl_s3m = na
var label lbl_s3 = na
// Track current period start
var int current_period_start = 0
// On new aggregation period, create new lines
if new_agg_bar
current_period_start := bar_index
// Create lines for this period - they start here and will be extended
array.push(lines_r3, line.new(bar_index, r3, bar_index + bars_in_period, r3, color=color_r, width=line_width))
array.push(lines_r3m, line.new(bar_index, r3m, bar_index + bars_in_period, r3m, color=color_r, width=line_width))
array.push(lines_r2, line.new(bar_index, r2, bar_index + bars_in_period, r2, color=color_r, width=line_width))
array.push(lines_r2m, line.new(bar_index, r2m, bar_index + bars_in_period, r2m, color=color_r, width=line_width))
array.push(lines_r1, line.new(bar_index, r1, bar_index + bars_in_period, r1, color=color_r, width=line_width))
array.push(lines_r1m, line.new(bar_index, r1m, bar_index + bars_in_period, r1m, color=color_r, width=line_width))
array.push(lines_hh, line.new(bar_index, hh, bar_index + bars_in_period, hh, color=color_hl, width=line_width))
array.push(lines_pp, line.new(bar_index, pp, bar_index + bars_in_period, pp, color=color_pp, width=line_width))
array.push(lines_ll, line.new(bar_index, ll, bar_index + bars_in_period, ll, color=color_hl, width=line_width))
array.push(lines_s1m, line.new(bar_index, s1m, bar_index + bars_in_period, s1m, color=color_s, width=line_width))
array.push(lines_s1, line.new(bar_index, s1, bar_index + bars_in_period, s1, color=color_s, width=line_width))
array.push(lines_s2m, line.new(bar_index, s2m, bar_index + bars_in_period, s2m, color=color_s, width=line_width))
array.push(lines_s2, line.new(bar_index, s2, bar_index + bars_in_period, s2, color=color_s, width=line_width))
array.push(lines_s3m, line.new(bar_index, s3m, bar_index + bars_in_period, s3m, color=color_s, width=line_width))
array.push(lines_s3, line.new(bar_index, s3, bar_index + bars_in_period, s3, color=color_s, width=line_width))
// Delete old labels and create new ones
if show_labels
label.delete(lbl_r3)
label.delete(lbl_r3m)
label.delete(lbl_r2)
label.delete(lbl_r2m)
label.delete(lbl_r1)
label.delete(lbl_r1m)
label.delete(lbl_hh)
label.delete(lbl_pp)
label.delete(lbl_ll)
label.delete(lbl_s1m)
label.delete(lbl_s1)
label.delete(lbl_s2m)
label.delete(lbl_s2)
label.delete(lbl_s3m)
label.delete(lbl_s3)
lbl_r3 := label.new(bar_index + bars_in_period, r3, "R3", style=label.style_label_left, color=color.new(color_r, 100), textcolor=color_r, size=size.small)
lbl_r3m := label.new(bar_index + bars_in_period, r3m, "R3M", style=label.style_label_left, color=color.new(color_r, 100), textcolor=color_r, size=size.small)
lbl_r2 := label.new(bar_index + bars_in_period, r2, "R2", style=label.style_label_left, color=color.new(color_r, 100), textcolor=color_r, size=size.small)
lbl_r2m := label.new(bar_index + bars_in_period, r2m, "R2M", style=label.style_label_left, color=color.new(color_r, 100), textcolor=color_r, size=size.small)
lbl_r1 := label.new(bar_index + bars_in_period, r1, "R1", style=label.style_label_left, color=color.new(color_r, 100), textcolor=color_r, size=size.small)
lbl_r1m := label.new(bar_index + bars_in_period, r1m, "R1M", style=label.style_label_left, color=color.new(color_r, 100), textcolor=color_r, size=size.small)
lbl_hh := label.new(bar_index + bars_in_period, hh, "HH", style=label.style_label_left, color=color.new(color_hl, 100), textcolor=color_hl, size=size.small)
lbl_pp := label.new(bar_index + bars_in_period, pp, "PP", style=label.style_label_left, color=color.new(color_pp, 100), textcolor=color_pp, size=size.small)
lbl_ll := label.new(bar_index + bars_in_period, ll, "LL", style=label.style_label_left, color=color.new(color_hl, 100), textcolor=color_hl, size=size.small)
lbl_s1m := label.new(bar_index + bars_in_period, s1m, "S1M", style=label.style_label_left, color=color.new(color_s, 100), textcolor=color_s, size=size.small)
lbl_s1 := label.new(bar_index + bars_in_period, s1, "S1", style=label.style_label_left, color=color.new(color_s, 100), textcolor=color_s, size=size.small)
lbl_s2m := label.new(bar_index + bars_in_period, s2m, "S2M", style=label.style_label_left, color=color.new(color_s, 100), textcolor=color_s, size=size.small)
lbl_s2 := label.new(bar_index + bars_in_period, s2, "S2", style=label.style_label_left, color=color.new(color_s, 100), textcolor=color_s, size=size.small)
lbl_s3m := label.new(bar_index + bars_in_period, s3m, "S3M", style=label.style_label_left, color=color.new(color_s, 100), textcolor=color_s, size=size.small)
lbl_s3 := label.new(bar_index + bars_in_period, s3, "S3", style=label.style_label_left, color=color.new(color_s, 100), textcolor=color_s, size=size.small)
// On the last bar, update the current period's lines to extend properly into the future
if barstate.islast and array.size(lines_pp) > 0
// Get the most recent lines
line last_r3 = array.get(lines_r3, array.size(lines_r3) - 1)
line last_r3m = array.get(lines_r3m, array.size(lines_r3m) - 1)
line last_r2 = array.get(lines_r2, array.size(lines_r2) - 1)
line last_r2m = array.get(lines_r2m, array.size(lines_r2m) - 1)
line last_r1 = array.get(lines_r1, array.size(lines_r1) - 1)
line last_r1m = array.get(lines_r1m, array.size(lines_r1m) - 1)
line last_hh = array.get(lines_hh, array.size(lines_hh) - 1)
line last_pp = array.get(lines_pp, array.size(lines_pp) - 1)
line last_ll = array.get(lines_ll, array.size(lines_ll) - 1)
line last_s1m = array.get(lines_s1m, array.size(lines_s1m) - 1)
line last_s1 = array.get(lines_s1, array.size(lines_s1) - 1)
line last_s2m = array.get(lines_s2m, array.size(lines_s2m) - 1)
line last_s2 = array.get(lines_s2, array.size(lines_s2) - 1)
line last_s3m = array.get(lines_s3m, array.size(lines_s3m) - 1)
line last_s3 = array.get(lines_s3, array.size(lines_s3) - 1)
// Calculate end point: period start + bars in period
int end_bar = current_period_start + bars_in_period
// Update line endpoints
line.set_x2(last_r3, end_bar)
line.set_x2(last_r3m, end_bar)
line.set_x2(last_r2, end_bar)
line.set_x2(last_r2m, end_bar)
line.set_x2(last_r1, end_bar)
line.set_x2(last_r1m, end_bar)
line.set_x2(last_hh, end_bar)
line.set_x2(last_pp, end_bar)
line.set_x2(last_ll, end_bar)
line.set_x2(last_s1m, end_bar)
line.set_x2(last_s1, end_bar)
line.set_x2(last_s2m, end_bar)
line.set_x2(last_s2, end_bar)
line.set_x2(last_s3m, end_bar)
line.set_x2(last_s3, end_bar)
// Update label positions
if show_labels
label.set_x(lbl_r3, end_bar)
label.set_x(lbl_r3m, end_bar)
label.set_x(lbl_r2, end_bar)
label.set_x(lbl_r2m, end_bar)
label.set_x(lbl_r1, end_bar)
label.set_x(lbl_r1m, end_bar)
label.set_x(lbl_hh, end_bar)
label.set_x(lbl_pp, end_bar)
label.set_x(lbl_ll, end_bar)
label.set_x(lbl_s1m, end_bar)
label.set_x(lbl_s1, end_bar)
label.set_x(lbl_s2m, end_bar)
label.set_x(lbl_s2, end_bar)
label.set_x(lbl_s3m, end_bar)
label.set_x(lbl_s3, end_bar)
// Limit array sizes to prevent memory issues (keep last 100 periods)
max_lines = 100
if array.size(lines_pp) > max_lines
line.delete(array.shift(lines_r3))
line.delete(array.shift(lines_r3m))
line.delete(array.shift(lines_r2))
line.delete(array.shift(lines_r2m))
line.delete(array.shift(lines_r1))
line.delete(array.shift(lines_r1m))
line.delete(array.shift(lines_hh))
line.delete(array.shift(lines_pp))
line.delete(array.shift(lines_ll))
line.delete(array.shift(lines_s1m))
line.delete(array.shift(lines_s1))
line.delete(array.shift(lines_s2m))
line.delete(array.shift(lines_s2))
line.delete(array.shift(lines_s3m))
line.delete(array.shift(lines_s3))
ICT/SMC HUDOverview
This indicator is an ICT/SMC-inspired market structure tool that detects:
Swing Structure (pivot-based)
BOS (Break of Structure) and CHoCH (Change of Character)
Liquidity Sweeps (buy-side & sell-side)
Premium/Discount filter using a simple equilibrium (EQ) midpoint
A Hold Score (0–5) system calculated from a higher timeframe (HTF)
Optional TP/SL visualization box (with TP2 expansion when Hold Score is strong)
⚠️ This is an educational tool, not a guaranteed trading system.
Core Logic (Where signals come from)
This script builds a simplified ICT/SMC framework using 3 layers:
1) Market Structure via Swings (Pivot High/Low)
The script finds swing highs/lows using:
ta.pivothigh(high, swingLen, swingLen)
ta.pivotlow(low, swingLen, swingLen)
These swings become the reference points for structure breaks.
2) BOS / CHoCH Detection
BOS Up = price closes above the last swing high
BOS Down = price closes below the last swing low
trend updates to 1 (bullish) or -1 (bearish) based on BOS
CHoCH triggers when BOS occurs against the current trend
CHoCH Up = trend was bearish, then BOS Up happens
CHoCH Down = trend was bullish, then BOS Down happens
3) Liquidity Sweep + Premium/Discount Filter
Sell-side sweep: low breaks below last swing low, but closes back above it
Buy-side sweep: high breaks above last swing high, but closes back below it
Equilibrium (EQ) midpoint is:
(lastSwingHigh + lastSwingLow) / 2
Discount = price below EQ
Premium = price above EQ
Signal Rules (Buy / Sell)
Buy Signal
Sell-side sweep + (CHoCH Up or BOS Up)
OR
BOS Up while price is in Discount
Sell Signal
Buy-side sweep + (CHoCH Down or BOS Down)
OR
BOS Down while price is in Premium
Hold Score System (0–5) — HTF confirmation
The script calculates a Hold Score from HTF using 5 checks:
HTF EMA Bias
Bullish hold bias: EMA Fast > EMA Mid
Bearish hold bias: EMA Fast < EMA Mid
Volatility Expansion
Uses HTF Bollinger Band width; if width is increasing, expansion is “OK”
Mid Acceptance
HTF close relative to HTF BB basis (SMA)
Follow-through after Entry
Requires N consecutive bars closing in favor of the entry direction
No Opposite Break
Avoid holding if opposite BOS/CHoCH appears
Hold Score = sum of the 5 checks (0–5)
TP/SL Box (Optional)
When a new Buy/Sell signal occurs:
Entry is set at current close
SL uses:
Swing-based stop (lowest/ highest of last N bars)
optional ATR buffer
TP1 and TP2 are set using Risk:Reward ratios
TP2 Expansion (Optional)
If Hold Score ≥ threshold:
TP2 RR increases by extraRRonHold
Can be set to expand only (never shrink)
Auto-hide TP/SL Drawings (Optional)
If enabled, the TP/SL box/lines/labels will automatically disappear after N bars.
This is useful for clean charts while still keeping Hold Score logic running.
Best Use Cases
✅ Works best during liquidity sessions:
London Killzone
New York Killzone
✅ Recommended timeframes:
Structure: 15m / 1h
Entry refinement: 5m / 1m
Hold Score HTF: 1h or 4h
Inputs Guide (Quick)
Swing length (Structure): controls swing sensitivity (higher = fewer swings)
Hold Score HTF: HTF used for Hold Score confirmation
TP/SL Box: visualization tool, not order execution
Auto-hide: removes drawings after N bars for clean charts
TP2 Expand: increases TP2 target when Hold Score is strong
Disclaimer
This indicator does not place trades and does not guarantee profits. Always manage risk, backtest, and validate with your own strategy.
Inside/Outside Bars---
Inside/Outside Bars Detector
This indicator identifies and visualizes Inside Bars and Outside Bars (Engulfing Bars) on your chart, helping traders spot potential breakout and consolidation patterns.
What are Inside/Outside Bars?
• Outside Bars (Outer Bars): Candles that break BOTH the high AND low of the previous candle. These represent periods of increased volatility and potential trend continuation or reversal. Marked with red triangle arrows by default.
• Inside Bars (Inner Bars): Candles where NEITHER the high NOR low breaks the previous candle's range. These represent consolidation and often precede significant price moves. Marked with orange triangle arrows by default.
Features:
✓ Visual arrows above bars for easy identification
✓ Fixed pixel-size arrows that remain visible at any chart zoom level
✓ Statistics table showing counts of outer bars, inner bars, and total bars analyzed
✓ Fully customizable with multiple settings
Customization Options:
• Toggle outer bars and inner bars independently
• Customize arrow colors for each pattern
• Show/hide the statistics table
• Adjust calculation bars (1000 default, max 5000)
• Set to 0 to analyze all available bars up to 5000
How to Use:
Inside bars often indicate consolidation before a breakout, while outside bars suggest increased volatility and potential momentum shifts. Use these patterns in conjunction with your trading strategy to
identify entry/exit points or to confirm trend direction.
---
Sheldon HTF CandlesSee higher-timeframe candles directly on your current chart without changing timeframes. This indicator shows the open, high, low, and close of a higher timeframe while you trade on a lower timeframe.
Session Dominance Profile [Pointalgo]Session Dominance Profile is a visual volume-distribution tool that shows which global trading session (Asia, London, or New York) dominates price activity across different price levels within a defined historical range.
The indicator builds a horizontal volume profile using candle close prices and volume, then classifies each price level by the session that contributed the highest volume.
How It Works :
The script analyzes a configurable lookback period
Price range is divided into multiple horizontal bins
Volume is accumulated per price level
Each bin is split into three session buckets:
Asia Session (Yellow)
London Session (Blue)
New York Session (Red)
The session with the highest volume at that price level determines the color
This results in a Session-based Dominance Profile, helping traders visually identify:
Where major sessions were most active
Session-specific acceptance or rejection zones
Potential intraday and swing reaction areas
Practical Use Cases :
Identify price levels dominated by a specific session
Understand session rotation and participation
Combine with:
Market structure
Support & resistance
VWAP or moving averages
Useful for intraday, scalping, and swing trading
Inputs Explained:
Lookback – Number of historical bars used to build the profile
Resolution – Number of price bins (higher = more detail)
Fixed Width (Bars) – Maximum horizontal width of the profile
Offset (Bars) – Distance of the profile from the current bar
Profile Direction – Left-to-Right or Right-to-Left rendering
Session Time Reference:
All sessions are calculated using UTC time.
Important Notes:
This indicator is visual and analytical only
It does not generate buy or sell signals
No repainting: the profile is calculated on the last bar only
Designed for educational and research purposes
Disclaimer:
This script does not provide financial advice.
Trading involves risk, and past volume behavior does not guarantee future results.
Always confirm signals using additional analysis and proper risk management.






















