分形
Smart Trader, Episode 03, by Ata Sabanci, Candles and TradelinesA volume-based multi-block analysis system designed for educational purposes. This indicator helps traders understand their current market situation through aggregated block analysis, volumetric calculations, trend detection, and an AI-style narrative engine.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DESIGN PHILOSOPHY: CLEAN CHART, RICH DASHBOARD
Traditional indicators often clutter charts with dozens of support/resistance lines, making it difficult to see price action clearly. This indicator takes a different approach:
The Chart:
Displays only the most meaningful, nearest levels (1 up, 1 down) that have not been consumed by price. This keeps your chart clean and focused on what matters right now.
The Dashboard:
Contains all detailed metrics, calculations, and analysis. Instead of drawing 20 lines on your chart, you get comprehensive data in an organized table format.
Why this approach?
• A clean chart allows you to see price action without visual noise
• Fewer but more meaningful levels help focus attention on immediate reference points
• The dashboard provides depth without sacrificing chart clarity
• Beginners can learn chart reading with an uncluttered view while accessing detailed analysis when needed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. BLOCK SEGMENTATION
What it does:
Divides the analysis window into fixed-size blocks. Each block contains multiple bars that are analyzed as a single unit.
Why:
Individual bars contain noise. A single red candle in an uptrend might cause unnecessary concern, but when you view 5-10 bars as one block, the overall direction becomes clear. Block segmentation filters out bar-to-bar noise and reveals the underlying structure.
Benefit:
• Clearer view of market structure at a higher aggregation level
• Enables comparison between time periods (Block 1 vs Block 2 vs Block 3)
• Creates the foundation for composite candles and trend detection
• Reduces emotional reaction to single-bar movements
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2. COMPOSITE CANDLES (FRACTAL CONCEPT)
What it does:
Each block generates a "ghost candle" representing aggregated OHLC:
• Open: First bar's open in the block
• High: Highest high across all bars in the block
• Low: Lowest low across all bars in the block
• Close: Last bar's close in the block
Why:
This is essentially a FRACTAL view of the market. The same candlestick patterns that appear on a daily chart also appear on hourly charts, and on 5-minute charts. By aggregating bars into composite candles, you create a synthetic higher timeframe view without changing your actual timeframe.
Benefit:
• See higher timeframe patterns while staying on your preferred timeframe
• Identify block-level candlestick patterns (Doji, Hammer, Marubozu, Engulfing, etc.)
• Compare composite candle relationships: Does Block 1 engulf Block 2? Is Block 1 an inside bar relative to Block 2?
• Recognize patterns that individual bars obscure due to noise
Fractal Nature:
A hammer pattern means the same thing whether it appears on a 1-minute chart or a weekly chart: price tested lower levels and was rejected. Composite candles let you see these patterns at your chosen aggregation level, providing a multi-scale view of market behavior.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3. VOLUME ENGINE
What it does:
This indicator is 100% VOLUME-BASED. It separates total volume into buying volume and selling volume using two methods:
Method 1 - Geometric (Approximation):
• Buy Volume = Total Volume × ((Close - Low) / Range)
• Sell Volume = Total Volume × ((High - Close) / Range)
Method 2 - Intrabar LTF (Precise):
Uses actual tick-level or lower timeframe data to determine real buy/sell distribution.
Why:
Raw volume tells you HOW MUCH was traded, but not WHO was aggressive. A large volume bar could mean heavy buying, heavy selling, or both. By separating buy and sell volume, you can identify which side is driving the market.
Benefit:
• Identify whether buyers or sellers are more aggressive
• Detect when volume contradicts price direction (divergence)
• Measure accumulation (buying into weakness) vs distribution (selling into strength)
• Quantify the delta (buy minus sell) to see net pressure
Why Delta Matters:
If price is rising but delta is negative, sellers are actually more aggressive despite the price increase. This divergence often precedes reversals because the price movement lacks volume confirmation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4. PIN ANALYSIS (WICK MEASUREMENT)
What it does:
Calculates average upper pin (wick) and lower pin sizes for each block, then tracks how these change across consecutive blocks.
Why:
Upper pins represent price levels that were tested but rejected by sellers. Lower pins represent price levels that were tested but rejected by buyers. The size and direction of pins reveal rejection strength at specific price zones.
Benefit:
• Large upper pins = strong selling pressure at higher levels
• Large lower pins = strong buying support at lower levels
• Increasing upper pins across blocks = intensifying selling pressure
• Decreasing lower pins across blocks = weakening buying support
Why Track Pin Changes:
Pin behavior often changes before price direction changes. If lower pins are shrinking while price is still rising, the buying support that was defending dips is weakening. This is observable data, not prediction.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5. TREND CHANNEL DETECTION
What it does:
Identifies trend direction using block-level price structure:
• UPTREND: Block highs are higher than previous block highs, AND block lows are higher than previous block lows (HH/HL pattern)
• DOWNTREND: Block highs are lower than previous block highs, AND block lows are lower than previous block lows (LH/LL pattern)
• RANGE: No consistent directional pattern
Once detected, the system draws upper and lower channel boundaries by connecting extreme points within each trend segment.
Why:
HH/HL and LH/LL are the classical definitions of trend. By applying this logic to composite candles (blocks) rather than individual bars, the trend detection becomes more stable and less prone to whipsaws from single-bar noise.
Benefit:
• Clear visual boundaries showing the current trend channel
• Upper channel line = dynamic resistance based on actual price structure
• Lower channel line = dynamic support based on actual price structure
• Channel angle indicates trend strength (steeper = stronger)
• Channel width indicates volatility
Why Lock Trend States:
Once a block's trend classification is determined, it locks and does not change on subsequent recalculations. Without locking, the same block could flip between UP and DOWN repeatedly, creating inconsistent analysis. Locking ensures stability.
Why Project Lines Forward:
Channel lines can be projected into the future to show where support/resistance would be if the current trend continues at the same angle. This is not a prediction; it is a visual reference showing the trend's trajectory.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6. CORE LEVELS: POC, MAX BUY, MAX SELL
What it does:
Identifies key price levels within each block based on volume data:
POC (Point of Control):
The price level where the highest total volume occurred within the block.
MAX BUY Level:
The bar with the highest buying volume. The HIGH of this bar marks the level.
MAX SELL Level:
The bar with the highest selling volume. The LOW of this bar marks the level.
MIN BUY/SELL Levels:
Optional levels showing where minimum buy/sell volume occurred.
Why:
High volume at a specific price means many participants entered positions there. These participants have a vested interest in that price level. If price returns to that area, those same participants may act to defend their positions.
Benefit:
• POC acts as a volume-based magnet; price tends to revisit high-volume areas
• MAX BUY level shows where buyers committed most aggressively
• MAX SELL level shows where sellers committed most aggressively
• These levels are based on actual transaction data, not arbitrary calculations
Why Consumed Levels Disappear:
When price crosses through a level, that level has been "tested." Keeping consumed levels on the chart creates visual clutter and suggests they are still relevant when they may no longer be. Removing them keeps focus on levels that have not yet been tested.
Why Show Only Nearest Levels:
If you have 20 blocks, you could have 60+ potential levels (POC, MAX BUY, MAX SELL for each). Displaying all of them makes the chart unreadable. Showing only the nearest untested level above and below current price keeps the chart clean while providing immediate reference points.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7. QUALITY SCORE AND TREND INTELLIGENCE
What it does:
Calculates a quality score (0-100) for the current trend based on multiple factors:
• Angle steepness (stronger trends have steeper angles)
• Delta consistency (does volume support the trend direction?)
• Volume momentum (is participation increasing or decreasing?)
• Body expansion (are candle bodies growing or shrinking?)
• Pin alignment (do pins support the trend direction?)
• Contradiction count (how many factors disagree?)
Why:
Not all trends are equal. A trend with consistent volume support, expanding bodies, and aligned pins is healthier than a trend with contradicting signals. The quality score quantifies this.
Benefit:
• HIGH quality (80+): Multiple factors confirm the trend
• MEDIUM quality (60-79): Some factors confirm, some neutral
• LOW quality (below 60): Multiple contradictions exist
• Strength rating based on channel angle: VERY STRONG, STRONG, MODERATE, WEAK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8. NARRATIVE ENGINE
What it does:
Generates a text-based market analysis by synthesizing all calculated data into readable sentences.
How it works:
1. Analyzes current candle: pattern type (Doji, Hammer, Marubozu, etc.), body/wick ratios, range vs ATR
2. Analyzes composite candle: Block 1 pattern and relationship to Block 2 (Engulfing, Inside, Outside)
3. Evaluates trend context: direction, duration, quality, transitions
4. Examines volume data: delta, dominance, momentum direction
5. Checks proximity to key levels: channel boundaries, POC, core levels
6. Identifies divergences: when price and volume directions contradict
7. Produces a coherent narrative describing the current situation
Why:
Numbers and charts require interpretation. The narrative engine translates calculated data into plain language, helping traders understand what the data means in context. This is especially valuable for beginners learning to read charts.
Benefit:
• Synthesizes multiple data points into a coherent story
• Explicitly flags divergences and contradictions
• Describes the current situation without making predictions
• Educational: shows how different factors relate to each other
What the Narrative Does NOT Do:
The narrative describes what IS, not what WILL BE. It does not predict future price movement. It reports the current candle pattern, the current trend state, the current volume situation, and the current proximity to levels.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9. SMART DASHBOARD
What it does:
Displays all metrics in an organized table with multiple sections.
Sections:
• Volume Engine: Calculation method, data availability, current candle buy/sell/delta
• Trend Volumetrics: Aggregated buy/sell/delta across the current trend, trend type
• Pressure and Momentum: Average pins, pin change percentages, body expansion status
• Trend Channel Boundaries: Upper/lower levels with exact prices, distances, percentages
• Trend Intelligence: Quality score, confidence level, strength rating, volume momentum
Why:
All the detailed calculations need to live somewhere without cluttering the chart. The dashboard provides comprehensive data in a structured format.
Benefit:
• All metrics in one place
• Organized by category for easy reference
• Hover over any label to see a tooltip explaining that metric
• No need to draw dozens of lines on the chart
TIP: Hover over dashboard headers and labels to see tooltips explaining each metric.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
10. LANGUAGE SUPPORT
The indicator supports three languages:
• English
• Türkçe (Turkish)
• हिन्दी (Hindi)
Why only three languages?
Each additional language requires duplicate strings throughout the code, increasing memory usage and compilation time. To keep the script optimized and responsive, language options are limited to these three.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11. DATA ACCURACY AND LIMITATIONS
This indicator is 100% VOLUME-BASED and requires Lower Timeframe (LTF) intrabar data for accurate calculations.
DATA ACCURACY LEVELS:
• 1T (Tick): Most accurate, real volume distribution per tick
• 1S (1 Second): Reasonably accurate approximation
• 15S (15 Seconds): Good approximation, longer historical data available
• 1M (1 Minute): Rough approximation, maximum historical data range
BACKTEST AND REPLAY LIMITATIONS:
• Replay mode results may differ from live trading due to data availability
• For longer backtest periods, use higher LTF settings (15S or 1M)
• Not all symbols/exchanges support tick-level data
• Crypto and Forex typically have better LTF data availability than stocks
A NOTE ON DATA ACCESS:
Higher TradingView plans provide access to more historical intrabar data, which directly impacts the accuracy of volume-based calculations. More precise volume data leads to more reliable calculations.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12. SETTINGS OVERVIEW
Main Settings:
• Window Bars: Total bars to analyze
• Group Count: Number of blocks to create
• Calculation Basis: Current bar (live updates) or Closed bar (stable, no repaint)
Block Analytics:
• Show Composite Candle: Toggle ghost candles on/off
• Composite Candle Transparency: Adjust visibility
• Dim Original Candles: Fade original candles when composites are shown
Volume Engine:
• Calculation Method: Geometric (approx) or Intrabar (precise)
• Lower Timeframe: Select LTF for intrabar calculations
Multi-Segment Trend:
• Enable Trend Detection: Toggle trend channels on/off
• Range Angle Threshold: Angle below which trend is classified as RANGE
• Line colors, width, and style
• Project to Future: Extend trend lines forward
Core Calculation:
• Enable Core Calculation: Toggle POC and core levels
• Show POC Nearest Up/Down: Display nearest untested POC levels
• Include MAX/MIN Buy/Sell Levels: Toggle extremes display
• Nearest Only: Show only the closest level above and below price
Market Narrative:
• Enable Market Narrative: Toggle narrative text
• Language selection
• Show Educational Disclaimer: Toggle disclaimer in dashboard
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EDUCATIONAL PURPOSE
This indicator is designed to help traders:
1. Understand their current market situation at a glance
2. Learn chart reading through block analysis and composite candles
3. See how volume relates to price movement
4. Recognize when technical factors align or contradict
5. Focus on meaningful levels without chart clutter
Whether you are a beginner learning to read charts or an experienced trader seeking a cleaner analytical view, this tool provides structured data to support your analysis.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
IMPORTANT DISCLAIMER
This indicator is for EDUCATIONAL PURPOSES ONLY and does not constitute investment advice. Always conduct your own research and consult with a qualified financial advisor before making investment decisions.
This disclaimer is also displayed within the indicator itself. If you prefer a cleaner chart, you can disable it in Settings under Market Narrative by unchecking Show Educational Disclaimer.
RSI SCALPER with Dynamic ATR LinesThis is a versatile scalping indicator that combines RSI-based signals, dynamic ATR channels, and Stochastic-based divergence detection to identify potential entry and exit points in the market .
Key Features
Dynamic ATR Channel – Calculates support and resistance based on ATR (Average True Range) with configurable length and multiplier for both support and resistance lines, plus a midline
Multi-timeframe RSI – Two separate RSI calculations with independent timeframe settings: one for "KUN RSI" signals and one for "GET READY" alerts
Divergence Detection – Identifies regular and hidden bullish/bearish divergences using Stochastic D and fractals
25 MA Types – Comprehensive library of smoothing functions including WMA, HMA, EMA, TEMA, DEMA, ZLEMA, and several advanced variants
Signal Types
Signal Description
Get Ready (Long) Price crosses above dynamic support while RSI is oversold
Get Ready (Short) Price crosses below dynamic resistance while RSI is overbought
EXIT (Buy Break) Price closes above resistance (previously below) without simultaneous short signal
EXIT (Sell Break) Price closes below support (previously above) without simultaneous long signal
R-BULL / R-BEAR Regular divergence – signals potential trend reversal
H-BULL / H-BEAR Hidden divergence – signals trend continuation
Settings
RSI Parameters:
Separate timeframe selection for both RSI calculations
Configurable length and overbought/oversold levels (default 70/30)
ATR Channel:
Independent timeframe for channel calculation
Individual ATR lengths and multipliers for support (8/1.44) and resistance (14/1.44)
Divergence:
Dedicated timeframe setting
Stochastic parameters (length, smooth K, smooth D)
MA type selection for smoothing
Alerts
The indicator includes four predefined alerts for divergence signals that trigger only on confirmed bars:
Regular Bullish/Bearish Divergence
Hidden Bullish/Bearish Divergence
Use Cases
Suitable for active scalping and swing trading on crypto, forex, and stocks. Combine signals with price structure and volume for optimal use. The ATR channel adapts automatically to volatility, while divergence signals provide early warning of potential trend shifts .
4MAs+5VWAPs+FVG+ Fractals4MAs + 5VWAPs + FVG + Fractals
All-in-one market structure indicator combining 4 moving averages, 5 VWAP timeframes, fair value gaps, fractals, and order blocks.
🔧 Features:
· 4 MAs - SMA/EMA, customizable lengths & colors
· 5 VWAPs - Daily, Weekly, Monthly, RTH, Custom sessions
· Fractals - Market structure with breakout lines & custom colors
· FVG/Imbalances - Bullish/bearish gap detection with alerts
· Order Blocks - Dynamic institutional levels
· Smart Labels - VWAP labels with color matching
⚙️ Quick Setup:
1. Toggle groups in Master Control Panel
2. Customize colors for each component
3. Set sessions for RTH/Custom VWAP
4. Adjust fractal periods (default: 2)
📈 Trading Use:
· Identify market structure with fractals
· Find confluence at VWAP + MA levels
· Trade FVG fills and order block reactions
· Multiple timeframe analysis with 5 VWAPs
Customizable • Color-Coordinated • Performance Optimized
Quant Labs Edge Filter (Community Edition)A market-structure filter designed to identify when no real edge exists.
Edge Filter evaluates price location relative to structure to define market posture — long bias, short bias, or stand aside. It does not generate trade signals and is intentionally designed to reduce overtrading.
Clear Posture States
Near Highs — Short Bias
Near Lows — Long Bias
No Edge — Stand Aside
When edge is absent, patience is the strategy.
Why It Stands Out
Most indicators encourage action.
Edge Filter encourages restraint.
Its purpose is to protect capital, attention, and decision quality by filtering out low-quality environments.
Community Edition
This version publishes the core logic openly for transparency and education.
Private access versions may exist for traders seeking continuity and stewardship.
Bottom Line
Trade less.
Trade better.
Wait for edge.
— QuantLabs
Filtered Fractals (2-Stage + Alerts)Filtered Fractals
Overview
This indicator is an advanced evolution of the classic Fractal logic (like the WICK.ED or Bill Williams models). Standard fractals are often "noisy," marking every minor local peak or trough, which can lead to false signals in volatile markets.
This script solves the "noise" problem by introducing a Dual-Stage Filtering Process. Instead of displaying every fractal, it treats them as "candidates" and only confirms those that represent a dominant extremum relative to their neighboring fractals.
How It Works
The script operates in two distinct stages to ensure only the most significant structural pivot points are plotted:
Stage 1: Detection
The script identifies "Raw Fractals" based on your preferred sensitivity (Left/Right bars). By default, it uses a 5-bar lookback/lookforward, but these remain hidden from the chart initially.
Stage 2: Sliding Window Competition
The script monitors a rolling sequence of the last three identified fractals. It compares their prices to find the "True Extremum":
For Highs , it compares the 3 most recent fractal peaks.
For Lows , it compares the 3 most recent fractal troughs.
The Point System: Every time a fractal is the "winner" (the highest high or lowest low) within its 3-fractal window, it receives a confirmation point.
The Priority Rule: In cases where two fractals have the exact same price, the script gives priority to the earlier one (the "left" peak), reducing late entries.
Visual Confirmation
A fractal is only plotted on your chart once it achieves two confirmations . This means it has proven to be a significant price extreme compared to both its predecessor and its successor.
Key Features
Noise Reduction: Eliminates "crowded" fractals, leaving only the structural backbone of the trend.
Non-Repainting Logic: The script only processes confirmed closed bars. The current developing candle will never trigger a false fractal or a premature alert.
Smart Alerts: Built-in alert() functionality. You can set a single alert to notify you the exact moment a Bullish or Bearish fractal is confirmed.
Customizable Sensitivity: Adjust the Left/Right Bars in the settings to fit your specific timeframe (e.g., higher values for macro trends, lower for scalping).
How to use
Support/Resistance: Use these filtered fractals to draw more reliable S/R zones.
Stop Loss Placement: Ideal for trailing stops behind truly significant swing points.
Trend Confirmation: A series of higher-high filtered fractals provides a much cleaner view of an uptrend than standard indicators.
Macro FVG with Quarter Theory & CE AlertsStarting with Python, target, starting with script now, but I made this FvVG identifier. It will. Create the favorite group as it. Occurs. Just moving up it would be green, if it's moving down it would be red and if it's mitigated but turn dark black.
INDICADOR PRO🧪 How to Use It Effectively (Forex & Crypto)
✔️ Ideal for:
EURUSD, GBPUSD, USDJPY
BTC, ETH (best during London + New York sessions)
✔️ Recommended:
Disable the Asia session for crypto if the market is noisy
Backtest for at least 3–6 months
Use PDH/PDL as a strong filter
Session Liquidity SignalsThis indicator is called SLF VT and it analyzes market liquidity across major sessions
It defines three specific time windows which are Asia London and New York
During these times it draws colored boxes to mark the session High and Low
When a session ends the indicator extends dashed lines from the High and Low prices
These lines represent liquidity vectors where stop losses might be located
The core logic is designed to detect a Trap pattern
A Bullish Trap happens when price sweeps below a previous session Low but closes back above it
A Bearish Trap happens when price sweeps above a previous session High but closes back below it
The code calculates the Wick Ratio to ensure the reversal is sharp and valid
If a trap is confirmed the indicator plots a text label on the chart and can trigger an alert
LANZ Origins🔷 LANZ Origins – Multi-Framework Liquidity, Structure & Risk Management Overlay
LANZ Origins is a multi-tool TradingView indicator designed to provide session context, liquidity mapping, imbalance visualization, higher-timeframe candle projection, and a fixed-SL lot size calculator.
It includes:
Risk & Lot Size Panel (up to 5 accounts):
Calculates lot size using a fixed Stop Loss in pips and a standard pip value assumption ($10 per pip per 1.0 lot). For each enabled account, it displays the estimated lots and dollar risk based on account capital and risk %. The panel is fully customizable (colors, text size, visibility).
Session Backgrounds (New York time):
Colors the chart by time blocks: Day Division, No Action Zone, Killzone, and Hold Session, helping traders visually segment the trading day.
Asian Range Liquidity Box (19:00–02:00 NY):
Draws a dynamic box tracking the session high/low, plus an optional midline (50%) with optional label. The script correctly handles sessions that cross midnight.
Imbalance Detector:
Detects and draws Fair Value Gaps (FVG), Opening Gaps (OG), and Volume Imbalances (VI) with adjustable filters (min width by points/%/ATR and extension). Optionally shows a dashboard summarizing frequency and fill rate.
ICT HTF Candles Overlay:
Projects selected higher-timeframe candles to the right of price (e.g., 30m enabled by default), with optional labels, remaining time, trace lines (O/C/H/L) and internal imbalance highlights for those HTF candle sets.
30m ZigZag projected to all timeframes:
Computes ZigZag pivots from the 30-minute timeframe and draws them on any chart timeframe, including an optional live extending leg.
LANZ Origins does not execute trades and does not generate buy/sell entries. It is a visual framework for analysis, context, and risk planning.
SAMIR-Pattern Detector: (Debug Mode)fractal pattern to descover movment action then apply fibo on the pattern
TWR of Bill WilliamsThis indicator was taken from the book “Trading Chaos Pt 1” by Bill Williams.
TWR contains 3 Moving Averages
Ripple - MA with 5 bars length
Wave - MA with 13 bars length
Tide - MA with 34 bars length
According to Bill Williams, you should take only a long position if the Ripple(5 bars length) is higher than Wave(13) and Tide(34).
Also, you should take only a short position, if the Ripple (the fastest MA) is lower than Wave MA and Tide MA(slowest MA).
This indicator is also used if you want to fill in the Profitunity Trading Partner table.
Elliott Wave Pattern AnalyzerElliott Wave Pattern Analyzer
Overview
This indicator automatically detects Elliott Wave impulse patterns and diagonal formations on your chart. It analyzes price structure based on classic Elliott Wave rules and displays wave counts with confidence scores, Fibonacci projections, and invalidation levels.
Why I Built This
After reading Glenn Neely's book on Elliott Wave theory, I wanted to put my learning into practice by building something tangible. There's no better way to understand a concept than trying to code it!
I'll be honest – corrective wave patterns (zigzags, flats, triangles, combinations) were simply too complex for me to implement reliably. So instead, I focused on what I could manage: impulse waves and diagonal patterns. Maybe someday I'll tackle the corrections, but for now, this is my humble contribution.
The retracement visualization style was inspired by LuxAlgo's elegant approach – credit where credit is due!
How It Works
1. Wave Detection
The indicator uses pivot points to identify potential 5-wave structures:
WaveRuleWave 2Cannot retrace more than 100% of Wave 1Wave 3Cannot be the shortest among Waves 1, 3, 5Wave 4Should not overlap Wave 1 territory (impulse)Wave 5Completes the motive structure
2. Pattern Types
Impulse Waves
Classic 5-wave motive structure
Wave 3 typically extends (≥1.618 of Wave 1)
Strict mode enforces all Elliott rules
Diagonal Patterns
Ending diagonal (wedge-shaped)
Waves progressively contract
Lines 1-3 and 2-4 converge to an apex
Often signals trend exhaustion
3. Confidence Scoring
Each pattern receives a confidence score (0-100%) based on:
Fibonacci ratio adherence
Wave proportion relationships
Rule compliance
Structural clarity
Only patterns exceeding your threshold (default: 60%) are displayed.
4. Fibonacci Projections
After Wave 5 completion, the indicator projects potential retracement levels:
0.382, 0.500, 0.618, 0.786 of the entire impulse
5. Extension Channel
Connects Wave 0 origin to the retracement low, projecting:
0.618, 1.000, 1.272, 1.618 extensions
Optional extended levels: 2.000, 2.618, 4.236
6. Invalidation Levels
Shows the price level where the wave count becomes invalid – helping you know when your analysis is wrong.
Settings Explained
Impulse Wave Settings
Pivot Length: Sensitivity of wave detection (recommended: 5, 7, 14)
Strict Mode: Enforce all classic Elliott rules
Min Wave 3 Extension: Minimum ratio for Wave 3 (default: 1.618)
Diagonal Wave Settings
Allow Wave 4-1 Overlap: Required for valid diagonals
Extend Trendline: Project diagonal boundaries forward
Projection Settings
Fibonacci Levels: Customize retracement targets
Extension Bars: How far projections extend on chart
Pattern Management
Max Patterns: Limit displayed patterns to reduce clutter
Pattern Lifetime: Auto-remove old patterns after X bars
Use Cases
Trend Trading: Enter on Wave 3 or Wave 5 breakouts
Reversal Spotting: Diagonal completion often signals reversals
Target Setting: Use Fibonacci extensions for take-profit levels
Risk Management: Invalidation levels provide clear stop-loss references
Notes
This indicator uses pivot detection and may repaint – signals are confirmed after the specified pivot length
Designed for educational and analytical purposes, not as a signal generator
Elliott Wave analysis is subjective – this is my algorithmic interpretation
Works best on liquid markets with clear trend structure
Not financial advice – always do your own research
Re-publishing Notice
This indicator was previously blocked due to some house rule violations on my part. I've recently had time to review and fix those issues, and I'm now re-publishing a compliant version. Thanks for your patience!
Feedback Welcome
I'm still learning Elliott Wave theory myself, so if you spot any issues or have suggestions for improvement, please leave a comment. Let's learn together!
Happy trading! 📈
Cody Order Block Finder with RegressionThe Cody Order Block Finder with Regression Channel is a comprehensive trading tool that combines order block identification with linear regression analysis. This dual-approach indicator is designed to help traders identify potential institutional order flow zones within the context of established market trends, providing a structured methodology for trade entry and exit decisions.
Free Telegram Trading Community t.me
Order Block Detection System
Identifies potential institutional buying and selling zones based on specific candle patterns
Configurable detection parameters including required subsequent candles and minimum percentage moves
Three visual color schemes (Dark, Bright, Neon) for different chart backgrounds
Options to display order blocks using wick ranges or body ranges
Advanced filtering capabilities including size-based and ATR-based filters
Historical display controls with options to show all order blocks or only the most recent instances
Linear Regression Channel
Customizable regression length from 1 to 5000 periods
Upper and lower deviation channels with adjustable multipliers
Pearson's R correlation coefficient display for trend strength assessment
Flexible extension options for channel lines (left, right, both, or none)
Visual channel fills between regression lines for clear trend identification
Technical Specifications
Detection Logic
Bullish order blocks: Identified by a bearish candle followed by a specified number of consecutive bullish candles with minimum percentage movement
Bearish order blocks: Identified by a bullish candle followed by a specified number of consecutive bearish candles with minimum percentage movement
Size validation through configurable percentage thresholds
Optional ATR filtering for volatility-adjusted order block identification
Visual Elements
Triangle markers indicating order block locations above or below relevant candles
Extended lines marking order block boundaries with configurable right-side extension
Informative labels displaying order block size percentages
Dynamic trend labels based on regression slope analysis
Adjustable transparency and coloring for all visual elements
Alert System
Context-aware alerts that only trigger in confirmed trends
Buy alerts: Bullish order blocks detected during uptrends (positive regression slope)
Sell alerts: Bearish order blocks detected during downtrends (negative regression slope)
Customizable alert messages with trend context information
Performance Optimization
Maximum 500 lines and 500 labels for system resource management
Efficient array-based line management for historical display controls
Conditional calculations to reduce processing overhead
Application for Traders
This indicator serves multiple trading methodologies:
Trend-following traders can use regression channels for trend identification
Institutional flow traders can identify potential order block zones
Swing traders can locate high-probability reversal areas
Risk management through size and volatility filtering
The combination of order block detection with regression trend analysis provides traders with a comprehensive tool for identifying potential trade setups that align with both institutional activity and broader market trends. The extensive customization options allow adaptation to various trading styles and market conditions.
Fractal Market Geometry [JOAT]
Fractal Market Geometry
Overview
Fractal Market Geometry is an open-source overlay indicator that combines fractal analysis with harmonic pattern detection, Fibonacci retracements and extensions, Elliott Wave concepts, and Wyckoff phase identification. It provides traders with a geometric framework for understanding market structure and identifying potential reversal patterns with multi-factor signal confirmation.
What This Indicator Does
The indicator calculates and displays:
Fractal Detection - Identifies fractal highs and lows using Williams-style pivot analysis with configurable period
Fractal Dimension - Calculates market complexity using range-based dimension estimation
Harmonic Patterns - Detects Gartley, Butterfly, Bat, Crab, Shark, Cypher, and ABCD patterns using Fibonacci ratios
Fibonacci Retracements - Key levels at 38.2%, 50%, and 61.8%
Fibonacci Extensions - Projection level at 161.8%
Elliott Wave Count - Simplified wave counting based on pivot detection (1-5)
Wyckoff Phase - Volume-based phase identification (Accumulation, Markup, Distribution, Neutral)
Golden Spiral Levels - ATR-based support and resistance levels using phi (1.618) ratio
Trend Detection - EMA crossover trend identification (20/50 EMA)
How It Works
Fractal detection uses a configurable period to identify swing points:
detectFractalHigh(simple int period) =>
bool result = true
float centerVal = high
for i = 0 to period - 1
if high >= centerVal or high >= centerVal
result := false
break
Harmonic pattern detection uses Fibonacci ratio analysis between swing points. Each pattern has specific ratio requirements:
Gartley: AB 0.382-0.618, BC 0.382-0.886, CD 1.27-1.618
Butterfly: AB 0.382-0.5, BC 0.382-0.886, CD 1.618-2.24
Bat: AB 0.5-0.618, BC 1.13-1.618, CD 1.618-2.24
Crab: AB 0.382-0.618, BC 0.382-0.886, CD 2.24-3.618
Shark: AB 0.382-0.618, BC 1.13-1.618, CD 1.618-2.24
Cypher: AB 0.382-0.618, BC 1.13-1.414, CD 0.786-0.886
Wyckoff phase detection analyzes volume relative to price movement:
wyckoffPhase(simple int period) =>
float avgVol = ta.sma(volume, period)
float priceChg = ta.change(close, period)
string phase = "NEUTRAL"
if volume > avgVol * 1.5 and math.abs(priceChg) < close * 0.02
phase := "ACCUMULATION"
else if volume > avgVol * 1.5 and math.abs(priceChg) > close * 0.05
phase := "MARKUP"
else if volume < avgVol * 0.7
phase := "DISTRIBUTION"
phase
Signal Generation
Signals use multi-factor confirmation for accuracy:
BUY Signal: Fractal low + Uptrend (EMA20 > EMA50) + RSI 30-55 + Bullish candle + Volume confirmation
SELL Signal: Fractal high + Downtrend (EMA20 < EMA50) + RSI 45-70 + Bearish candle + Volume confirmation
Pattern Detection: Label appears when harmonic pattern completes at current bar
Dashboard Panel (Top-Right)
Dimension - Fractal dimension value (market complexity measure)
Last High - Most recent fractal high price
Last Low - Most recent fractal low price
Pattern - Current harmonic pattern name or NONE
Elliott Wave - Current wave count (Wave 1-5) or OFF
Wyckoff - Current market phase or OFF
Trend - BULLISH, BEARISH, or NEUTRAL based on EMA crossover
Signal - BUY, SELL, or WAIT status
Visual Elements
Fractal Markers - Small triangles at fractal highs (down arrow) and lows (up arrow)
Geometry Lines - Dashed lines connecting the most recent fractal high and low
Fibonacci Levels - Clean horizontal lines at 38.2%, 50%, and 61.8% retracement levels
Fibonacci Extension - Horizontal line at 161.8% extension level
Golden Spiral Levels - Support and resistance lines based on ATR x 1.618
3D Fractal Field - Optional depth layers around swing levels (OFF by default)
Harmonic Pattern Markers - Small diamond shapes when Crab, Shark, or Cypher patterns detected
Pattern Labels - Text label showing pattern name when detected
Signal Labels - BUY/SELL labels on confirmed multi-factor signals
Input Parameters
Fractal Period (default: 5) - Bars on each side for fractal detection
Geometry Depth (default: 3) - Complexity of geometric calculations
Pattern Sensitivity (default: 0.8) - Tolerance for pattern ratio matching
Show Fibonacci Levels (default: true) - Display retracement levels
Show Fibonacci Extensions (default: true) - Display extension level
Elliott Wave Detection (default: true) - Enable wave counting
Wyckoff Analysis (default: true) - Enable phase detection
Golden Spiral Levels (default: true) - Display spiral support/resistance
Show Fractal Points (default: true) - Display fractal markers
Show Geometry Lines (default: true) - Display connecting lines
Show Pattern Labels (default: true) - Display pattern name labels
Show 3D Fractal Field (default: false) - Display depth layers
Show Harmonic Patterns (default: true) - Display pattern markers
Show Buy/Sell Signals (default: true) - Display signal labels
Suggested Use Cases
Identify potential reversal zones using harmonic pattern completion
Use Fibonacci levels for entry, stop-loss, and target planning
Monitor Wyckoff phases for accumulation/distribution awareness
Track Elliott Wave counts for trend structure analysis
Use fractal dimension to gauge market complexity
Wait for multi-factor signal confirmation before entering trades
Timeframe Recommendations
Best on 1H to Daily charts. Lower timeframes produce more fractals but with less significance. Higher timeframes provide stronger levels and more reliable signals.
Limitations
Harmonic pattern detection uses simplified ratio ranges and may not match all textbook definitions
Elliott Wave counting is basic and does not include all wave rules
Wyckoff phase detection is volume-based approximation
Fractal dimension calculation is simplified
Signals require fractal confirmation which has inherent lag equal to the fractal period
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades
Auto Price-to-Bar ScaleIt adjusts the chart’s scaling according to Mitotic scaling rules, as defined in the book Geometrical Analysis by Anand Kene (available on Amazon). This method of scaling allows the application of various angles and Gann boxes, resulting in more precise target levels.






















