NoProcess Prior Month/Week/Day High/Low/EQ Prior Period Levels
Plots key support/resistance levels from previous timeframes: Day, Week, and Month.
Levels Displayed:
PDH/PDL/PDE — Prior Day High, Low, and Equilibrium (midpoint)
PWH/PWL/PWE — Prior Week High, Low, and Equilibrium
PMH/PML/PME — Prior Month High, Low, and Equilibrium
Features:
Toggle each timeframe independently
Single color control for clean chart aesthetics
Configurable right extension (1-50 bars)
Dotted line style with labels positioned at line endpoints
Use Case:
Reference levels for institutional order flow concepts. Prior period highs/lows act as liquidity pools; equilibriums mark fair value zones where price often rebalances. Works on any instrument and timeframe.
Grafik Desenleri
ICT Order Block Identifier [Eˣ]📦 Order Block Identifier
Overview
The Order Block Identifier automatically detects and displays institutional order blocks on your charts - zones where banks, hedge funds, and market makers place their orders. This indicator helps identify where institutions are likely to defend their positions and where price often finds support or resistance, based on ICT (Inner Circle Trader) concepts.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 What This Indicator Does
Detects Order Blocks:
• 🟢 Bullish Order Blocks (OB+) - Last bearish candle before strong bullish move
• 🔴 Bearish Order Blocks (OB-) - Last bullish candle before strong bearish move
• Automatically identifies institutional buying/selling zones
• Tracks up to 30 order blocks simultaneously
• Works on all timeframes and instruments
Smart Features:
• Auto-Timeframe Adjustment - Optimizes detection for 1min to Weekly charts
• Active Block Highlighting - Shows which OB price is approaching
• Touch Tracking - Knows when blocks are tested
• ATR-Based Detection - Adapts to each instrument's volatility
• Strength Filtering - Choose Low/Medium/High to control sensitivity
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 Understanding Order Blocks
What Are Order Blocks?
Order blocks are the "footprints" left behind by institutional traders (banks, hedge funds, market makers) when they enter large positions. Because institutions can't fill massive orders at once without moving the market, they:
1. Place orders gradually over time
2. Leave zones where their buy/sell orders are concentrated
3. Defend these zones when price returns
4. Create reliable support and resistance levels
The ICT Concept:
Developed by Michael Huddleston (Inner Circle Trader), order block theory states that:
• The last opposite-colored candle before a strong move contains institutional orders
• Price often returns to test these zones before continuing
• These zones act as strong support (bullish OB) or resistance (bearish OB)
• Smart money defends their positions at these levels
Why Order Blocks Work:
• Unfilled Orders: Institutions may still have pending orders in the block
• Position Defense: They protect their entries by adding to positions
• Stop Placement: Retail stops cluster near these zones (liquidity for institutions)
• Market Structure: Price respects these levels due to order flow dynamics
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🟢 Bullish Order Blocks Explained
How They Form:
1. Price is consolidating or declining
2. Institutions begin accumulating (buying)
3. A strong bullish move erupts
4. The last bearish candle before this move = Bullish Order Block
5. This candle represents where institutions were buying aggressively
Why The Last Bearish Candle?
• Institutions absorbed all selling pressure at this level
• Their buy orders filled as price was declining
• When price returns, they defend this zone with more buying
• It becomes a demand zone / support level
Trading Bullish Order Blocks:
Setup:
• Wait for price to retrace back to bullish OB (green box)
• Look for rejection/reversal pattern (pin bar, engulfing, etc.)
• Enter long when price bounces from the OB zone
• Stop loss: Below the order block
• Target: Recent high or opposite order block
Best Scenarios:
• OB aligns with other support (trendline, fibonacci, round number)
• First touch of OB (unmitigated) has highest probability
• Occurs during high-volume sessions (London/NY)
• Trend is bullish on higher timeframe
Example Trade:
• Bullish OB forms at $50,000 (last red candle before rally)
• Price rallies to $52,000 then retraces
• Price drops back to $50,100 (touching OB)
• Bullish pin bar forms on the OB
• Enter long at $50,200, stop at $49,800
• Target: $52,000+ (previous high)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔴 Bearish Order Blocks Explained
How They Form:
1. Price is consolidating or rising
2. Institutions begin distributing (selling)
3. A strong bearish move erupts
4. The last bullish candle before this move = Bearish Order Block
5. This candle represents where institutions were selling aggressively
Why The Last Bullish Candle?
• Institutions absorbed all buying pressure at this level
• Their sell orders filled as price was rising
• When price returns, they defend this zone with more selling
• It becomes a supply zone / resistance level
Trading Bearish Order Blocks:
Setup:
• Wait for price to retrace back to bearish OB (red box)
• Look for rejection/reversal pattern (shooting star, bearish engulfing)
• Enter short when price rejects from the OB zone
• Stop loss: Above the order block
• Target: Recent low or opposite order block
Best Scenarios:
• OB aligns with other resistance (trendline, fibonacci, round number)
• First touch of OB (unmitigated) has highest probability
• Occurs during high-volume sessions (London/NY)
• Trend is bearish on higher timeframe
Example Trade:
• Bearish OB forms at $48,000 (last green candle before drop)
• Price drops to $46,000 then retraces
• Price rallies back to $47,900 (touching OB)
• Bearish engulfing forms at the OB
• Enter short at $47,800, stop at $48,200
• Target: $46,000- (previous low)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 How To Use This Indicator
Strategy 1: Order Block Retest (Classic)
Best For: Swing trading, capturing reversals
Timeframes: 15min, 1H, 4H, Daily
Win Rate: 60-70% (first touch)
Entry Rules:
1. Identify unmitigated order block (bright color, not gray)
2. Wait for price to return to the OB zone
3. Look for price action confirmation:
• Bullish OB: Pin bar, bullish engulfing, hammer
• Bearish OB: Shooting star, bearish engulfing, doji
4. Enter in the direction of the OB
5. Stop loss: Beyond the opposite side of OB (20-30 pips)
6. Target: 2-3R or opposite OB
Example:
• Bullish OB at $100-$102
• Price drops to $101.50 (enters OB)
• Bullish pin bar forms with low at $100.80
• Enter long at $102 (OB high), stop at $99.50
• Risk: $2.50, Target: $107.50 (3R)
Strategy 2: Break & Retest
Best For: Trend trading, breakout confirmation
Timeframes: 5min, 15min, 1H
Win Rate: 65-75%
Entry Rules:
1. Price breaks through an order block
2. Wait for pullback to the broken OB
3. The OB now acts as support (if broken up) or resistance (if broken down)
4. Enter when price respects the flipped OB
5. Stop: Inside the OB zone
6. Target: Next OB or structure level
Why It Works: Broken OBs flip polarity - support becomes resistance and vice versa
Strategy 3: Multi-Timeframe Confirmation
Best For: High-probability setups
Timeframes: Combine 1H + 4H or 15min + 1H
Win Rate: 70-80%
Entry Rules:
1. Identify order block on higher timeframe (4H or Daily)
2. Switch to lower timeframe (1H or 15min)
3. Wait for lower TF order block to form within higher TF OB
4. Trade the lower TF OB in direction of higher TF OB
5. Stop: Below lower TF OB
6. Target: Edge of higher TF OB or beyond
Why It Works: Alignment across timeframes = institutional consensus
Strategy 4: Order Block to Order Block
Best For: Range trading, swing entries
Timeframes: 1H, 4H
Win Rate: 55-65%
Entry Rules:
1. Identify both bullish OB below and bearish OB above
2. Price is ranging between these OBs
3. Enter long at bullish OB, target bearish OB
4. Enter short at bearish OB, target bullish OB
5. Stop: Beyond the trading OB
6. Exit at opposite OB
Why It Works: Price moves from one institutional zone to another
Strategy 5: Mitigation Fade
Best For: Aggressive scalping
Timeframes: 5min, 15min
Win Rate: 50-60% (higher risk)
Entry Rules:
1. Price approaches an order block
2. Instead of bouncing, price breaks through (mitigates it)
3. Enter immediately in direction of breakout
4. Stop: Back inside the mitigated OB
5. Quick target: 1-1.5R
Why It Works: When OB fails, it often leads to strong continuation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ Settings Explained
Core Settings
Auto-Adjust for Timeframe (Default: ON)
• Automatically optimizes detection for current chart timeframe
• 1min: 3 bars lookback
• 5min: 4 bars lookback
• 15min: 5 bars lookback
• 1H: 6 bars lookback
• 4H: 8 bars lookback
• Daily+: 10-12 bars lookback
• Recommended: Keep ON for best results
Manual Detection Length (Default: 5)
• Only used when Auto-Adjust is OFF
• Number of bars to look back for the "last opposite candle"
• Lower (2-4): More sensitive, more blocks, more noise
• Higher (6-10): Less sensitive, fewer blocks, higher quality
• Recommended: Use Auto-Adjust instead
Display Settings
Show Bullish/Bearish Order Blocks
• Toggle each type on/off independently
• Customize colors for each OB type
• Tip: Match colors to your chart theme
Max Order Blocks to Display (Default: 10)
• Limits how many OBs are shown at once
• Lower (5-8): Cleaner chart, only recent blocks
• Higher (15-30): More historical context
• Recommended: 8-12 for most trading
Show Order Block Labels (Default: ON)
• Displays "OB+" and "OB-" text on blocks
• Shows 🎯 on active (nearest) block
• Turn OFF for minimal chart appearance
• Recommended: Keep ON for clarity
Extend Blocks (bars) (Default: 50)
• How far to extend OB boxes to the right
• Lower (20-30): Shorter boxes, less clutter
• Higher (100+): Longer boxes, easier to see
• Blocks auto-extend until mitigated or limit reached
• Recommended: 40-60 bars
Filters
Block Strength Filter (Default: Medium)
• Controls how strong a move must be to create an OB
• Low: 0.5x ATR move required - Many blocks, more noise
• Medium: 1x ATR move required - Balanced quality/quantity
• High: 1.5x ATR move required - Only strongest institutional moves
• Recommended for beginners: High
• Recommended for experienced: Medium
• Recommended for scalpers: Low
Min Block Size % (Default: 0.1)
• Minimum size of OB as percentage of price
• Filters out tiny, insignificant blocks
• Crypto: 0.1-0.3%
• Forex: 0.05-0.15%
• Stocks: 0.1-0.5%
• Adjust based on instrument volatility
Advanced Settings
Show Mitigated Blocks (Default: OFF)
• When ON: Shows gray boxes for "used" order blocks
• When OFF: Blocks disappear after mitigation
• Use ON: For learning and analysis
• Use OFF: For clean, active trading
Highlight Active Block (Default: ON)
• Highlights the nearest order block to current price
• Active block shown with 🎯 emoji and brighter color
• Helps focus on most relevant trading opportunity
• Recommended: Keep ON
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📱 Info Panel Guide
Bullish OB Count
• Number of active (unmitigated) bullish order blocks
• Higher number = More support zones below price
• Multiple bullish OBs = Strong demand structure
Bearish OB Count
• Number of active (unmitigated) bearish order blocks
• Higher number = More resistance zones above price
• Multiple bearish OBs = Strong supply structure
Bias Indicator
• ⬆ Bullish: More bullish OBs than bearish (demand > supply)
• ⬇ Bearish: More bearish OBs than bullish (supply > demand)
• ↔ Neutral: Equal OBs on both sides
• Trade in direction of bias for higher probability
Near Indicator
• Shows which OB price is closest to
• Displays distance as percentage
• Example: "Bull OB 0.85%" = Bullish OB is 0.85% below current price
• Watch for "Near" alerts to time entries
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📱 Alert Setup
This indicator includes 4 alert types:
1. Price Entering Bullish OB
• Fires when price touches a bullish order block
• Action: Watch for bounce/reversal pattern
• High-probability long setup developing
2. Price Entering Bearish OB
• Fires when price touches a bearish order block
• Action: Watch for rejection/reversal pattern
• High-probability short setup developing
3. New Bullish OB Detected
• Fires when a new bullish order block forms
• Action: Mark the zone for future retest
• New demand zone identified
4. New Bearish OB Detected
• Fires when a new bearish order block forms
• Action: Mark the zone for future retest
• New supply zone identified
To Set Up Alerts:
1. Click "Alert" button (clock icon)
2. Select "Order Block Identifier"
3. Choose your alert condition
4. Configure notification method
5. Click "Create"
Pro Tip: Set "Price Entering" alerts to catch trading opportunities in real-time
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 Pro Tips & Best Practices
✅ DO:
• First touch is best - Unmitigated OBs have highest win rate (60-70%)
• Wait for confirmation - Don't buy/sell just because price touched OB
• Use multiple timeframes - Higher TF OBs are stronger than lower TF
• Combine with structure - OB + trendline/support = high probability
• Trade with the bias - More bullish OBs = favor longs
• Respect mitigation - Once OB is mitigated, it's less reliable
• Use proper stop loss - Always place stops beyond the OB zone
• Consider session timing - OBs work best during London/NY sessions
⚠️ DON'T:
• Don't blindly buy/sell at OBs - Wait for confirmation
• Don't ignore mitigation - Gray blocks are much weaker
• Don't trade every OB - Quality over quantity
• Don't fight strong trends - OBs can be run through in strong momentum
• Don't use alone - Combine with price action, support/resistance
• Don't expect 100% win rate - Even best OBs fail sometimes (30-40% of time)
• Don't overtrade - Wait for A+ setups with confluence
🎯 Best Timeframes By Trading Style:
• Scalpers: 1min, 5min (quick OB touches)
• Day Traders: 5min, 15min, 1H (balanced view)
• Swing Traders: 1H, 4H, Daily (major institutional zones)
• Position Traders: 4H, Daily, Weekly (strongest OBs)
🔥 Best Instruments:
• Excellent: Forex major pairs (EUR/USD, GBP/USD), BTC, ETH, ES, NQ
• Good: Gold, Oil, Major indices, Large-cap stocks
• Moderate: Altcoins, small-cap stocks (more noise)
• Avoid: Very low liquidity instruments (OBs less reliable)
⏰ Best Times To Trade OBs:
• London Session (03:00-12:00 EST): Highest OB respect rate
• NY Session (08:00-17:00 EST): Strong OB reactions
• London-NY Overlap (08:00-12:00 EST): Best probability
• Asian Session: Lower probability, wait for London
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎓 Advanced Order Block Concepts
Order Block Flips (Polarity Change)
When price breaks through an OB and closes beyond it:
• Bullish OB that's broken becomes bearish (support becomes resistance)
• Bearish OB that's broken becomes bullish (resistance becomes support)
• Trading: Watch for retest of broken OB from opposite side
Order Block Refinement
When multiple OBs form at similar level:
• Later OB "refines" or "replaces" the earlier one
• Use the most recent OB as the active zone
• Older OBs become less relevant
Order Block Clusters
Multiple OBs stacked close together:
• Creates a "super zone" of institutional interest
• Higher probability of reversal
• Wider zone for entries (more room for confirmation)
Fair Value Gaps + Order Blocks
When OB aligns with Fair Value Gap:
• Extremely high probability setup
• Price is drawn to fill the gap AND test the OB
• Double confluence = institutional magnet
Order Block Mitigation Types
• Full Mitigation: Price fully enters and closes inside OB
• Partial Mitigation: Price wicks into OB but closes outside
• False Mitigation: Quick touch then immediate rejection
• Partial/false mitigation = OB still somewhat valid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Common Order Block Patterns
Pattern 1: The Perfect Retest
• OB forms during strong move
• Price continues 100-200+ pips
• Price retraces back to OB
• Clean bounce with confirmation candle
• Highest probability pattern
Pattern 2: The Double Tap
• Price tests OB, bounces weakly
• Price tests same OB again
• Second test produces stronger reaction
• Second touch often better entry
Pattern 3: The Fake-Out
• Price breaks through OB
• Immediately reverses back
• "Stop hunt" or liquidity grab
• Enter after price reclaims OB
Pattern 4: The Ladder
• Multiple OBs stacked like stairs
• Price steps from one OB to next
• Each OB provides support/resistance
• Trade OB-to-OB movements
Pattern 5: The Failed OB
• Price crashes through OB without pause
• OB completely invalidated
• Often signals strong momentum
• Don't fight it, trade the breakout
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 What Makes This Different?
Unlike basic support/resistance indicators, Order Block Identifier:
• ICT Methodology - Based on proven institutional concepts
• Auto-Timeframe Optimization - Works perfectly on all timeframes
• ATR-Based Detection - Adapts to each instrument's volatility
• Mitigation Tracking - Knows when blocks are no longer valid
• Active Block Highlighting - Shows most relevant opportunity
• Smart Filtering - Only shows high-quality institutional zones
• Visual Clarity - Clean, professional appearance
• Real-Time Updates - Blocks update as price action develops
Based On Professional Concepts:
• ICT Smart Money Concepts (SMC)
• Institutional order flow analysis
• Market maker behavior patterns
• Supply and demand zone theory
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🙏 If You Find This Helpful
• ⭐ Leave your feedback
• 💬 Share your experience in the comments
• 🔔 Follow for updates and new tools
Questions about Order Blocks? Feel free to ask in the comments.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Version History
• v1.0 - Initial release with auto-timeframe detection and ATR-based strength filtering
Cold Brew Ranges🧭 Core Logic and Calculation
The fundamental logic for each range (OR and CR) is identical:
Time Definition: Each range is defined by a specific Start Time and a fixed 30-second duration. The timestamp function, using the "America/New_York" time zone, is used to calculate the exact start time in Unix milliseconds for the current day.
Example: t0200 = timestamp(TZ, yC, mC, dC, 2, 0, 0) sets the start time for the 02:00 OR to 2:00:00 AM NY time.
Range Data Collection: The indicator uses the request.security_lower_tf() function to collect the High (hArr) and Low (lArr) prices of all bars that fall within the defined 30-second window, using a user-specified, sub-chart-timeframe (openrangetime, defaulted to "1" second, "30S", or "5" minutes). This ensures high precision in capturing the exact high and low during the 30-second window.
High/Low Determination: It iteratively finds the absolute highest price (OR_high) and the absolute lowest price (OR_low) recorded by the bars during that 30-second window.
Range Locking: Once the current chart bar's time (lastTs) passes the 30-second End Time (tEnd), the High and Low are locked (OR_locked = true), meaning the range calculation is complete for the day.
Drawing: Upon locking, the range is drawn on the chart using line.new for the High, Low, and Equilibrium, and box.new for the shaded fill. The lines are extended to a subsequent time anchor point (e.g., the 02:00 OR is extended to 08:20, the 09:30 OR is extended to 16:00).
Equilibrium (EQ): This is calculated as the simple average (midpoint) of the High and Low of the range.
EQ=
2
OR_High+OR_Low
⏰ Defined Trading Ranges
The indicator defines and tracks the following specific 30-second ranges:
Range Name Type Start Time (NY) Line Extension End Time (NY) Common Market Context
02:00 OR Opening 02:00:00 08:20:00 Asian/European Market Overlap
08:20 OR Opening 08:20:00 16:00:00 Pre-New York Open
09:30 OR Opening 09:30:00 16:00:00 New York Stock Exchange Open (Most significant OR)
18:00 OR Opening 18:00:00 20:00:00 Futures Market Open (Sunday/Monday)
20:00 OR Opening 20:00:00 Next Day's session start Asian Session Start
15:50 CR Closing 15:50:00 20:00:00 New York Close Range
⚙️ Key User Inputs and Customization
The script offers extensive control over which ranges are displayed and how they are visualized:
Range Time & History
openrangetime: Sets the sub-timeframe (e.g., "1" for 1 second) used to calculate the precise High/Low of the 30-second range. Crucial for accuracy.
showHistory: A toggle to show the ranges from previous days (up to a histCap of 50 days).
Range Toggles and Styling
On/Off Toggles: Independent input.bool (e.g., OR_0200_on) to enable or disable the display of each individual range.
Colors & Width: Separate color and width inputs for the High/Low lines (hlC), the Equilibrium line (eqC), and the background fill (fillC) for each range.
Line Styles: Global inputs for the line styles of High/Low (lineStyleInput) and Equilibrium (eqLineStyleInput) lines (Solid, Dotted, or Dashed).
showFill: Global toggle to enable the shaded background box that highlights the area between the High and Low.
Extensions
The script calculates and plots extensions (multiples of the initial range) above the High and below the Low.
showExt: Toggles the visibility of the extension lines.
useRangeMultiples: If true, the step size for each extension level is equal to the initial range size:
Step=Range=OR_High−OR_Low
If false, the step size is a fixed value defined by stepPts (e.g., 60.0 points, which is a common value for NQ futures).
stepCnt: Determines how many extension levels (multiples) are drawn above and below the range (default is 10).
📈 Trading Strategy Implications
The Cold Brew Ranges indicator is a tool for session-based support and resistance and range breakout/reversal strategies.
Key Support/Resistance: The High and Low of these defined opening ranges often act as strong, predefined price levels. Traders look for price rejection off these boundaries or a breakout with conviction.
Equilibrium (Midpoint): The EQ often represents a fair value for that specific session's opening. Movements away from it are seen as opportunities, and a return to it is common.
Extensions: The range extensions serve as potential profit targets or stronger, layered support/resistance levels if the market trends aggressively after the opening range is set.
The core idea is that the activity in the first 30 seconds of a significant trading session (like the NYSE or a market session open) sets a bias and initial boundary for the trading period that follows.
SMC N-Gram Probability Matrix [PhenLabs]📊 SMC N-Gram Probability Matrix
Version: PineScript™ v6
📌 Description
The SMC N-Gram Probability Matrix applies computational linguistics methodology to Smart Money Concepts trading. By treating SMC patterns as a discrete “alphabet” and analyzing their sequential relationships through N-gram modeling, this indicator calculates the statistical probability of which pattern will appear next based on historical transitions.
Traditional SMC analysis is reactive—traders identify patterns after they form and then anticipate the next move. This indicator inverts that approach by building a transition probability matrix from up to 5,000 bars of pattern history, enabling traders to see which SMC formations most frequently follow their current market sequence.
The indicator detects and classifies 11 distinct SMC patterns including Fair Value Gaps, Order Blocks, Liquidity Sweeps, Break of Structure, and Change of Character in both bullish and bearish variants, then tracks how these patterns transition from one to another over time.
🚀 Points of Innovation
First indicator to apply N-gram sequence modeling from computational linguistics to SMC pattern analysis
Dynamic transition matrix rebuilds every 50 bars for adaptive probability calculations
Supports bigram (2), trigram (3), and quadgram (4) sequence lengths for varying analysis depth
Priority-based pattern classification ensures higher-significance patterns (CHoCH, BOS) take precedence
Configurable minimum occurrence threshold filters out statistically insignificant predictions
Real-time probability visualization with graphical confidence bars
🔧 Core Components
Pattern Alphabet System: 11 discrete SMC patterns encoded as integers for efficient matrix indexing and transition tracking
Swing Point Detection: Uses ta.pivothigh/pivotlow with configurable sensitivity for non-repainting structure identification
Transition Count Matrix: Flattened array storing occurrence counts for all possible pattern sequence transitions
Context Encoder: Converts N-gram pattern sequences into unique integer IDs for matrix lookup
Probability Calculator: Transforms raw transition counts into percentage probabilities for each possible next pattern
🔥 Key Features
Multi-Pattern SMC Detection: Simultaneously identifies FVGs, Order Blocks, Liquidity Sweeps, BOS, and CHoCH formations
Adjustable N-Gram Length: Choose between 2-4 pattern sequences to balance specificity against sample size
Flexible Lookback Range: Analyze anywhere from 100 to 5,000 historical bars for matrix construction
Pattern Toggle Controls: Enable or disable individual SMC pattern types to customize analysis focus
Probability Threshold Filtering: Set minimum occurrence requirements to ensure prediction reliability
Alert Integration: Built-in alert conditions trigger when high-probability predictions emerge
🎨 Visualization
Probability Table: Displays current pattern, recent sequence, sample count, and top N predicted patterns with percentage probabilities
Graphical Probability Bars: Visual bar representation (█░) showing relative probability strength at a glance
Chart Pattern Markers: Color-coded labels placed directly on price bars identifying detected SMC formations
Pattern Short Codes: Compact notation (F+, F-, O+, O-, L↑, L↓, B+, B-, C+, C-) for quick pattern identification
Customizable Table Position: Place probability display in any corner of your chart
📖 Usage Guidelines
N-Gram Configuration
N-Gram Length: Default 2, Range 2-4. Lower values provide more samples but less specificity. Higher values capture complex sequences but require more historical data.
Matrix Lookback Bars: Default 500, Range 100-5000. More bars increase statistical significance but may include outdated market behavior.
Min Occurrences for Prediction: Default 2, Range 1-10. Higher values filter noise but may reduce prediction availability.
SMC Detection Settings
Swing Detection Length: Default 5, Range 2-20. Controls pivot sensitivity for structure analysis.
FVG Minimum Size: Default 0.1%, Range 0.01-2.0%. Filters insignificant gaps.
Order Block Lookback: Default 10, Range 3-30. Bars to search for OB formations.
Liquidity Sweep Threshold: Default 0.3%, Range 0.05-1.0%. Minimum wick extension beyond swing points.
Display Settings
Show Probability Table: Toggle the probability matrix display on/off.
Show Top N Probabilities: Default 5, Range 3-10. Number of predicted patterns to display.
Show SMC Markers: Toggle on-chart pattern labels.
✅ Best Use Cases
Anticipating continuation or reversal patterns after liquidity sweeps
Identifying high-probability BOS/CHoCH sequences for trend trading
Filtering FVG and Order Block signals based on historical follow-through rates
Building confluence by comparing predicted patterns with other technical analysis
Studying how SMC patterns typically sequence on specific instruments or timeframes
⚠️ Limitations
Predictions are based solely on historical pattern frequency and do not account for fundamental factors
Low sample counts produce unreliable probabilities—always check the Samples display
Market regime changes can invalidate historical transition patterns
The indicator requires sufficient historical data to build meaningful probability matrices
Pattern detection uses standardized parameters that may not capture all institutional activity
💡 What Makes This Unique
Linguistic Modeling Applied to Markets: Treats SMC patterns like words in a language, analyzing how they “flow” together
Quantified Pattern Relationships: Transforms subjective SMC analysis into objective probability percentages
Adaptive Learning: Matrix rebuilds periodically to incorporate recent pattern behavior
Comprehensive SMC Coverage: Tracks all major Smart Money Concepts in a unified probability framework
🔬 How It Works
1. Pattern Detection Phase
Each bar is analyzed for SMC formations using configurable detection parameters
A priority hierarchy assigns the most significant pattern when multiple detections occur
2. Sequence Encoding Phase
Detected patterns are stored in a rolling history buffer of recent classifications
The current N-gram context is encoded into a unique integer identifier
3. Matrix Construction Phase
Historical pattern sequences are iterated to count transition occurrences
Each context-to-next-pattern transition increments the appropriate matrix cell
4. Probability Calculation Phase
Current context ID retrieves corresponding transition counts from the matrix
Raw counts are converted to percentages based on total context occurrences
5. Visualization Phase
Probabilities are sorted and the top N predictions are displayed in the table
Chart markers identify the current detected pattern for visual reference
💡 Note:
This indicator performs best when used as a confluence tool alongside traditional SMC analysis. The probability predictions highlight statistically common pattern sequences but should not be used as standalone trading signals. Always verify predictions against price action context, higher timeframe structure, and your overall trading plan. Monitor the sample count to ensure predictions are based on adequate historical data.
VWAP + EMA9 With SignalsThis script is for scalping on the 5 minute timeframe. It contains signals that indicate intersection of VWAP by the EMA9. It contains Buy signals when a candle closes above both lines indicating a quick continuation of a long position (quick scalp) as well as Sell signals when a candle closes below both lines indicating a quick continuation of a short position (quick scalp). Please note that i do not recommend entries at Buy and Sell signals during Accumulation/Consolidation. Positions should be taken with volume.
Volume Orderblock Breakout — Naaganeunja Lite v3.6Volume orderblocks breakout indicator
you can use it 5minutes (short trading)
or 4 hours(swing trading)
it is best indicator in the world
Raja's SMC Order Blocks Display [PRO]Raja's SMC Order Blocks Display - Complete Description
🌟 A Message from Raja Saien
This indicator has been crafted with dedication, countless hours of research, and deep passion for trading excellence. Raja Saien has poured his heart and soul into creating this powerful tool to help YOU succeed in the markets.
For Everyone Starting Their Trading Journey:
If you're new to trading, remember - every expert was once a beginner. This indicator is your gateway to understanding how institutional money moves in the markets. Raja Saien believes in YOUR potential to learn, grow, and achieve financial freedom through smart trading.
The path to success requires:
✨ Dedication to learning the craft
💪 Patience during the learning curve
🎯 Consistent practice with the right tools
🚀 Belief in your ability to master the markets
This isn't just an indicator - it's a mentor on your chart, showing you where the smart money is positioned. With hard work and this tool in your arsenal, you can transform your trading and your life.
Remember: The markets reward those who prepare, practice, and persist. Raja Saien has given you the tool - now it's your turn to commit to the journey!
Overview
This is an advanced TradingView indicator that identifies and displays Smart Money Concepts (SMC) and Order Blocks. It's designed for professional traders who want to understand institutional trading patterns and market structure.
Main Features
1. Smart Money Concepts (SMC) Detection
ZigZag Pattern Recognition: Identifies market structure using pivot highs and lows
Break of Structure (BOS): Detects when price breaks through important structural levels
Change of Character (CHoCH): Identifies trend reversals and shifts in market sentiment
Configurable Length: Adjustable ZigZag sensitivity (default: 5 bars)
2. Order Blocks (OB)
Order blocks are zones where institutional investors have placed large orders. The indicator identifies two types:
Bullish Order Blocks:
Created when market shifts from bearish to bullish
Marks the last bearish candle before the structure break
Displayed in green/teal color
Represents potential support zones where price may bounce
Looks back 10 bars to find the lowest bearish candle
Bearish Order Blocks:
Created when market shifts from bullish to bearish
Marks the last bullish candle before the structure break
Displayed in red color
Represents potential resistance zones where price may reject
Looks back 10 bars to find the highest bullish candle
3. Order Block Management
Dynamic Extension: Active order blocks extend forward on the chart
Mitigation Detection: Automatically detects when price fully breaks through an order block
Bullish OB mitigated when close drops below the bottom
Bearish OB mitigated when close rises above the top
Visual Feedback: Mitigated blocks turn gray and are labeled "Mitigated"
Auto-cleanup: Removes mitigated order blocks from active tracking
4. Moving Averages Suite
Includes multiple trend indicators for comprehensive analysis:
Fast EMA (default 9): Yellow line - captures short-term momentum
Slow EMA (default 21): Purple line - identifies medium-term trends
EMA 50: Orange line - major trend filter
SMA 200: Blue line - long-term trend and institutional reference point
All EMAs support multiple source options: Open, High, Low, Close, HL2, HLC3, OHLC4
Customization Options
SMC Settings
ZigZag Length: Control sensitivity of structure detection (2-100)
Show Order Blocks: Toggle order block display on/off
Visual Settings
Bullish Color: Customize color for bullish order blocks (default: teal #089981)
Bearish Color: Customize color for bearish order blocks (default: red #f23645)
Transparency: Order blocks displayed with 80% transparency for better chart visibility
EMA Settings
Fast EMA Length: Adjustable period (default: 9)
Slow EMA Length: Adjustable period (default: 21)
Source Selection: Choose calculation source for each EMA
Toggle EMA 50: Show/hide the 50-period EMA
Toggle SMA 200: Show/hide the 200-period SMA
How It Works
Structure Detection Process
Identifies pivot highs and lows based on specified length
Creates ZigZag lines connecting significant swing points
Tracks current trend direction (bullish/bearish/neutral)
Monitors for structural breaks that signal trend changes
Order Block Creation
When price breaks above a previous high (bullish BOS):
Scans last 10 bars for the lowest bearish candle
Creates bullish order block at that candle's range
Marks it as active support zone
When price breaks below a previous low (bearish BOS):
Scans last 10 bars for the highest bullish candle
Creates bearish order block at that candle's range
Marks it as active resistance zone
Order Block Lifecycle
Active: Box extends forward with colored border and background
Tested: Price can interact with the zone multiple times
Mitigated: Once price closes through the zone, marked as invalidated
Removed: Automatically cleaned up after mitigation
Trading Applications
Entry Strategies
Pullback Entries: Wait for price to return to an active order block
Confirmation: Look for bullish price action at bullish OBs, bearish at bearish OBs
EMA Confluence: Stronger setups when OBs align with EMA levels
Risk Management
Stop Loss: Place stops just beyond the order block boundary
Invalidation: Exit if order block gets mitigated
Multiple Timeframes: Check OBs on higher timeframes for stronger zones
Trend Analysis
EMA Alignment: All EMAs pointing same direction = strong trend
EMA 50 Test: Key level for trend continuation/reversal
SMA 200: Major institutional reference point
Technical Specifications
Max Boxes: 500 (sufficient for most chart timeframes)
Max Lines: 500
Max Labels: 500
Overlay: True (draws directly on price chart)
Version: Pine Script v5
Best Practices
Use on liquid markets (forex, major stocks, crypto)
Combine with volume analysis for confirmation
Higher timeframes produce more reliable order blocks
Wait for clear structure breaks before trusting new OBs
Don't trade against the major trend (SMA 200 direction)
Use multiple confirmations before entering trades
Limitations
Works best in trending markets with clear structure
May produce false signals in ranging/choppy conditions
Requires understanding of Smart Money Concepts
Not a standalone trading system - use with proper risk management
Historical order blocks don't guarantee future reactions
Cloud Matrix [CongTrader]🚀 Cloud Matrix — Advanced Multi-Layer Ichimoku System
Cloud Matrix is an enhanced trend-analysis system built on the public-domain Ichimoku Kinko Hyo methodology.
This indicator delivers a multi-dimensional view of trend, momentum, and market structure, allowing traders to evaluate market conditions at a glance.
Cloud Matrix is not a simple Ichimoku clone. It introduces advanced confirmation logic, multi-timeframe trend filtering, and a modern visual framework designed for today’s dynamic markets.
🔥 Key Features & Highlights
1️⃣ Smart Preset Engine (4 Modes)
Choose from optimized presets for different markets and volatility levels:
Traditional 9/26/52
Crypto Fast 10/30/60
Crypto Medium 20/60/120
Custom Mode
→ Fast, adaptable, and beginner-friendly.
2️⃣ Advanced Trend Confirmation Engine
Cloud Matrix uses a 5-factor scoring system to filter high-quality signals:
Tenkan vs Kijun
Price vs Cloud
Cloud Twist
Chikou Position
Close vs Kijun
A bullish/bearish signal only triggers when multiple Ichimoku conditions align, reducing noise dramatically.
3️⃣ Higher-Timeframe EMA200 Filter
One of the signature strengths of Cloud Matrix:
EMA200 from a higher timeframe
Helps you follow the dominant macro trend
Avoids counter-trend traps
Ideal for swing and position traders
4️⃣ Intelligent Auto Signals
The indicator includes refined and clean signals for:
Bullish / Bearish TK Cross
Bullish / Bearish Kumo Breakout
All signals support:
Labels
Alerts
“Alert on Close” mode to avoid repaint-related confusion
5️⃣ Enhanced Kumo Cloud Visualization
Adjustable opacity (strong / soft)
Clear bullish/bearish cloud shading
Improved readability on fast markets
6️⃣ Real-Time Market State Dashboard
A compact dashboard shows all key Ichimoku conditions:
Price vs Cloud
Cloud Twist (Bullish/Bearish)
Tenkan–Kijun Relationship
Chikou Status
HTF EMA Trend
Active Preset
→ Designed for instant market diagnostics.
🎯 How Traders Use Cloud Matrix
Perfect for:
Trend following
Swing trading
Crypto, Stocks, Forex
Early breakout detection
Filtering low-quality setups
📌 Suggested Usage
Bullish Bias When:
Price is above the Cloud
Cloud Twist is bullish
Tenkan crosses above Kijun
Chikou is above price
HTF EMA200 is bullish
Bearish Bias When:
Opposite conditions apply.
⚠️ Important Note
This indicator is for analysis and educational purposes only.
It does not provide financial advice or guaranteed trading results.
Ichimoku concepts belong to the public domain; this is a modernized expansion built for study and research.
✍️ Author
CongTrader – 2025
Designed to help traders see the market through a multi-layered, structured lens..
ATR ZigZag - Volatility-Filtered Market StructureDescription
This indicator draws ZigZags using an ATR based threshold for direction switching to identify major swing highs and lows. Instead of relying on fractals or fixed bar-count swings, pivots are confirmed only when price moves beyond the prior extreme by:
threshold = ATR(length) × ATR_mult
This filters noise, enforces valid swing structure (high → low → high), and adapts automatically to volatility. The ATR ZigZag is ideal for traders who want a clean, objective view of swing structure without noise. This has many uses, including mapping swing structure, drawing chart patterns, and trading around extremes.
Lag and Repainting
Pivots are confirmed only after price moves sufficiently in the opposite direction. This creates necessary lag. The ZigZag is drawn when this occurs, and will anchor to the high/low in the past. Optional detection dot plots show exactly when confirmation occurred.
What You See
ZigZag: dashed gray line, repainted to anchor at the confirmed highs and lows
Latest Pivot Levels: Dashed horizontal lines at the most recent confirmed high/low.
Optional Live Swing Leg: A real-time line from the last confirmed pivot to the current swing extreme, updating until a new pivot forms.
Optional ATR Boxes: 1×ATR shaded zones around the latest pivot for structural context.
Optional Pivot Confirmation Dots: Markers show the bar where the threshold is crossed and a swing is officially confirmed. This is to understand the lag and see when the ZigZag repainted.
Qullamaggie 3★ / 4★ / 5★ Setup Detector (Clean, Colored Labels)Qullamaggie 3★ / 4★ / 5★ Setup Detector (Clean, Colored Labels)-Thaha
Multi-Candle Reversal ConfirmationMulti-Candle Reversal Confirmation (MCRC)
This indicator identifies potential price reversals using a 3-candle confirmation pattern. It filters out noise by requiring a significant prior trend before signaling, helping you catch turning points rather than getting trapped in choppy price action.
How It Works
The indicator uses a three-step process to confirm reversals:
Candle 1 (Rejection) - Detects a rejection candle after a sustained move. This includes hammer/shooting star patterns with long wicks, doji candles showing indecision, or stall candles with unusually small bodies.
Candle 2 (Reversal) - Confirms the candle closes in the opposite direction of the prior trend.
Candle 3 (Confirmation) - Validates the reversal by either continuing in the new direction or breaking the high/low of the previous candle.
Key Features
Requires a significant prior trend before looking for reversals (no signals in choppy, sideways markets)
Uses ATR to measure move significance, adapting to current volatility
Marks rejection candles with small circles for early awareness
Confirmed signals shown as triangles with Bull/Bear labels
Built-in alerts for all signal types
Settings
Wick to Body Ratio - How pronounced the rejection wick must be compared to the candle body (default: 2.0)
Doji Threshold - Maximum body size relative to total range to qualify as a doji (default: 0.1)
Trend Lookback - Number of candles to analyze for prior trend detection (default: 5)
Trend Strength - Percentage of lookback candles required in trend direction (default: 0.6 = 60%)
Minimum Move (ATR multiple) - How large the prior move must be before signaling (default: 1.5)
Show Bullish/Bearish - Toggle each signal type on or off
Visual Signals
Small Circle - Marks potential rejection candles (first candle in the pattern)
Green Triangle (Bull) - Confirmed bullish reversal signal
Red Triangle (Bear) - Confirmed bearish reversal signal
Alerts
Three alert options are available:
Bullish Reversal Confirmed
Bearish Reversal Confirmed
Any Reversal Confirmed
How To Set Up Alerts
Add the indicator to your chart
Right-click on the chart and select "Add Alert" (or press Alt+A)
In the Condition dropdown, select "Multi-Candle Reversal Confirmation"
Choose your preferred alert type
Set notification preferences (popup, email, sound, webhook)
Click "Create"
Tips For Best Results
Combine with key support/resistance levels for higher probability trades
Use higher timeframe trend direction as a filter
Adjust Trend Lookback based on your timeframe (higher for longer timeframes)
Increase Minimum Move ATR in volatile conditions to reduce false signals
Signals appearing near VWAP, moving averages, or prior day levels tend to be more reliable
Note: This indicator is for informational purposes only and should not be used as the sole basis for trading decisions. Always use proper risk management and consider combining with other forms of analysis.
PRICE ACTION TRAKKERThis indicator isolates the core price-phase engine from the full Price Action Tracker (PAT) system.
It identifies and visualises structural phases of price, including:
Upper phase boundary (dynamic resistance)
Lower phase boundary (dynamic support)
Phase average (mean-reversion anchor)
Pivot markers (LPH, LPL, oLPH, oLPL)
The phase engine dynamically adapts to evolving market structure using pivot behaviour and structural breaks. This creates a real-time visual map of how price is organising itself — independent of time-based indicators and without the lag associated with classical moving averages.
This version focuses exclusively on price action structure, making it clean, fast, and ideal as a core tool on its own.
However, it is also designed as a foundation for more advanced analysis and will expand over time as additional modules are released.
This phase engine works exceptionally well in combination with my other indicators, such as moving-average structure tools, volume-weighted frameworks, and trend-strength models. Together, they provide a layered view of market behaviour:
phase structure → trend bias → volume confirmation → entry logic.
This makes the indicator valuable for:
Intra-day and swing traders
Wyckoff and liquidity-based traders
Mean-reversion and range-trading strategies
Understanding where accumulation/distribution behaviour is forming
Identifying when a phase is likely ending or breaking
Future updates will add modular expansion paths (trend scoring, VWAP phase weighting, multi-phase confluence, and signal logic), while maintaining the simplicity and reliability of this core engine.
Works Best With:
This indicator is part of a broader toolkit designed to analyse structure, trend, and behaviour.
When used alongside my other published tools — such as trend-strength MAs, VWMA frameworks, and higher-timeframe bias indicators — it provides a complete, multi-layered view of market conditions.
Fanfans结构+极简合并增强版V2
中文:该指标整合Fanfans结构、高斯GWMA、动态摆动VWAP、MACD及极简交易信号,内置结构/GWMA/VWAP/EMA多维度过滤、成交量确认、动态ATR等优化功能。支持多空信号标注、止损止盈分层设置、信号质量评分,搭配图表信息面板与多级别警报共振机制,适用于1分钟等短周期交易,兼顾信号灵敏度与准确性。
English: This indicator integrates Fanfans structure, Gaussian GWMA, dynamic swing VWAP, MACD, and simple trading signals. It features multi-dimensional filters (structure/GWMA/VWAP/EMA), volume confirmation, dynamic ATR optimization. Supporting long/short signal labeling, layered SL/TP settings, signal quality scoring, it comes with a chart info panel and multi-level alert resonance. Suitable for short-term trading (e.g., 1-minute timeframe), balancing signal sensitivity and accuracy.
Reversal ConfirmationReversal Confirmation (RC)
This indicator identifies potential price reversals using a simple but effective two-candle pattern. It detects when a trend exhausts and confirms the reversal when the next candle eclipses the close of the reversal candle.
How It Works
The indicator uses a two-step process to confirm reversals:
Reversal Candle (R) - The first candle that closes in the opposite direction after a sustained trend. This signals potential exhaustion of the current move.
Confirmation Candle (C) - The candle that eclipses (closes beyond) the close of the reversal candle. This confirms the reversal is underway.
For a bullish reversal, the confirmation candle must close above the close of the reversal candle. For a bearish reversal, the confirmation candle must close below the close of the reversal candle.
Key Features
Requires a significant prior trend before looking for reversals, filtering out choppy sideways markets
Uses ATR to measure move significance, adapting to current volatility
Clean two-candle pattern that's easy to understand and trade
Visual dashed line showing the reversal candle close level that must be eclipsed
Built-in alerts for all signal types
Settings
Trend Lookback - Number of candles to analyze for prior trend detection (default: 7)
Trend Strength - Percentage of lookback candles required in trend direction (default: 0.7 = 70%)
Minimum Move (ATR multiple) - How large the prior move must be before signaling (default: 2.0)
Show Bullish/Bearish - Toggle each signal type on or off
Mark Reversal Candles - Toggle visibility of the reversal candle markers
Visual Signals
"R" with small circle - Marks the reversal candle where the pattern begins
"C" with triangle - Marks the confirmation candle (your entry signal)
Dashed line - Shows the close level of the reversal candle that must be eclipsed
Alerts
Three alert options are available:
Bullish Confirmation
Bearish Confirmation
Any Confirmation
How To Set Up Alerts
Add the indicator to your chart
Right-click on the chart and select "Add Alert" (or press Alt+A)
In the Condition dropdown, select "Reversal Confirmation"
Choose your preferred alert type
Set notification preferences (popup, email, sound, webhook)
Click "Create"
Tips For Best Results
Signals appearing at key support/resistance levels tend to be more reliable
Combine with VWAP, moving averages, or prior day high/low for confluence
Use higher timeframe trend direction as a filter
Increase Minimum Move ATR in volatile conditions to reduce false signals
Adjust Trend Lookback based on your timeframe (higher values for longer timeframes)
The Logic Behind It
After a sustained move in one direction, the first candle to close in the opposite direction signals potential exhaustion. However, one candle alone isn't enough. When the next candle eclipses the close of that reversal candle, it confirms that buyers (or sellers) have truly taken control and the reversal is underway.
Note: This indicator is for informational purposes only and should not be used as the sole basis for trading decisions. Always use proper risk management and consider combining with other forms of analysis.
Effort per 1% Move (Normalized Columns)This indicator Shows a Normalized "effort" needed to move a certain assets price by 1 percent.
Used correctly, this can help in visualizing manipulation and shows a certain chance of a candle turning to a swing point.
Volume vs Body Alert.Vsa
"This VSA-based indicator identifies potential anomalies in price action by detecting candles that show a larger body size than the previous candle while simultaneously having lower volume. This 'more result with less effort' pattern can signal weakness, manipulation, or potential trend exhaustion. Visual signals and customizable alerts notify traders when these conditions occur."
Fanfans结构加强vwap版 + 极简系统### 中英文双语总结(300字内)
中文:该指标整合Fanfans结构、动态摆动VWAP、高斯GWMA、MACD及极简交易系统,支持趋势过滤(可选GWMA/VWAP/结构维度)、多离场模式(ATR止盈止损/GWMA离场/混合)与移动止损。具备多空信号标注、止损止盈线绘制、多维度共振警报,图表信息面板实时展示结构/VWAP/GWMA/MACD状态,可自定义过滤规则、显示样式及交易参数,适配短周期交易,兼顾趋势判断与信号执行的灵活性。
English: This indicator integrates Fanfans structure, dynamic swing VWAP, Gaussian GWMA, MACD and a simple trading system. It supports trend filtering (GWMA/VWAP/structure optional), multiple exit modes (ATR SL/TP, GWMA exit, hybrid) and trailing stop. Featuring long/short signal labeling, SL/TP line drawing, multi-dimensional resonance alerts, its chart info panel displays real-time status of structure/VWAP/GWMA/MACD. Customizable filter rules, display styles and trading parameters make it suitable for short-term trading, balancing trend judgment and signal execution flexibility.
猛の掟・本物っぽいTradingViewスクリーナー 完全版//@version=5
indicator("猛の掟・本物っぽいTradingViewスクリーナー 完全版", overlay=false, max_labels_count=500, max_lines_count=500)
// =============================
// 入力パラメータ
// =============================
emaLenShort = input.int(5, "短期EMA", minval=1)
emaLenMid = input.int(13, "中期EMA", minval=1)
emaLenLong = input.int(26, "長期EMA", minval=1)
macdFastLen = input.int(12, "MACD Fast", minval=1)
macdSlowLen = input.int(26, "MACD Slow", minval=1)
macdSignalLen = input.int(9, "MACD Signal", minval=1)
macdZeroTh = input.float(0.2, "MACDゼロライン近辺とみなす許容値", step=0.05)
volMaLen = input.int(5, "出来高平均日数", minval=1)
volMinRatio = input.float(1.3, "出来高倍率(初動判定しきい値)", step=0.1)
volStrongRatio = input.float(1.5, "出来高倍率(本物/三点シグナル用)", step=0.1)
highLookback = input.int(60, "直近高値の参照本数", minval=10)
pullbackMin = input.float(5.0, "押し目最小 ", step=0.5)
pullbackMax = input.float(15.0, "押し目最大 ", step=0.5)
breakLookback = input.int(15, "レジブレ後とみなす本数", minval=1)
wickBodyMult = input.float(2.0, "ピンバー:下ヒゲが実体の何倍以上か", step=0.5)
// 表示設定
showPanel = input.bool(true, "下パネルにスコアを表示する")
showTable = input.bool(true, "右上に8条件チェック表を表示する")
// =============================
// 基本指標計算
// =============================
emaShort = ta.ema(close, emaLenShort)
emaMid = ta.ema(close, emaLenMid)
emaLong = ta.ema(close, emaLenLong)
= ta.macd(close, macdFastLen, macdSlowLen, macdSignalLen)
volMa = ta.sma(volume, volMaLen)
volRatio = volMa > 0 ? volume / volMa : 0.0
recentHigh = ta.highest(high, highLookback)
prevHigh = ta.highest(high , highLookback)
pullbackPct = recentHigh > 0 ? (recentHigh - close) / recentHigh * 100.0 : 0.0
// ローソク足要素
body = math.abs(close - open)
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
// =============================
// A:トレンド条件
// =============================
emaUp = emaShort > emaShort and emaMid > emaMid and emaLong > emaLong
goldenOrder = emaShort > emaMid and emaMid > emaLong
aboveEma2 = close > emaLong and close > emaLong
trendOK = emaUp and goldenOrder and aboveEma2
// =============================
// B:MACD条件
// =============================
macdGC = ta.crossover(macdLine, macdSignal)
macdNearZero = math.abs(macdLine) <= macdZeroTh
macdUp = macdLine > macdLine
macdOK = macdGC and macdNearZero and macdUp
// =============================
// C:出来高条件
// =============================
volInitOK = volRatio >= volMinRatio // 8条件用
volStrongOK = volRatio >= volStrongRatio // 三点シグナル用
volumeOK = volInitOK
// =============================
// D:ローソク足パターン
// =============================
isBullPinbar = lowerWick > wickBodyMult * body and lowerWick > upperWick and close >= open
isBullEngulf = close > open and open < close and close > open
isBigBullCross = close > emaShort and close > emaMid and open < emaShort and open < emaMid and close > open
candleOK = isBullPinbar or isBullEngulf or isBigBullCross
// =============================
// E:価格帯(押し目&レジブレ)
// =============================
pullbackOK = pullbackPct >= pullbackMin and pullbackPct <= pullbackMax
isBreakout = close > prevHigh and close <= prevHigh
barsSinceBreak = ta.barssince(isBreakout)
afterBreakZone = barsSinceBreak >= 0 and barsSinceBreak <= breakLookback
afterBreakPullbackOK = afterBreakZone and pullbackOK and close > emaShort
priceOK = pullbackOK and afterBreakPullbackOK
// =============================
// 8条件の統合
// =============================
allRulesOK = trendOK and macdOK and volumeOK and candleOK and priceOK
// =============================
// 最終三点シグナル
// =============================
longLowerWick = lowerWick > wickBodyMult * body and lowerWick > upperWick
macdGCAboveZero = ta.crossover(macdLine, macdSignal) and macdLine > 0
volumeSpike = volStrongOK
finalThreeSignal = longLowerWick and macdGCAboveZero and volumeSpike
buyConfirmed = allRulesOK and finalThreeSignal
// =====================================================
// スクリーナー用スコア(0=なし, 1=猛, 2=確)
// =====================================================
score = buyConfirmed ? 2 : (allRulesOK ? 1 : 0)
// 色分け(1行で安全な書き方)
col = score == 2 ? color.new(color.yellow, 0) : score == 1 ? color.new(color.lime, 0) : color.new(color.gray, 80)
// -----------------------------------------------------
// ① 視覚用:下パネルのカラム表示
// -----------------------------------------------------
plot(showPanel ? score : na,
title = "猛スコア(0=なし,1=猛,2=確)",
style = plot.style_columns,
color = col,
linewidth = 2)
hline(0, "なし", color=color.new(color.gray, 80))
hline(1, "猛", color=color.new(color.lime, 60))
hline(2, "確", color=color.new(color.yellow, 60))
// -----------------------------------------------------
// ② Data Window 用出力(スクリーナー風)
// -----------------------------------------------------
plot(score, title="Score_0なし1猛2確", color=color.new(color.white, 100), display=display.data_window)
plot(allRulesOK ? 1 : 0, title="A_Trend_OK", color=color.new(color.white, 100), display=display.data_window)
plot(macdOK ? 1 : 0, title="B_MACD_OK", color=color.new(color.white, 100), display=display.data_window)
plot(volumeOK ? 1 : 0, title="C_Volume_OK", color=color.new(color.white, 100), display=display.data_window)
plot(candleOK ? 1 : 0, title="D_Candle_OK", color=color.new(color.white, 100), display=display.data_window)
plot(priceOK ? 1 : 0, title="E_Price_OK", color=color.new(color.white, 100), display=display.data_window)
plot(longLowerWick ? 1 : 0, title="F_Pin下ヒゲ_OK", color=color.new(color.white, 100), display=display.data_window)
plot(macdGCAboveZero ? 1 : 0, title="G_MACDゼロ上", color=color.new(color.white, 100), display=display.data_window)
plot(volumeSpike ? 1 : 0, title="H_出来高1.5倍", color=color.new(color.white, 100), display=display.data_window)
// -----------------------------------------------------
// ③ 右上に「8条件チェック表」を表示(最終バーのみ)
// -----------------------------------------------------
var table info = table.new(position.top_right, 2, 9,
border_width = 1,
border_color = color.new(color.white, 60))
// 1行分の表示用ヘルパー
fRow(string label, bool cond, int row) =>
color bg = cond ? color.new(color.lime, 70) : color.new(color.red, 80)
string txt = cond ? "達成" : "未達"
// 左列:条件名
table.cell(info, 0, row, label, text_color = color.white, bgcolor = color.new(color.black, 0))
// 右列:結果(達成 / 未達)
table.cell(info, 1, row, txt, text_color = color.white, bgcolor = bg)
if barstate.islast and showTable
// ヘッダー(2列とも黒背景)
table.cell(info, 0, 0, "猛の掟 8条件チェック", text_color = color.white, bgcolor = color.new(color.black, 0))
table.cell(info, 1, 0, "", text_color = color.white, bgcolor = color.new(color.black, 0))
fRow("A: トレンド", trendOK, 1)
fRow("B: MACD", macdOK, 2)
fRow("C: 出来高", volumeOK, 3)
fRow("D: ローソク", candleOK, 4)
fRow("E: 押し目/レジブレ", priceOK, 5)
fRow("三点: ヒゲ", longLowerWick, 6)
fRow("三点: MACDゼロ上", macdGCAboveZero,7)
fRow("三点: 出来高1.5倍", volumeSpike, 8)
CRR Range Timer (Recarga)What this indicator does (CRR Range Timer – “Recarga”)
In simple words:
Defines a price range (your “reload zone”)
You set:
Zona Low → bottom of the range (e.g. 4210.0)
Zona High → top of the range (e.g. 4220.0)
Optional Tolerancia in ticks, to make the zone a bit wider.
The script automatically calculates zonaMin and zonaMax and checks if the current close is inside that zone.
Counts how long price stays inside that range
If close is inside the zone → enRango = true.
It counts consecutive bars inside the zone: barrasEnRango.
It converts that into time:
Uses your chart timeframe (timeframe.in_seconds(timeframe.period))
Calculates total seconds → minutes → then splits into:
Days (d)
Hours (h)
Minutes (m)
Example text: 2d 5h 30m means price has been stuck inside that range for 2 days, 5 hours and 30 minutes.
Shows a HUD table with the range information
It creates a small table (HUD) on the chart (position configurable: top/bottom left/center/right) with:
Header row
"CRR RANGE TIMER"
"Recarga"
Symbol (e.g. XAUUSD)
Row 2
"Estado" → status: "En RANGO" (inside) or "Fuera RANGO" (outside), with green/red color
The time it has been in range: Xd Yh Zm
Row 3
"Zona" → the exact price range zonaMin - zonaMax
"Barras: N" → number of bars inside the range
Draws a text label on the chart near price
When price is inside the zone and Mostrar texto sobre el precio is ON:
It shows a label like:
Recarga: 0d 3h 15m
Zona: 4210.00 - 4220.00
The label moves with the latest bar near the current price.
Optional background highlight
When mostrarBg is true and price is inside the range, the background of the chart in that bar is tinted (teal, very transparent).
This visually marks the “reload” area so you can see clearly when the market is stuck there.
How to use it to trade and “win” (trading logic idea)
This tool is not a buy/sell signal by itself.
It is a timer of accumulation / ranging in a specific price zone.
Think of it like this:
“The more time price spends inside a narrow zone, the stronger the potential move when it finally breaks out.”
Main use cases
Detect long consolidations before a big move
Choose an important zone: for example a NY range, a London range, or a zone between two key levels (support/resistance, supply/demand, OB, etc).
Set Zona Low and Zona High around that area.
Let the indicator count time:
If the HUD shows only a few minutes/bars, it’s a fresh range.
If the HUD shows many hours or even days, the market is “charging” (recargando) in that zone.
Trading idea:
You wait for a strong breakout of that zone after a good amount of “recarga” time.
The longer the recarga, the more aggressive the move can be when it finally escapes.
Filter bad trades inside dead ranges
Many traders lose money trading inside choppy ranges, especially in NY afternoon or Asia when the market is asleep.
With this indicator:
If you see the HUD saying En RANGO and 0d 2h 45m for example,
You know the market has been stuck almost 3 hours there.
You can create a rule for yourself:
“No new trades when price is inside my recarga box for more than X minutes/hours.”
That protects you from overtrading in low-volatility chop.
Objective measure of “how long it has been loading”
Instead of “it feels like it’s ranging”, you have a number:
On a 5m chart:
12 bars in range = 60 minutes
48 bars in range = 4 hours
On a 15m chart:
16 bars in range = 4 hours
The indicator does this math for you and displays it clearly.
Simple trading playbook example
You can adapt, but here’s a very simple way to use it:
Define your key zone
Use an important range: yesterday’s NY range, an accumulation box around a key level, or a consolidation before news.
Set Zona Low and Zona High to cover that area.
Optionally add Tolerancia (a few ticks) so small spikes don’t reset the timer.
Wait for recarga
Watch the HUD:
If time < 30–60 minutes → market still “loading”, small opportunities.
If time ≥ 2–4 hours (depending on timeframe and instrument) → stronger compression, potential for bigger breakout.
Plan your trade around the breakout
Don’t chase random candles inside the range.
Wait for:
A clear close above the high of the zone → bullish breakout idea.
A clear close below the low of the zone → bearish breakout idea.
Combine with your other tools (volume, structure, SMC, your CRR dashboard, etc) to confirm direction.
Risk management
Your stop can be placed:
Just inside the box (back inside the range = invalid breakout).
Target:
Previous swing levels, liquidity pools, or a multiple of your risk (1:2, 1:3, etc).
30-Minute High and Low30-Minute High and Low Levels
This indicator plots the previous 30-minute candle’s high and low on any intraday chart.
These levels are widely used by intraday traders to identify key breakout zones, liquidity pools, micro-range boundaries, and early trend direction.
Features:
• Automatically pulls the previous 30-minute candle using higher-timeframe HTF requests
• Displays the HTF High (blue) and HTF Low (red) on lower-timeframe charts
• Works on all intraday timeframes (1m, 3m, 5m, 10m, etc.)
• Levels stay fixed until the next 30-minute bar completes
• Ideal for ORB strategies, scalping, liquidity sweeps, and reversal traps
Use Cases:
• Watch for breakouts above the 30-minute high
• Monitor for liquidity sweeps and fakeouts around the high/low
• Treat the mid-range as a magnet during consolidation
• Combine with VWAP or EMA trend structure for high-precision intraday setups
This indicator is simple, fast, and designed for traders who rely on HTF micro-structure to guide intraday execution.
Reversal WaveThis is the type of quantitative system that can get you hated on investment forums, now that the Random Walk Theory is back in fashion. The strategy has simple price action rules, zero over-optimization, and is validated by a historical record of nearly a century on both Gold and the S&P 500 index.
Recommended Markets
SPX (Weekly, Monthly)
SPY (Monthly)
Tesla (Weekly)
XAUUSD (Weekly, Monthly)
NVDA (Weekly, Monthly)
Meta (Weekly, Monthly)
GOOG (Weekly, Monthly)
MSFT (Weekly, Monthly)
AAPL (Weekly, Monthly)
System Rules and Parameters
Total capital: $10,000
We will use 10% of the total capital per trade
Commissions will be 0.1% per trade
Condition 1: Previous Bearish Candle (isPrevBearish) (the closing price was lower than the opening price).
Condition 2: Midpoint of the Body The script calculates the exact midpoint of the body of that previous bearish candle.
• Formula: (Previous Open + Previous Close) / 2.
Condition 3: 50% Recovery (longCondition) The current candle must be bullish (green) and, most importantly, its closing price must be above the midpoint calculated in the previous step.
Once these parameters are met, the system executes a long entry and calculates the exit parameters:
Stop Loss (SL): Placed at the low of the candle that generated the entry signal.
Take Profit (TP): Calculated by projecting the risk distance upward.
• Calculation: Entry Price + (Risk * 1).
Risk:Reward Ratio of 1:1.
About the Profit Factor
In my experience, TradingView calculates profits and losses based on the percentage of movement, which can cause returns to not match expectations. This doesn’t significantly affect trending systems, but it can impact systems with a high win rate and a well-defined risk-reward ratio. It only takes one large entry candle that triggers the SL to translate into a major drop in performance.
For example, you might see a system with a 60% win rate and a 1:1 risk-reward ratio generating losses, even though commissions are under control relative to the number of trades.
My recommendation is to manually calculate the performance of systems with a well-defined risk-reward ratio, assuming you will trade using a fixed amount per trade and limit losses to a fixed percentage.
Remember that, even if candles are larger or smaller in size, we can maintain a fixed loss percentage by using leverage (in cases of low volatility) or reducing the capital at risk (when volatility is high).
Implementing leverage or capital reduction based on volatility is something I haven’t been able to incorporate into the code, but it would undoubtedly improve the system’s performance dramatically, as it would fix a consistent loss percentage per trade, preventing losses from fluctuating with volatility swings.
For example, we can maintain a fixed loss percentage when volatility is low by using the following formula:
Leverage = % of SL you’re willing to risk / % volatility from entry point to exit or SL
And if volatility is high and exceeds the fixed percentage we want to expose per trade (if SL is hit), we could reduce the position size.
For example, imagine we only want to risk 15% per SL on Tesla, where volatility is high and would cause a 23.57% loss. In this case, we subtract 23.57% from 15% (the loss percentage we’re willing to accept per trade), then subtract the result from our usual position size.
23.57% - 15% = 8.57%
Suppose I use $200 per trade.
To calculate 8.57% of $200, simply multiply 200 by 8.57/100. This simple calculation shows that 8.57% equals about $17.14 of the $200. Then subtract that value from $200:
$200 - $17.14 = $182.86
In summary, if we reduced the position size to $182.86 (from the usual $200, where we’re willing to lose 15%), no matter whether Tesla moves up or down 23.57%, we would still only gain or lose 15% of the $200, thus respecting our risk management.
Final Notes
The code is extremely simple, and every step of its development is detailed within it.
If you liked this strategy, which complements very well with others I’ve already published, stay tuned. Best regards.






















