Initial Balance Breakout Signals [LuxAlgo]The Initial Balance Breakout Signals help traders identify breakouts of the Initial Balance (IB) range.
The indicator includes automatic detection of IB or can use custom sessions, highlights top and bottom IB extensions, custom Fibonacci levels, and goes further with an IB forecast with two different modes.
🔶 USAGE
The initial balance is the price range made within the first hour of the trading session. It is an intraday concept based on the idea that high volume and volatility enter the market through institutional trading at the start of the session, setting the tone for the rest of the day.
The initial balance is useful for gauging market sentiment, or, in other words, the relationship between buyers and sellers.
Bullish sentiment: Price trades above the IB range.
Mixed sentiment: Price trades within the IB range.
Bearish sentiment: Price trades below the IB range.
The initial balance high and low are important levels that many traders use to gauge sentiment. There are two main ideas behind trading around the IB range.
IB Extreme Breakout: When the price breaks and holds the IB high or low, there is a high probability that the price will continue in that direction.
IB Extreme Rejection: When the price tries to break those levels but fails, there is a high probability that it will reach the opposite IB extreme.
This indicator is a complete Initial Balance toolset with custom sessions, breakout signals, IB extensions, Fibonacci retracements, and an IB forecast. All of these features will be explained in the following sections.
🔹 Custom Sessions and Signals
By default, sessions for Initial Balance and breakout signals are in Auto mode. This means that Initial Balance takes the first hour of the trading session and shows breakout signals for the rest of the session.
With this option, traders can use the tool for open range trading, making it highly versatile. The concept behind open range (OR) is the same as that of initial balance (IB), but in OR, the range is determined by the first minute, three or five minutes, or up to the first 30 minutes of the trading session.
As shown in the image above, the top chart uses the Auto feature for the IB and Breakouts sessions. The bottom chart has the Auto feature disabled to use custom sessions for both parameters. In this case, the first three minutes of the trading session are used, turning the tool into an Open Range trading indicator.
This chart shows another example of using custom sessions to display overnight NASDAQ futures sessions.
The left chart shows a custom session from the Tokyo open to the London open, and the right chart shows a custom session from the London open to the New York open.
The chart shows both the Asian and European sessions, their top and bottom extremes, and the breakout signals from those extremes.
🔹 Initial Balance Extensions
Traders can easily extend both extremes of the Initial Balance to display their preferred targets for breakouts. Enable or disable any of them and set the IB percentage to use for the extension.
As the chart shows, the percentage selected on the settings panel directly affects the displayed levels.
Setting 25 means the tool will use a quarter of the detected initial balance range for extensions beyond the IB extremes. Setting 100 means the full IB range will be used.
Traders can use these extensions as targets for breakout signals.
🔹 Fibonacci Levels
Traders can display default or custom Fibonacci levels on the IB range to trade retracements and assess the strength of market movements. Each level can be enabled or disabled and customized by level, color, and line style.
As we can see on the chart, after the IB was completed, prices were unable to fall below the 0.236 Fibonacci level. This indicates significant bullish pressure, so it is expected that prices will rise.
Traders can use these levels as guidelines to assess the strength of the side trying to penetrate the IB. In this case, the sellers were unable to move the market beyond the first level.
🔹 Initial Balance Forecast
The tool features two different forecasting methods for the current IB. By default, it takes the average of the last ten values and applies a multiplier of one.
IB Against Previous Open: averages the difference between IB extremes and the open of the previous session.
Filter by current day of the week: averages the difference between IB extremes and the open of the current session for the same day of the week.
This feature allows traders to see the difference between the current IB and the average of the last IBs. It makes it very easy to interpret: if the current IB is higher than the average, buyers are in control; if it is lower than the average, sellers are in control.
For example, on the left side of the chart, we can see that the last day was very bullish because the IB was completely above the forecasted value. This is the IB mean of the last ten trading days.
On the right, we can see that on Monday, September 15, the IB traded slightly higher but within the forecasted value of the IB mean of the last ten Mondays. In this case, it is within expectations.
🔶 SETTINGS
Display Last X IBs: Select how many IBs to display.
Initial Balance: Choose a custom session or enable the Auto feature.
Breakouts: Enable or disable breakouts. Choose custom session or enable the Auto feature.
🔹 Extensions
Top Extension: Enable or disable the top extension and choose the percentage of IB to use.
Bottom extension: Enable or disable the bottom extension and choose the percentage of IB to use.
🔹 Fibonacci Levels
Display Fibonacci: Enable or disable Fibonacci levels.
Reverse: Reverse Fibonacci levels.
Levels, Colors & Style
Display Labels: Enable or disable labels and choose text size.
🔹 Forecast
Display Forecast: Select the forecast method.
- IB Against Previous Open: Calculates the average difference between the IB high and low and the previous day's IB open price.
- Filter by Current Day of Week: Calculates the average difference between the IB high and low and the IB open price for the same day of the week.
Forecast Memory: The number of data points used to calculate the average.
Forecast Multiplier: This multiplier will be applied to the average. Bigger numbers will result in wider predicted ranges.
Forecast Colors: Choose from a variety of colors.
Forecast Style: Choose a line style.
🔹 Style
Initial Balance Colors
Extension Transparency: Choose the extension's transparency. 0 is solid, and 100 is fully transparent.
Indicatori e strategie
INFLECTION NEXUS - SPAINFLECTION NEXUS - SPA (Shadow Portfolio Adaptive)
Foreword: The Living Algorithm
For decades, technical analysis has been a conversation between a trader and a static chart. We apply our indicators with their fixed-length inputs, and we hope that our rigid tools can somehow capture the essence of a market that is fluid, chaotic, and perpetually evolving. When our tools fail, we are told to "adapt." But what if the tools themselves could learn that lesson? What if our indicators could adapt not just for us, but with us?
This script, INFLECTION NEXUS - SPA, is the realization of that vision. It is an advanced analytical framework built around a revolutionary core: the Shadow Portfolio Adaptive (SPA) Engine . The buy and sell signals you see on the chart are an evolution of the logic from my previous work, "Turning Point." However, this is not a simple combination of two scripts. The SPA engine so fundamentally transforms the nature of the analysis that it creates an entirely new class of indicator. This publication is a showcase of that groundbreaking, self-learning engine.
This system is undeniably complex. When you first load it, the sheer volume of information may feel overwhelming. That is a testament to the depth of its analysis. This guide is designed to be your comprehensive manual, to break down every single component, every color, every number, into simple, understandable concepts. By the end of this document, you will not only master its functions but will also possess a deeper understanding of the market dynamics it is designed to reveal.
Chapter 1: The Paradigm Shift - Why the SPA Engine is a Leap Forward
To grasp the innovation here, we must first deconstruct the severe limitations of traditional "adaptive" indicators.
Part A: The Traditional Model - Driving by the Rear-View Mirror
Conventional "adaptive" systems are fundamentally reactive. They operate on a slow, inefficient loop: they wait for their own specific, biased signal to fire, wait for that trade to close, and only after a long and statistically significant "warm-up" period of 50-100 trades do they finally make a small, retrospective adjustment. They are always adapting to a market that no longer exists.
Part B: The SPA Model - The Proactive Co-Pilot
The Shadow Portfolio Adaptive (SPA) engine is a complete re-imagining of this process. It is not reactive; it is proactive, data-saturated, and instantly aware.
Continuous, Unbiased Learning: The SPA engine does not wait for a signal to learn. Its Shadow Portfolio is constantly running 5-bar long and short trades in the background. It learns from every single 5-bar slice of market action , giving it a continuous, unbiased stream of performance data. It is the difference between reading a textbook chapter and having a live sparring partner in the ring 24/7.
Instantaneous Market Awareness - The End of the "Warm-Up": This is the critical innovation. The SPA engine does not require a 100-trade warm-up period. The learning does not start after 50 trades; it begins on the 6th bar of the chart when the first shadow trade closes. From that moment on, the system is market-aware, analyzing data, and capable of making intelligent adjustments. The SPA engine is not adapting to old wins and losses. It is adapting, in near real-time, to the market's ever-shifting character, volatility, and personality.
Chapter 2: The Anatomy of the SPA Engine - A Granular Deep Dive
The engine is composed of three primary systems that work in a sophisticated, interconnected symphony.
Section 1: The Shadow Portfolio (The Information Harvester)
What it is, Simply: Think of this as the script's eyes and ears. It's a team of 10 virtual traders (5 long, 5 short) who are constantly taking small, quick trades to feel out the market.
How it Works, Simply: On every new bar, a new "long" trader and a new "short" trader enter the market. Exactly 5 bars later, they close their positions. This cycle is perpetual and relentless.
The Critical 'Why': Because these virtual traders enter and exit based on a fixed time (5 bars), not on a "good" or "bad" signal, their results are completely unbiased . They are simply measuring: "What happened to price over the last 5 bars?" This provides the raw, untainted truth about the market's behavior that the rest of the system needs to learn effectively.
The Golden Metric (ATR Normalization): The engine doesn't just look at dollar P&L. It's smarter than that. It asks a more intelligent question: "How much did this trade make relative to the current volatility?"
Analogy: Imagine a flea and an elephant. If they both jump 1 inch, who is more impressive? The flea. The SPA engine understands this. A $10 profit when the market is dead quiet is far more significant than a $10 profit during a wild, volatile swing.
The Formula: realized_atr = (close - trade.entry) / trade.atr_entry. It takes the raw profit and divides it by the Average True Range (a measure of volatility) at the moment of entry. This gives a pure, "apples-to-apples" score for every single trade, which is the foundational data point for all learning.
Section 2: The Cognitive Map (The Long-Term Brain)
What it is, Simply: This is the engine's deep memory, its library of experiences. Imagine a giant, 64-square chessboard (8x8 grid). Each square on the board represents a very specific type of market environment.
The Two Dimensions of Thought (The 'How'): How does it know which square we are on? It looks at two things:
The Market's Personality (X-Axis): Is the market behaving like a disciplined soldier, marching in a clear trend? Or is it like a chaotic, unpredictable child, running all over the place? The engine calculates a "Regime" score to figure this out.
The Market's Energy Level (Y-Axis): Is the market sleepy and quiet, or is it wide-awake and hyperactive? The engine measures "Normalized Volatility" to determine this.
The Power of Generalization (The 'Why'): When a Shadow Portfolio trade closes, its result is recorded in the corresponding square on the chessboard. But here's the clever part: it also shares a little bit of that lesson with the squares immediately next to it (using a Gaussian Kernel).
Analogy: If you touch a hot stove and learn "don't touch," your brain is smart enough to know you probably shouldn't touch the hot oven door next to it either, even if you haven't touched it directly. The Cognitive Map does the same thing, allowing it to make intelligent inferences even in market conditions it has seen less frequently. Each square remembers what indicator settings worked best in that specific environment.
Section 3: The Adaptive Engine (The Central Nervous System)
What it is, Simply: This is the conductor of the orchestra. It takes information from all other parts of the system and decides exactly what to do.
The Symphony of Inputs: It listens to three distinct sources of information before making a decision:
The Short-Term Memory (Rolling Stats): It looks at the performance of the last rollN shadow trades. This is its immediate, recent experience.
The Long-Term Wisdom (Cognitive Map): It consults the grand library of the Cognitive Map to see what has worked best in the current market type over the long haul.
The Gut Instinct (Bin Learning): It keeps a small "mini-batch" of the most recent trades. If this batch shows a very strong, sudden pattern, it can trigger a rapid, reflexive adjustment, like pulling your hand away from a flame.
The Fusion Process: It then blends these three opinions together in a sophisticated way. It gives more weight to the opinions it's more confident in (e.g., a Cognitive Map square with hundreds of trades of experience) and uses your Adaptation Intensity (dialK) input to decide how much to listen to its "gut instinct." The final decision is then smoothed to ensure the indicator's parameters change in a stable, intelligent way.
Chapter 3: The Control Panel - A Novice's Guide to Every Input
This is the most important chapter. Let's break down what these confusing settings actually do in the simplest terms possible.
--- SECTION 1: THE DRIVER'S SEAT (SIGNAL ENGINE & BASE SETTINGS) ---
🧾 Signal Engine (Turning Point):
What it is: These are the rules for the final BUY and SELL signs.
Think of it like this: The SPA engine is the smart robot that tunes your race car. These settings are you, the driver, telling the robot what kind of race you're in.
Enable Reversal Mode: You tell the robot, "I want to race on a curvy track with lots of turns." The robot will tune the car to be agile for catching tops and bottoms.
Enable Breakout Mode: You tell the robot, "I want to race on a long, straight track." The robot will tune the car for pure speed to follow the trend.
Require New Extreme: This is a quality filter. It tells the driver, "Don't look for a turn unless we've just hit a new top speed on the straightaway." It makes sure the reversal is from a real extreme.
Min Bars Between Signals: This is the "pit stop" rule. You're telling the robot, "After you show me a sign, wait at least 10 bars before showing another one, so I don't get confused."
⚡ ATR Bands (Base Inputs):
What they are: These are the starting settings for your car before the robot starts tuning it. These are your factory defaults.
Sensitivity: This is the "Bump Detector." A low number means the car feels every tiny pebble on the road. A high number means it only notices the big speed bumps. You want to set it so it notices the important bumps (real market structure) but ignores the pebbles (noise).
ATR Period & Multiplier: These set the starting size of the "safety lane" (the green and blue bands) around your car. The robot's main job is to constantly adjust the size of this safety lane to perfectly fit the current road conditions.
📊 & 📈 Filter Settings (RSI & Volume):
What they are: These are your co-pilot's confirmation checks.
Enable RSI Filter: Your co-pilot will check the "Engine Temperature" (RSI). He won't let you hit the gas (BUY) if the engine is already overheating (overbought).
RSI Length & Lookbacks: These tune how your co-pilot's temperature gauge works. The defaults are standard.
Require Volume Spike: Your co-pilot will check the "Crowd Noise" (Volume). He won't give you a signal unless he hears the crowd roar, confirming that a lot of people are interested in this move.
🎯 Signal Quality Control:
Enable Major Levels Only: This tells your co-pilot to be extra picky. He will only confirm signals that happen after a huge, powerful move, ignoring all the small stuff.
--- SECTION 2: THE ROBOT'S BRAIN (ENGINE & LEARNING CONTROLS) ---
🎛️ Master Control:
Adaptation Intensity (dialK): THIS IS THE ROBOT'S PERSONALITY DIAL.
Turn it DOWN (1-5): The robot becomes a "Wise Old Professor." It thinks very slowly and carefully, gathers lots of data, and only makes a change when it is 100% sure. Its advice is very reliable but might come a little late.
Turn it UP (15-20): The robot becomes a "Hyper-Reactive Teenager." It has a short attention span, reacts instantly to everything it sees, and changes its mind constantly. It's super-fast to new information but might get faked out a lot.
The Default (10): A "Skilled Professional." The perfect balance of thoughtful and responsive. Start here.
🧠 Adaptive Engine:
Enable Adaptive System: This is the main power button for your robot. Turn it off, and you're driving a normal, non-smart car. Turn it on, and the robot takes over the tuning.
Use Shadow Cycle: This turns on the robot's "practice laps." The robot can't learn without practicing. This must be on for the robot to work.
Lock ATR Bands: This is a visual choice. "Locked" means the safety lanes on your screen stay where your factory defaults put them (the robot still makes changes to the signals in the background). "Unlocked" means you see the safety lanes moving and changing shape in real-time as the robot tunes them.
🎯 Learning (Global + Risk):
What they are: These are the deep-level settings for how your robot's brain processes information.
Rolling Window Size: This is the robot's "Short-Term Memory." How many of the last few practice laps should it remember? A small number means it only cares about what just happened. A big number means it remembers the last hour of practice.
Learn Rate & Smooth Alpha: This is "How big of a change should the robot make?" and "How smoothly should it make the change?" Think of it as turning the steering wheel. A high learn rate is like yanking the wheel; a low one is like a gentle turn. The smoothing makes sure the turn is graceful.
WinRate Thresholds & PnL Cap: These are rules for the robot's learning. They tell it what a "good" or "bad" outcome looks like and tell it to ignore crazy, once-in-a-lifetime events so its memory doesn't get corrupted.
--- SECTION 3: THE GARAGE (RISK, MEMORY & VISUALS) ---
⚠️ Risk Management:
What they are: These are safety rules you can give to your co-pilot for your own awareness. They appear on the dashboard.
The settings: You can set a max number of trades, a max loss for the day, and a "time out" period after a few losses.
Apply Risk to Shadow: This is an important switch. If you turn this ON, your safety rules also apply to the robot's practice laps. If you hit your max loss, the robot stops practicing and learning. It's recommended to leave this OFF so the robot can learn 24/7, even if you have stopped trading.
🗺️ Cognitive Map, STM & Checkpoints:
What it is: The robot's "Long-Term Memory" or its entire library of racing experience.
Use Cognitive Map & STM: These switches turn on the long-term and short-term memory banks. You want these on for the smartest robot.
Map Settings (Grid, Sigma, Half-Life): These are very advanced settings for neuroscientists. They control how the robot's brain is structured and how it forgets old information. The defaults are expertly tuned.
The Checkpoint System: This is the "Save Your Game" button for the robot.
To Save: Check Emit Checkpoint Now. Go to your alert log, and you will see a very long password. Copy this password.
To Load: Paste that password into the Memory Checkpoint box. Then, check Apply Checkpoint On Next Bar. The robot will instantly download all of its saved memories and experience.
🎨 Visuals & 🧩 Display Params:
What they are: These are all about how your screen looks.
You can control everything: The size and shape of the little diamonds (Entry Orbs), whether you see the purple Adapt Pulse, and where the Dashboards appear on your screen. You can change the Theme to Dark, Light, or Neon. These settings don't change how the robot thinks, only how it presents its information to you.
Chapter 4: The Command Center - Decoding the Dashboard
PANEL A (INFLECTION NEXUS): Your high-level mission control, showing the engine's classification of the current Market Context and the performance summary of the Shadow Portfolio.
PANEL B (SHADOW PORTFOLIO ADAPTIVE): Your deep diagnostic screen.
Performance Metrics: View advanced risk-adjusted stats like the Sharpe Ratio to understand the quality of the market movements the engine is learning from.
Adaptive Parameters (Live vs Base): THIS IS THE MOST CRITICAL SECTION. It shows the engine's Live parameters right next to your (Base) inputs. When the Live values deviate, the engine is communicating its learned wisdom to you. For example, a Live ATR Multiplier of 2.5 versus your Base of 1.4 is the engine telling you: "Caution. The market is currently experiencing high fake-outs and requires giving positions more room to breathe." This section is a direct translation of the engine's learning into actionable insight.
Chapter 5: Reading the Canvas - On-Chart Visuals
The Bands (Green/Blue Lines): These are not static Supertrend lines. They are the physical manifestation of the engine's current thinking. As the engine learns and adapts its ATR Period and Multiplier, you will see these bands widen, tighten, and adjust their distance from price. They are alive.
The Labels (BUY/SELL): These are the final output of the "Turning Point" logic, now supercharged and informed by the fully adaptive SPA engine.
The Purple Pulse (Dot and Background Glow): This is your visual cue that the engine is "thinking." Every time you see this pulse, it means the SPA has just completed a learning cycle and updated its parameters. It is actively recalibrating itself to the market.
Chapter 6: A Manifesto on Innovation and Community
I want to conclude with a personal note on why I dedicate countless hours to building systems like this and sharing them openly.
My purpose is to drive innovation, period. I am not in this space to follow the crowd or to re-package old ideas. The world does not need a 100th version of a slightly modified MACD. Real progress, real breakthroughs, come from venturing into the wilderness, from asking "what if?" and from pursuing concepts that lie at the very edge of possibility.
I am not afraid of being wrong. I am not afraid of being bested by my peers. In fact, I welcome it. If another developer takes an idea from this engine, improves it, and builds something even more magnificent, that is a profound win for our entire community. The only failure I recognize is the failure to try. The only trap I fear is the creative complacency of producing sterile, recycled work just to appease the status quo.
I love this community, and I believe with every fiber of my being that we have barely scratched the surface of what can be discovered and created. This script is my contribution to that shared journey. It is a tool, an idea, and a challenge to all of us: let's keep pushing.
DISCLAIMER: This script is an advanced analytical tool provided for educational and research purposes ONLY. It does not constitute financial advice. All trading involves substantial risk of loss. Past performance is not indicative of future results. Please use this tool responsibly and as part of a comprehensive trading plan.
As the great computer scientist Herbert A. Simon, a pioneer of artificial intelligence, famously said:
"Learning is any process by which a system improves performance from experience."
*Tooltips were updated with a comprehensive guide
May this engine enhance your experience.
— Dskyz, for DAFE Trading Systems
cd_bsl_ssl_CxGeneral
This indicator is designed to show the levels where stop-loss orders from buyers and sellers are most likely clustered.
Swing levels formed on the aligned higher time frame (HTF) are displayed on the chart as Buy Side Liquidity (BSL) and Sell Side Liquidity (SSL).
________________________________________
Menu & Usage
• HTF Selection:
o In “Auto” mode, the HTF is selected automatically.
o In “Manual” mode, the user can choose the HTF themselves.
• Bar Control:
By adjusting the bar control value, the user can define the number of bars required for a valid BSL or SSL sweep.
This option helps keep the number of alerts under control.
________________________________________
I’d be happy to hear your feedback and suggestions.
Happy trading! 🎉
Strong BUY/SELL with BB + RSI + MACD (with alerts)Outer Bands (same as before)
BUY when price < lower BB + RSI < 30 + MACD bullish.
SELL when price > upper BB + RSI > 70 + MACD bearish.
Middle Band (new addition)
BUY when price crosses above middle band (basis) AND RSI > 50 + MACD bullish.
SELL when price crosses below middle band (basis) AND RSI < 50 + MACD bearish.
Options Max Pain Calculator [BackQuant]Options Max Pain Calculator
A visualization tool that models option expiry dynamics by calculating "max pain" levels, displaying synthetic open interest curves, gamma exposure profiles, and pin-risk zones to help identify where market makers have the least payout exposure.
What is Max Pain?
Max Pain is the theoretical expiration price where the total dollar value of outstanding options would be minimized. At this price level, option holders collectively experience maximum losses while option writers (typically market makers) have minimal payout obligations. This creates a natural gravitational pull as expiration approaches.
Core Features
Visual Analysis Components:
Max Pain Line: Horizontal line showing the calculated minimum pain level
Strike Level Grid: Major support and resistance levels at key option strikes
Pin Zone: Highlighted area around max pain where price may gravitate
Pain Heatmap: Color-coded visualization showing pain distribution across prices
Gamma Exposure Profile: Bar chart displaying net gamma at each strike level
Real-time Dashboard: Summary statistics and risk metrics
Synthetic Market Modeling**
Since Pine Script cannot access live options data, the indicator creates realistic synthetic open interest distributions based on configurable market parameters including volume patterns, put/call ratios, and market maker positioning.
How It Works
Strike Generation:
The tool creates a grid of option strikes centered around the current price. You can control the range, density, and whether strikes snap to realistic market increments.
Open Interest Modeling:
Using your inputs for average volume, put/call ratios, and market maker behavior, the indicator generates synthetic open interest that mirrors real market dynamics:
Higher volume at-the-money with decay as strikes move further out
Adjustable put/call bias to reflect current market sentiment
Market maker inventory effects and typical short-gamma positioning
Weekly options boost for near-term expirations
Pain Calculation:
For each potential expiry price, the tool calculates total option payouts:
Call options contribute pain when finishing in-the-money
Put options contribute pain when finishing in-the-money
The strike with minimum total pain becomes the Max Pain level
Gamma Analysis:
Net gamma exposure is calculated at each strike using standard option pricing models, showing where hedging flows may be most intense. Positive gamma creates price support while negative gamma can amplify moves.
Key Settings
Basic Configuration:
Number of Strikes: Controls grid density (recommended: 15-25)
Days to Expiration: Time until option expiry
Strike Range: Price range around current level (recommended: 8-15%)
Strike Increment: Spacing between strikes
Market Parameters:
Average Daily Volume: Baseline for synthetic open interest
Put/Call Volume Ratio: Market sentiment bias (>1.0 = bearish, <1.0 = bullish) It does not work if set to 1.0
Implied Volatility: Current option volatility estimate
Market Maker Factors: Dealer positioning and hedging intensity
Display Options:
Model Complexity: Simple (line only), Standard (+ zones), Advanced (+ heatmap/gamma)
Visual Elements: Toggle individual components on/off
Theme: Dark/Light mode
Update Frequency: Real-time or daily calculation
Reading the Display
Dashboard Table (Top Right):
Current Price vs Max Pain Level
Distance to Pain: Percentage gap (smaller = higher pin risk)
Pin Risk Assessment: HIGH/MEDIUM/LOW based on proximity and time
Days to Expiry and Strike Count
Model complexity level
Visual Elements:
Red Line: Max Pain level where payout is minimized
Colored Zone: Pin risk area around max pain
Dotted Lines: Major strike levels (green = support, orange = resistance)
Color Bar: Pain heatmap (blue = high pain, red = low pain/max pain zones)
Horizontal Bars: Gamma exposure (green = positive, red = negative)
Yellow Dotted Line: Gamma flip level where hedging behavior changes
Trading Applications
Expiration Pinning:
When price is near max pain with limited time remaining, there's increased probability of gravitating toward that level as market makers hedge their positions.
Support and Resistance:
High open interest strikes often act as magnets, with max pain representing the strongest gravitational pull.
Volatility Expectations:
Above gamma flip: Expect dampened volatility (long gamma environment)
Below gamma flip: Expect amplified moves (short gamma environment)
Risk Assessment:
The pin risk indicator helps gauge likelihood of price manipulation near expiry, with HIGH risk suggesting potential range-bound action.
Best Practices
Setup Recommendations
Start with Model Complexity set to "Standard"
Use realistic strike ranges (8-12% for most assets)
Set put/call ratio based on current market sentiment
Adjust implied volatility to match current levels
Interpretation Guidelines:
Small distance to pain + short time = high pin probability
Large gamma bars indicate key hedging levels to monitor
Heatmap intensity shows strength of pain concentration
Multiple nearby strikes can create wider pin zones
Update Strategy:
Use "Daily" updates for cleaner visuals during trading hours
Switch to "Every Bar" for real-time analysis near expiration
Monitor changes in max pain level as new options activity emerges
Important Disclaimers
This is a modeling tool using synthetic data, not live market information. While the calculations are mathematically sound and the modeling realistic, actual market dynamics involve numerous factors not captured in any single indicator.
Max pain represents theoretical minimum payout levels and suggests where natural market forces may create gravitational pull, but it does not guarantee price movement or predict exact expiration levels. Market gaps, news events, and changing volatility can override these dynamics.
Use this tool as additional context for your analysis, not as a standalone trading signal. The synthetic nature of the data makes it most valuable for understanding market structure and potential zones of interest rather than precise price prediction.
Technical Notes
The indicator uses established option pricing principles with simplified implementations optimized for Pine Script performance. Gamma calculations use standard financial models while pain calculations follow the industry-standard definition of minimized option payouts.
All visual elements use fixed positioning to prevent movement when scrolling charts, and the tool includes performance optimizations to handle real-time calculation without timeout errors.
Market Structure by Gemini [v1.3]HH, HL, LH, LL indicator + BoS indicator. I'm now fully immersed in extracting the essential elements. I've pinpointed three critical concepts: Break and Retest (B&R), Liquidity Sweep & Reaction, and Market Structure (MS). My current focus is on the interactions between these components and on translating them into executable Pine Script instructions, starting with the simplest implementations.
BOCS Adaptive🚀 BOCS Adaptive - Advanced Dynamic Volatility Breakout Channel System
Enhanced version of AlgoAlpha's Smart Money Breakout Channels with adaptive ATR-based risk management for professional-grade trading signals.
📜 CREDITS & ATTRIBUTION:
This indicator is based on the original "Smart Money Breakout Channels" by AlgoAlpha (). Full credit goes to AlgoAlpha for the innovative breakout channel detection methodology. This enhanced version adds adaptive ATR-based TP/SL functionality and advanced volume analysis features.
🔬 THE BOCS METHODOLOGY EXPLAINED:
What is BOCS?
BOCS (Breakout Channel System) is AlgoAlpha's sophisticated algorithm that identifies high-probability breakout opportunities by analyzing normalized price volatility patterns. Unlike traditional support/resistance methods, BOCS uses mathematical normalization to detect when markets are consolidating before explosive moves.
📊 HOW THE CHANNEL DETECTION WORKS (Original AlgoAlpha Method):
Step 1: Price Normalization
Calculates the highest high and lowest low over a specified period (default 100 bars)
Normalizes current price position within this range: (close - lowest) / (highest - lowest)
This creates a 0-1 scale that works across all markets and timeframes
Step 2: Volatility Analysis
Applies standard deviation to the normalized price over 14 periods
Identifies volatility peaks and troughs using specialized algorithms
Tracks volatility cycles to predict consolidation phases
Step 3: Channel Formation
Detects when volatility crosses from high to low (consolidation begins)
Creates dynamic channels using the highest/lowest points during consolidation
Channels automatically expand/contract based on price action
Minimum 10-bar duration ensures meaningful consolidation patterns
Step 4: Breakout Detection
Strong Closes Mode: Requires >50% of candle body outside channel (reduces false signals from wicks)
Any Touch Mode: Triggers on any price movement outside channel boundaries
Volume confirmation analysis validates breakout strength
🆕 ENHANCED FEATURES (This Version):
⚡ Adaptive ATR Risk Management:
Revolutionary Volatility-Based TP/SL System:
Traditional fixed pip/tick stops don't account for changing market conditions. This enhanced version adds ATR (Average True Range) multipliers to create dynamic TP/SL levels that automatically adjust to current volatility.
ATR Calculation Process:
Select any timeframe for ATR source (1min, 5min, 15min, etc.)
Uses customizable period length (default 14) for smoothing
Calculates: TP Distance = ATR × Multiplier
Updates continuously as market volatility changes
Example Setup:
Chart: 5-minute NQ futures
ATR Source: 1-minute timeframe
Current 1min ATR: 4.36 points
TP1 Multiplier: 2.0 → TP1 = 8.72 points from entry
TP2 Multiplier: 3.5 → TP2 = 15.26 points from entry
SL Multiplier: 1.0 → SL = 4.36 points from entry
📈 ENHANCED VOLUME ANALYSIS SYSTEM:
Three Advanced Volume Modes (Enhanced from Original):
1. Volume Mode:
Displays total volume relative to 20-period moving average
Visual transparency indicates volume strength
Helps identify accumulation/distribution phases
2. Comparison Mode:
Separates up volume (green) vs down volume (red)
Shows buying vs selling pressure within channels
Critical for breakout direction bias
3. Delta Mode:
Calculates net volume delta (up volume - down volume)
Positive delta = buying pressure (above midline)
Negative delta = selling pressure (below midline)
Uses multi-timeframe data for granular analysis
🎯 VOLUME CONFIRMATION ALGORITHM (Enhanced):
Breakout Validation System:
Compares breakout volume to 20-period average
CONFIRMED: Volume >120% of average (strong breakout)
WEAK: Volume 80-120% of average (proceed with caution)
FAILED: Volume <80% of average (likely false breakout)
Volume Gauge Feature (New):
Real-time volume delta visualization
Color-coded pressure indicator (red to green spectrum)
Shows current positioning within high/low volume range
Updates continuously during active channels
📊 COMPREHENSIVE TRADE MONITORING (Enhanced):
Real-Time Analysis Table:
Trade status and direction
Channel formation status
Current ATR value and timeframe
Calculated TP/SL distances with multipliers
Last breakout analysis with volume confirmation
Current vs average volume comparison
Volume strength rating (Very High/High/Normal/Low)
🔔 INTELLIGENT ALERT SYSTEM (Enhanced):
Six Alert Types:
New Channel Formation - Consolidation pattern detected
Bullish Breakout - Upward channel break with entry price
Bearish Breakout - Downward channel break with entry price
Take Profit 1 Hit - First target reached (New)
Take Profit 2 Hit - Second target reached (New)
Stop Loss Hit - Risk management triggered (New)
🎨 VISUAL FEATURES (Enhanced):
Channel Visualization (Original AlgoAlpha Design):
Semi-transparent main channel box
Colored upper/lower zones (red=resistance, green=support)
Dashed center line for reference
Volume bars within channels
Real-time volume gauge (new)
TP/SL Display (New Enhancement):
White entry line with price label
Green TP lines with distance calculations
Red SL line with distance calculation
Customizable line lengths and colors
Shows both price levels AND point distances
⚙️ ADVANCED CUSTOMIZATION (Enhanced):
Original AlgoAlpha Settings:
Nested channels (multiple overlapping) or single channel mode
Strong closes only vs any touch breakouts
Normalization and detection lengths
Volume analysis timeframe selection
New ATR Risk Management Settings:
Independent ATR timeframe selection
Customizable ATR calculation period
Separate multipliers for TP1, TP2, and SL
Toggle TP2 on/off as needed
Enhanced Display Options:
Four table positions with offset controls
Three table sizes (Small/Normal/Large)
Volume text sizing and positioning
Complete color customization
Show/hide individual components
📈 OPTIMAL USE CASES:
Scalping (1-5 minute charts):
Use 1-minute ATR for responsive risk management
Enable strong closes mode for cleaner signals
Monitor volume confirmation closely
Day Trading (5-30 minute charts):
Use 5-minute ATR for balanced approach
Enable nested channels for multiple setups
Focus on volume delta for direction bias
Swing Trading (1-4 hour charts):
Use 15-30 minute ATR for stable levels
Longer detection periods for significant channels
Emphasize volume confirmation for major moves
📊 COMPATIBLE MARKETS:
✅ Forex pairs (EUR/USD, GBP/USD, USD/JPY, etc.)
✅ Stock indices (SPY, QQQ, IWM, DIA)
✅ Futures (ES, NQ, YM, RTY, CL, GC)
✅ Individual stocks (AAPL, TSLA, GOOGL, etc.)
✅ Cryptocurrencies (BTC, ETH, altcoins)
✅ Commodities (Gold, Silver, Oil, etc.)
🙏 ACKNOWLEDGMENTS:
Special thanks to AlgoAlpha for creating the original Smart Money Breakout Channels indicator and sharing it with the TradingView community. Their innovative approach to breakout detection formed the foundation for this enhanced version. Please support the original creator by checking out their other excellent indicators.
⚠️ RISK DISCLAIMER:
This indicator is designed for educational and analytical purposes only. Trading involves substantial risk of loss and is not suitable for all investors. Past performance does not guarantee future results. The BOCS Adaptive system, while sophisticated, should be used as part of a comprehensive trading strategy that includes proper risk management, position sizing, and market analysis. Always conduct your own due diligence and consider consulting with a qualified financial advisor before making trading decisions. No system can guarantee profitable trades, and users should never risk more than they can afford to lose.
Institutional Levels (CNN) - [PhenLabs]📊Institutional Levels (Convolutional Neural Network-inspired)
Version : PineScript™v6
📌Description
The CNN-IL Institutional Levels indicator represents a breakthrough in automated zone detection technology, combining convolutional neural network principles with advanced statistical modeling. This sophisticated tool identifies high-probability institutional trading zones by analyzing pivot patterns, volume dynamics, and price behavior using machine learning algorithms.
The indicator employs a proprietary 9-factor logistic regression model that calculates real-time reaction probabilities for each detected zone. By incorporating CNN-inspired filtering techniques and dynamic zone management, it provides traders with unprecedented accuracy in identifying where institutional money is likely to react to price action.
🚀Points of Innovation
● CNN-Inspired Pivot Analysis - Advanced binning system using convolutional neural network principles for superior pattern recognition
● Real-Time Probability Engine - Live reaction probability calculations using 9-factor logistic regression model
● Dynamic Zone Intelligence - Automatic zone merging using Intersection over Union (IoU) algorithms
● Volume-Weighted Scoring - Time-of-day volume Z-score analysis for enhanced zone strength assessment
● Adaptive Decay System - Intelligent zone lifecycle management based on touch frequency and recency
● Multi-Filter Architecture - Optional gradient, smoothing, and Difference of Gaussians (DoG) convolution filters
🔧Core Components
● Pivot Detection Engine - Advanced pivot identification with configurable left/right bars and ATR-normalized strength calculations
● Neural Network Binning - Price level clustering using CNN-inspired algorithms with ATR-based bin sizing
● Logistic Regression Model - 9-factor probability calculation including distance, width, volume, VWAP deviation, and trend analysis
● Zone Management System - Intelligent creation, merging, and decay algorithms for optimal zone lifecycle control
● Visualization Layer - Dynamic line drawing with opacity-based scoring and optional zone fills
🔥Key Features
● High-Probability Zone Detection - Automatically identifies institutional levels with reaction probabilities above configurable thresholds
● Real-Time Probability Scoring - Live calculation of zone reaction likelihood using advanced statistical modeling
● Session-Aware Analysis - Optional filtering to specific trading sessions for enhanced accuracy during active market hours
● Customizable Parameters - Full control over lookback periods, zone sensitivity, merge thresholds, and probability models
● Performance Optimized - Efficient processing with controlled update frequencies and pivot processing limits
● Non-Repainting Mode - Strict mode available for backtesting accuracy and live trading reliability
🎨Visualization
● Dynamic Zone Lines - Color-coded support and resistance levels with opacity reflecting zone strength and confidence scores
● Probability Labels - Real-time display of reaction probabilities, touch counts, and historical hit rates for active zones
● Zone Fills - Optional semi-transparent zone highlighting for enhanced visual clarity and immediate pattern recognition
● Adaptive Styling - Automatic color and opacity adjustments based on zone scoring and statistical significance
📖Usage Guidelines
● Lookback Bars - Default 500, Range 100-1000, Controls the historical data window for pivot analysis and zone calculation
● Pivot Left/Right - Default 3, Range 1-10, Defines the pivot detection sensitivity and confirmation requirements
● Bin Size ATR units - Default 0.25, Range 0.1-2.0, Controls price level clustering granularity for zone creation
● Base Zone Half-Width ATR units - Default 0.25, Range 0.1-1.0, Sets the minimum zone width in ATR units for institutional level boundaries
● Zone Merge IoU Threshold - Default 0.5, Range 0.1-0.9, Intersection over Union threshold for automatic zone merging algorithms
● Max Active Zones - Default 5, Range 3-20, Maximum number of zones displayed simultaneously to prevent chart clutter
● Probability Threshold for Labels - Default 0.6, Range 0.3-0.9, Minimum reaction probability required for zone label display and alerts
● Distance Weight w1 - Controls influence of price distance from zone center on reaction probability
● Width Weight w2 - Adjusts impact of zone width on probability calculations
● Volume Weight w3 - Modifies volume Z-score influence on zone strength assessment
● VWAP Weight w4 - Controls VWAP deviation impact on institutional level significance
● Touch Count Weight w5 - Adjusts influence of historical zone interactions on probability scoring
● Hit Rate Weight w6 - Controls prior success rate impact on future reaction likelihood predictions
● Wick Penetration Weight w7 - Modifies wick penetration analysis influence on probability calculations
● Trend Weight w8 - Adjusts trend context impact using ADX analysis for directional bias assessment
✅Best Use Cases
● Swing Trading Entries - Enter positions at high-probability institutional zones with 60%+ reaction scores
● Scalping Opportunities - Quick entries and exits around frequently tested institutional levels
● Risk Management - Use zones as dynamic stop-loss and take-profit levels based on institutional behavior
● Market Structure Analysis - Identify key institutional levels that define current market structure and sentiment
● Confluence Trading - Combine with other technical indicators for high-probability trade setups
● Session-Based Strategies - Focus analysis during high-volume sessions for maximum effectiveness
⚠️Limitations
● Historical Pattern Dependency - Algorithm effectiveness relies on historical patterns that may not repeat in changing market conditions
● Computational Intensity - Complex calculations may impact chart performance on lower-end devices or with multiple indicators
● Probability Estimates - Reaction probabilities are statistical estimates and do not guarantee actual market outcomes
● Session Sensitivity - Performance may vary significantly between different market sessions and volatility regimes
● Parameter Sensitivity - Results can be highly dependent on input parameters requiring optimization for different instruments
💡What Makes This Unique
● CNN Architecture - First indicator to apply convolutional neural network principles to institutional-level detection
● Real-Time ML Scoring - Live machine learning probability calculations for each zone interaction
● Advanced Zone Management - Sophisticated algorithms for zone lifecycle management and automatic optimization
● Statistical Rigor - Comprehensive 9-factor logistic regression model with extensive backtesting validation
● Performance Optimization - Efficient processing algorithms designed for real-time trading applications
🔬How It Works
● Multi-timeframe pivot identification - Uses configurable sensitivity parameters for advanced pivot detection
● ATR-normalized strength calculations - Standardizes pivot significance across different volatility regimes
● Volume Z-score integration - Enhanced pivot weighting based on time-of-day volume patterns
● Price level clustering - Neural network binning algorithms with ATR-based sizing for zone creation
● Recency decay applications - Weights recent pivots more heavily than historical data for relevance
● Statistical filtering - Eliminates low-significance price levels and reduces market noise
● Dynamic zone generation - Creates zones from statistically significant pivot clusters with minimum support thresholds
● IoU-based merging algorithms - Combines overlapping zones while maintaining accuracy using Intersection over Union
● Adaptive decay systems - Automatic removal of outdated or low-performing zones for optimal performance
● 9-factor logistic regression - Incorporates distance, width, volume, VWAP, touch history, and trend analysis
● Real-time scoring updates - Zone interaction calculations with configurable threshold filtering
● Optional CNN filters - Gradient detection, smoothing, and Difference of Gaussians processing for enhanced accuracy
💡Note
This indicator represents advanced quantitative analysis and should be used by traders familiar with statistical modeling concepts. The probability scores are mathematical estimates based on historical patterns and should be combined with proper risk management and additional technical analysis for optimal trading decisions.
Larry Williams Donchian Breakout StrategyThis strategy is based on a breakout of the Donchian Channel with customizable risk-reward parameters and optional entry filters. It combines visual elements from the Donchian Channel indicator with a fully executable trading logic.
How entries are generated
A long trade is opened when the chosen signal price (either bar’s High or Close) closes above the upper Donchian Channel on each of the three previous bars.
A short trade is opened when the chosen signal price (either bar’s Low or Close) closes below the lower Donchian Channel on each of the three previous bars.
Both long and short signals can be configured to use either High/Low or Close values for confirmation.
Stop Loss and Take Profit
The Stop Loss is automatically placed relative to the Donchian middle line with a user-defined offset.
The Take Profit is calculated using a Risk/Reward multiplier.
Separate risk-reward ratios can be set for long and short positions.
Visual elements
The Donchian Channel (upper, lower, and middle bands) is plotted on the chart.
High-High, Higher-Low, Lower-High, and Lower-Low markers are displayed when pivot conditions are met.
Each trade is visualized with three horizontal lines drawn for a limited number of recent trades:
Entry (blue)
Stop Loss (red)
Take Profit (green)
To keep the chart clean, only the last ten trades (30 lines in total) remain visible.
Entry filters
Two optional filters are included and can be enabled or disabled independently:
LWTI filter – Long trades are only allowed when the Larry Williams Trade Index is green, and short trades are only allowed when the index is red.
Volume filter – Trades are only allowed when the current volume is above its 30-period SMA.
Use case
The strategy is designed to test Donchian Channel breakout conditions with risk management and simple filters. It can serve as a foundation for further development, allowing traders to experiment with additional filters or money management rules.
Disclaimer
This strategy is for educational and research purposes only. It is not financial advice. Always test thoroughly before using any strategy in live trading, and make trading decisions at your own risk.
AlgoPilotX - Breakout & Breakdown Meter (v1)Version Note:
This is a revised and improved version of the AlgoPilotX – Breakout & Breakdown Meter. It includes expanded explanations of the underlying logic, variable usage, and originality to comply with TradingView guidelines.
AlgoPilotX – Breakout & Breakdown Meter is a structured trading tool that combines Fair Value Gap (FVG) detection, session-based support/resistance breakouts, and a clean market condition info panel. It’s designed to help traders spot potential setups early and confirm stronger breakouts or breakdowns with context from momentum, volatility, and trend indicators.
How It Works
Session Levels → The first candle high/low of the session defines dynamic support/resistance. Unlike static pivots, these levels update with each new trading session and reflect real intraday sentiment.
Fair Value Gaps (FVGs) → A three-candle imbalance highlights inefficiencies. When detected, the script marks the open of the third candle as a potential entry (light green/red arrow).
Pullback Confirmations → If price pulls back into session support/resistance and then breaks away strongly, a stronger entry signal (dark green/red arrow) is plotted.
Breakouts & Breakdowns → Additional arrows appear when price crosses decisively above resistance or below support.
Signal Hierarchy → Arrows vary by color/size:
Light = early/potential setups.
Dark/Large = stronger confirmations.
Info Panel Dashboard → RSI, MACD, Bollinger Bands, and EMAs are displayed in a compact table with both numeric values and Bullish/Bearish/Neutral states, color-coded for quick interpretation.
How the Functions and Variables Work Together
Session Levels (Support & Resistance)
The script uses time() and session inputs to identify the first candle of the chosen trading session.
Variables sessionHigh and sessionLow are stored with var so they persist until the next session.
These levels are then plotted as dynamic support/resistance lines. This approach is different from static pivots or daily highs/lows, because it adapts in real-time to the market open.
Fair Value Gap (FVG) Detection
Conditions check for three-candle imbalances ( low > high for bullish, high < low for bearish).
When detected, a potential entry is marked at the open of the third candle.
Variables fvgBull and fvgBear define this logic , making FVGs a core entry condition rather than a side overlay.
Entry Hierarchy (Light vs. Dark Arrows)
longPotentialEntry and shortPotentialEntry mark light green/red arrows as early signals.
pullbackToSupport and pullbackToResistance build on these by requiring price to return to session levels and then break away again.
This creates the dark green/red arrows for stronger entries, introducing a two-step filtering process.
Breakout & Breakdown Detection
breakAbove = ta.crossover(close, sessionHigh)
breakBelow = ta.crossunder(close, sessionLow)
These conditions confirm true breakouts or breakdowns beyond support/resistance, reducing noise.
Info Panel Construction
A table is created and updated each bar.
Functions like ta.rsi(), ta.ema(), ta.sma(), and ta.stdev() calculate RSI, MACD, EMAs, and Bollinger Bands.
Each indicator’s state is summarized into human-readable text (e.g., “Bullish,” “Bearish,” “Above,” “Oversold”) and displayed with color coding using the helper function f_stateColor().
Values are also displayed numerically (RSI, MACD histogram, EMA levels, BB width), making this a dashboard rather than just arrows on a chart.
Helper Function for States
f_stateColor(state) translates qualitative states into consistent colors (green for bullish/above, red for bearish/below, orange for neutral, purple for overbought/oversold).
This ensures that every signal in the info panel has a visual identity that traders can read instantly.
Alerts Integration
alertcondition() is tied to each major event: FVG potential entries, strong pullback confirmations, and breakout/breakdown signals.
This allows the script to be used for alerts, notifications and automation , not just visual charting.
How to Use
1. Default timeframe = 15m (adjustable).
2. The first session candle defines support & resistance.
3. Watch for arrows:
Light green (▲) below candle → Potential breakout long (FVG detected).
Dark green (▲) below candle → Strong breakout confirmation after pullback.
Light red (▼) above candle → Potential breakdown short (FVG detected).
Dark red (▼) above candle → Strong breakdown confirmation after pullback.
Larger arrows = higher confidence signals.
4. Check the Info Panel for context:
RSI → momentum
MACD → trend confirmation
Bollinger Bands → overbought/oversold
EMA20 & EMA50 → short- and medium-term trend bias
5. Always confirm with your own price action, volume, and risk management rules.
6. Easily move the Info Panel to any corner of the chart via settings to keep your view clear.
Why This Structure Is Original
Not a mashup : Instead of simply overlaying RSI, MACD, or EMAs, the script integrates them into a signal-filtering framework.
Dynamic anchoring: Session-based high/low variables make levels adaptive to intraday structure, unlike fixed pivots.
Dual entry tiering: Light vs. dark arrows are built by combining FVGs + pullback conditions, offering nuance most breakout scripts lack.
Dashboard-style panel: Variables are summarized into a real-time info box with both numbers and state labels, replacing multiple chart overlays with one compact tool.
Modular functions: Breakout, pullback, FVG detection, and indicator states are modularized with separate variables — making the script flexible, extendable, and unique in design.
Disclaimer
This script is for educational purposes only. It does not constitute financial advice and does not guarantee profitable outcomes. Always backtest thoroughly, paper trade, and use proper risk management before trading live.
BUY/SELL ✅ Fibonacci FULL TP 1-2-3-4 SL ATRUSE SL ATR
الفكرة العامة
تحديد الاتجاه (Bias):
يعتمد على المتوسط المتحرك 20 (SMA).
يقارن موقع الإغلاق داخل نطاق الشمعة.
يستخدم مؤشر انحراف (Linear Regression) كعامل إضافي.
إذا تحققت الشروط = إشارة شراء قوية (Bullish) أو بيع قوية (Bearish).
مستويات الدخول (ENTRY):
يتم حسابها من مناطق الـ OB (أعلى/أدنى سعر خلال عدد معين من الشموع).
يتم ضبطها باستخدام نسبة فيبوناتشي (افتراضياً 0.382).
وقف الخسارة (SL):
إما باستخدام OB (ذيل الشمعة السابقة). غير مستخسن
أو باستخدام مسافة ثابتة/ATR (حسب الإعدادات). مستخسن
أهداف الأرباح (TP1–TP4):
محسوبة كنِسب مضاعفة من قيمة المخاطرة (Risk).
مستويات TP مضبوطة بقيم فيبوناتشي (افتراضياً 1.15 – 1.85 – 2.618 – 3.618).
الرسم على الشارت:
يرسم خطوط أفقية لكل من: ENTRY – SL – TP1–TP4.
يضيف Labels ملونة (BUY باللون الأخضر، SELL بالبرتقالي).
الجدول (Table):
يظهر في الزاوية العلوية اليمنى.
يحتوي على تفاصيل الصفقة (النوع، ENTRY، SL، TP1–TP4).
التنبيهات (Alerts):
يصدر تنبيه عند ظهور إشارة شراء قوية أو بيع قوية.
General Idea
Bias Detection:
Based on the 20-period Simple Moving Average (SMA).
Compares the closing price position within the candle range.
Uses Linear Regression as an additional factor.
If conditions are met = strong Buy (Bullish) or strong Sell (Bearish) signal.
Entry Levels (ENTRY):
Calculated from OB zones (highest/lowest price within a certain number of candles).
Adjusted using Fibonacci ratio (default 0.382).
Stop Loss (SL):
Either using OB (previous candle’s wick) – not recommended.
Or using fixed distance/ATR (based on settings) – recommended.
Take Profit Targets (TP1–TP4):
Calculated as multiples of the risk value.
TP levels aligned with Fibonacci ratios (default 1.15 – 1.85 – 2.618 – 3.618).
Chart Drawing:
Draws horizontal lines for ENTRY – SL – TP1–TP4.
Adds colored labels (BUY in green, SELL in orange).
Table:
Displayed in the top-right corner.
Contains trade details (type, ENTRY, SL, TP1–TP4).
Alerts:
Sends an alert when a strong Buy or strong Sell signal appears.
Summary
This indicator:
Detects market bias (BUY/SELL).
Automatically calculates entry, stop loss, and targets.
Displays them on the chart with clear lines and colors.
Organizes the values inside a structured table.
Sends an alert with every new entry signal.
Buying, selling and setting goalsBuying, selling and setting goals
Buying, selling and setting goals
Strat Combo Detector (ATH)You can alter the timeframes and strat combos as described in the settings of the indicator. A tag will pop up with the strat combo on all time frames but presence of the strat combo will be specific to the timeframe chosen in the settings.
Peaks & Troughs (3L-3R, om-en-om)P&T is gemaakt voor de FVG strategie. verder geen info.
Hopelijk is dit voldoende.
StdDev Supertrend {CHIPA}StdDev Supertrend ~ C H I P A is a supertrend style trend engine that replaces ATR with standard deviation as the volatility core. It can operate on raw prices or log return volatility, with optional smoothing to control noise.
Key features include:
Supertrend trailing rails built from a stddev scaled envelope that flips the regime only when price closes through the opposite rail.
Returns-based mode that scales volatility by log returns for more consistent behavior across price regimes.
Optional smoothing on the volatility input to tune responsiveness versus stability.
Directional gap fill between price and the active trend line on the main chart; opacity adapts to the distance (vs ATR) so wide gaps read stronger and small gaps stay subtle.
Secondary pane view of the rails with the same adaptive fade, plus an optional candle overlay for context.
Clean alerts that fire once when state changes
Use cases: medium-term trend following, stop/flip systems, and visual regime confirmation when you prefer stddev-based distance over ATR.
Note: no walk-forward or robustness testing is implied; parameter choices and risk controls are on you.
Log Reg Channel-Trend w/ribbon color change alert [BigBeluga] This should give you an alert when the ribbon changes from red to green and visa versa.
The Dark Heaven Price Action indicatorcreated by professor Santhosh . The Dark Heaven trading academy Mysore! it will help to find the Higher High, Lower Lows of the market to enter the trade and trade in right direction.
Kaspareit VCP + TTM Squeeze ProKaspareit VCP + TTM Squeeze Pro
A combined tool for identifying volatility contractions and breakout setups. The VCP module (Volatility Contraction Pattern) detects contraction phases under trend filters, while the TTM Squeeze module evaluates compression via Bollinger Bands vs. Keltner Channels and adds a momentum oscillator. The result: clearly marked setup phases, pivot zones, and breakout signals.
What the indicator does
Detects potential VCP setups through falling ATR/True Range relative to the recent minimum, combined with a 3-step EMA trend filter.
Fixes a pivot zone above price to act as breakout reference.
Classifies TTM Squeeze compression levels in 4 colors and checks momentum.
Plots VCP potential (yellow dots), active breakouts (green dots), EMAs, pivot level, momentum histogram, and squeeze status.
Logic explained (simplified)
EMA trend filter (3-step): Close must be above EMA 50/100/200, and EMAs must be properly aligned. Only then VCP signals are valid.
VCP contraction: Current ATR compared to the lowest ATR over VCP period with tolerance factor. If volatility is sufficiently low, contraction is valid.
VCP timer: After a valid VCP, a window ( Max days after VCP ) remains active for breakout evaluation.
Pivot zone: Highest high of last Pivot lookback bars is fixed as Pivot level (red line).
Squeeze classification: Bollinger Band width vs. Keltner Channels gives 4 states: Green = no squeeze, Black = low, Red = mid, Orange = high.
Momentum: Regression-based oscillator evaluates directional impulse relative to smoothed price range.
Breakout: Valid if within active VCP window, close > pivot, EMA filter true, squeeze green, volume > previous bar, momentum > 0. Then Breakout active is marked.
Exit logic: Breakout state ends if volume < short-term average and True Range < short-term average.
Visualization & legend
EMA Short/Mid/Long: 3 lines for trend filter.
Pivot level: Red line, breakout threshold.
VCP potential: Yellow dots below candles when VCP criteria + (Momentum < 0 or Squeeze ≠ green).
Breakout active: Green dots below candles while breakout conditions hold.
Momentum histogram: Columns above chart edge if momentum > 0.
Squeeze status: Colored dots at 0-line: Orange = high, Red = mid, Black = low, Green = no squeeze.
Inputs (settings) and meaning
VCP inputs
VCP period (default 30): Window to detect ATR minimum. Larger = stricter, fewer signals.
Pivot resistance (lookback) (default 10): Bars used to fix pivot high. Lower = earlier, more sensitive levels.
Volatility tolerance (default 1.1): Factor above ATR minimum still considered “contraction.” Lower = stricter.
Volume comparison (Exit) (default 5): Length of average volume for breakout exit.
True Range comparison (Exit) (default 5): Length of TR average for breakout exit.
Max days after VCP (default 50): Time window for breakout after VCP.
EMA short/mid/long (default 50/100/200): Trend filter. Longer = smoother, fewer signals.
TTM Squeeze inputs
TTM Squeeze length (default 20): Base length for BB/KC.
Bollinger Band STD Multiplier (default 2.0): Width of BB. Higher = wider, fewer squeezes.
Keltner Channel #1/#2/#3 (default 1.5/2.0/3.0): Channel widths for low/mid/high squeeze classification.
Practical usage
Setup phase: Watch for aligned EMAs with price above all EMAs. Yellow dots = VCP potential, especially valuable if squeeze is red/orange.
Pivot observation: Red pivot level = breakout threshold.
Breakout trigger: Close above pivot, squeeze green, positive momentum, volume > previous bar → Breakout active .
Monitoring: Breakout state ends if volume and TR fall below short-term averages. This is a signal of weakening momentum , not an order exit rule.
Timeframes & markets: Works on all TFs with reliable data. Daily and H4 work well for trending stocks. For FX/CFDs, volume is tick volume.
Important notes & limitations
This is an indicator , not a strategy. It does not place orders or backtest results.
Pivot level and VCP state recalculate per bar. Pivot may move if new highs form.
Momentum histogram is scaled relative to recent range, not comparable across markets.
Squeeze colors are state labels, not trade signals. Always combine with trend filter.
No alerts included. You may add alertcondition if needed. Logic provides clear states (VCP potential, breakout active, squeeze status).
Tuning tips
See more contractions: Lower TTM length (e.g. 14–18), increase BB Mult slightly, or reduce KC Mult .
Stricter filter: Increase VCP period , lower Volatility tolerance , use longer EMAs.
Earlier breakouts: Reduce Pivot lookback , but risk more false signals.
Credits & license
VCP components: © Kaspareit-Trading.
TTM Squeeze components based on “Beardy Squeeze Pro” © Beardy_Fred.
TTM Squeeze code licensed under Mozilla Public License 2.0. License: mozilla.org
Disclaimer
This indicator is for educational and informational purposes only. It is not investment advice. Trading involves significant risk. Always test on demo accounts and use proper risk management.
Author’s notes
For questions or feedback, please send a private TradingView message with your username.
tancanxThis indicator works on a single panel, featuring the Gaussian Filter to show price direction, Chandelier Exit-based stop levels, and volume-based strong signals.
Jaxon007 Trend Cloud StrategyThe Jaxon007 Trend Cloud Strategy is a trend-following trading system that combines custom moving averages with ATR-based volatility zones to generate high-quality entries and exits. It is designed for traders who want to visualize trend strength and participate in retests during strong directional moves.
🔍 How It Works:
Trend Direction is determined by comparing a fast and slow moving average.
The selected moving average is adjusted using the Average True Range (ATR) to create dynamic volatility bands.
When price crosses above the adjusted band in an uptrend, it triggers a long entry.
When price crosses below the band in a downtrend, it triggers a short entry.
Exits occur when the trend reverses or when price crosses the band in the opposite direction.
⚙ Customizable Parameters:
MA Length – base moving average period.
MA Type – choose from SMA, EMA, SMMA (RMA), WMA, or VWMA.
ATR Length – fixed at 200 (can be made adjustable if needed).
Cloud Colors – customizable for uptrend and downtrend visuals.
Visual Features:
Trend Cloud formed between the base MA and ATR-adjusted band.
Buy/Sell Labels appear at valid entry points.
Clear color-coded lines for quick trend recognition.
Goldbach Time – algopathingThe Goldbach Time indicator highlights intra-day timestamps that align with curated “Goldbach” time transforms. It is a time-only study intended for timing research and session-rhythm confluence: it flags minutes where one or more simple transforms of the clock (e.g. hour + minute, hour − minute, minute ± 1) hit values from a predefined integer set. Traders use those flagged minutes as a time-based confluence input alongside price structure (PO3 / Goldbach price levels, order blocks, liquidity, etc.).
Trend Pro V2 [CRYPTIK1]Introduction: What is Trend Pro V2?
Welcome to Trend Pro V2! This analysis tool give you at-a-glance understanding of the market's direction. In a noisy market, the single most important factor is the dominant trend. Trend Pro V2 filters out this noise by focusing on one core principle: trading with the primary momentum.
Instead of cluttering your chart with confusing signals, this indicator provides a clean, visual representation of the trend, helping you make more confident and informed trading decisions.
The dashboard provides a simple, color-coded view of the trend across multiple timeframes.
The Core Concept: The Power of Confluence
The strength of any trading decision comes from confluence—when multiple factors align. Trend Pro V2 is built on this idea. It uses a long-term moving average (200-period EMA by default) to define the primary trend on your current chart and then pulls in data from three higher timeframes to confirm whether the broader market agrees.
When your current timeframe and the higher timeframes are all aligned, you have a state of "confluence," which represents a higher-probability environment for trend-following trades.
Key Features
1. The Dynamic Trend MA:
The main moving average on your chart acts as your primary guide. Its color dynamically changes to give you an instant read on the market.
Teal MA: The price is in a confirmed uptrend (trading above the MA).
Pink MA: The price is in a confirmed downtrend (trading below the MA).
The moving average changes color to instantly show you if the trend is bullish (teal) or bearish (pink).
2. The Multi-Timeframe (MTF) Trend Dashboard:
Located discreetly in the bottom-right corner, this dashboard is your window into the broader market sentiment. It shows you the trend status on three customizable higher timeframes.
Teal Box: The trend is UP on that timeframe.
Pink Box: The trend is DOWN on that timeframe.
Gray Box: The price is neutral or at the MA on that timeframe.
How to Use Trend Pro V2: A Simple Framework
Step 1: Identify the Primary Trend
Look at the color of the MA on your chart. This is your starting point. If it's teal, you should generally be looking for long opportunities. If it's pink, you should be looking for short opportunities.
Step 2: Check for Confluence
Glance at the MTF Trend Dashboard.
Strong Confluence (High-Probability): If your main chart shows an uptrend (Teal MA) and the dashboard shows all teal boxes, the market is in a strong, unified uptrend. This is a high-probability environment to be a buyer on dips.
Weak or No Confluence (Caution Zone): If your main chart shows an uptrend, but the dashboard shows pink or gray boxes, it signals disagreement among the timeframes. This is a sign of market indecision and a lower-probability environment. It's often best to wait for alignment.
Here, the daily trend is down, but the MTF dashboard shows the weekly trend is still up—a classic sign of weak confluence and a reason for caution.
Best Practices & Settings
Timeframe Synergy: For best results, use Trend Pro on a lower timeframe and set your dashboard to higher timeframes. For example, if you trade on the 1-hour chart, set your MTF dashboard to the 4-hour, 1-day, and 1-week.
Use as a Confirmation Tool: Trend Pro V2 is designed as a foundational layer for your analysis. First, confirm the trend, then use your preferred entry method (e.g., support/resistance, chart patterns) to time your trade.
This is a tool for the community, so feel free to explore the open-source code, adapt it, and build upon it. Happy trading!
For your consideration @TradingView