Swing Failure Signals [AlgoAlpha]🟠 OVERVIEW
This script detects swing failure patterns by tracking how price interacts with recent swing highs and lows, then confirming those sweeps with a change in candle behavior. The goal is to highlight areas where price briefly breaks a key level, fails to continue, and then shifts direction. These events often occur around liquidity runs, where stops are triggered before price reverses. The script draws levels, colors bars, and prints clear markers to help visualize where these failures occur and when they are confirmed.
🟠 CONCEPTS
The logic starts with pivot-based swing detection. Recent swing highs and lows are stored and monitored. When price trades beyond one of these levels within a defined historical window, it is treated as a sweep. A sweep alone is not enough. The script then waits for a Change in State of Delivery (CISD), which is defined by a shift in candle structure that shows follow-through in the opposite direction. A tolerance filter measures how far price traveled beyond the level relative to the reaction that followed. If the reaction is strong enough and happens within a limited number of bars, the sweep is validated as a swing failure. In short: the swing defines the reference, the sweep shows intent, and the CISD confirms acceptance or rejection.
🟠 FEATURES
Sweep detection with a maximum lookback to avoid outdated levels
CISD confirmation using candle structure and price expansion
Alert conditions for bullish and bearish swing failures
🟠 USAGE
Setup : Add the script to your chart. It works on any market and timeframe. Lower timeframes highlight intraday liquidity runs, while higher timeframes show structural failures. Start with the default inputs before adjusting.
Read the chart : A bullish swing failure occurs when price sweeps a prior low, then reverses and confirms with a bullish CISD. A bearish swing failure is the opposite, sweeping a prior high and confirming with a bearish CISD. Dashed lines mark the swept swing. Solid lines mark the CISD level. Bars are colored while the SFP state is active.
Settings that matter : Increasing Pivot Detection Length finds more significant swings but fewer signals. Reducing Max Pivot Point Edge limits how far back sweeps are allowed, keeping signals more current. The Patience setting controls how many bars are allowed for confirmation after a sweep. The Trend Noise Filter raises or lowers how strong the reaction must be to qualify as a valid failure.
Análisis de tendencia
Chainbey Ai - HTF Trend Matrix (Clean)Chainbey Ai – HTF Trend Matrix is a professional, higher-timeframe trend detection indicator designed to give traders a clean, reliable market bias, regardless of the chart timeframe they are trading on.
This indicator automatically analyzes multiple higher timeframes (HTFs) and combines:
EMA trend direction
Trend strength (ADX)
Market structure (trend vs range)
Trend disagreement across HTFs
Reversal probability estimation
All results are displayed in a compact table at the bottom-right, making it perfect for scalpers, day traders, and swing traders who need fast, decision-ready information.
🧠 What This Indicator Solves
❌ No more guessing the higher-timeframe trend
❌ No more trading against the main market bias
❌ No more confusion between trend vs range
✅ Clear BULLISH / BEARISH / RANGE bias
✅ Strength score to avoid weak trends
✅ Reversal probability to manage risk
📊 How to Read the Table (User Manual)
🔹 FINAL Row
Example:
FINAL | BEARISH TREND | -46
Text (BEARISH / BULLISH / RANGE) → Overall market bias
Number (-46) → Trend Strength Score
Trend Score Guide:
Score Meaning
0 to ±20 No trend / Choppy
±20 to ±40 Weak trend
±40 to ±70 Healthy trend
±70+ Very strong / extended trend
📌 Negative = Bearish
📌 Positive = Bullish
🔹 REVERSAL – Possibility (%)
Example:
REVERSAL | Possibility | 45%
This shows the chance of trend exhaustion or reversal.
Reversal % Meaning
0–30% Strong trend continuation
30–50% Normal pullback risk
50%+ High reversal probability
70%+ Dangerous to chase trades
📌 Use this to avoid late entries.
🔹 HTF Rows (60 / 240 / D)
Each row shows:
DIR / STRUCT
Direction from EMA trend
Market structure (TREND / RANGE)
ADX
Trend strength
STRONG / MEDIUM / CHOP
📌 If multiple HTFs agree → higher confidence
📌 If HTFs conflict → reduce position size or wait
🛠 Recommended Trading Usage
✅ Best Practices
Trade in the direction of FINAL trend
Enter on pullbacks, not breakouts
Use lower timeframes only for entries
❌ Avoid
Trading against FINAL bias
Chasing trades when reversal % is high
Over-leveraging in CHOP conditions
🎯 Ideal For
Crypto traders (Spot & Futures)
Forex traders
Gold / Commodity traders
Scalping, Intraday & Swing trading
⚠️ Disclaimer
This indicator is a decision-support tool, not financial advice. Always combine it with proper risk management, confirmations, and your trading plan.
Adaptive Trend Envelope [BackQuant]Adaptive Trend Envelope
Overview
Adaptive Trend Envelope is a volatility-aware trend-following overlay designed to stay responsive in fast markets while remaining stable during slower conditions. It builds a dynamic trend spine from two exponential moving averages and surrounds it with an adaptive envelope whose width expands and contracts based on realized return volatility. The result is a clean, self-adjusting trend structure that reacts to market conditions instead of relying on fixed parameters.
This indicator is built to answer three core questions directly on the chart:
Is the market trending or neutral?
If trending, in which direction is the dominant pressure?
Where is the dynamic trend boundary that price should respect?
Core trend spine
At the heart of the indicator is a blended trend spine:
A fast EMA captures short-term responsiveness.
A slow EMA captures structural direction.
A volatility-based blend weight dynamically shifts influence between the two.
When short-term volatility is low relative to long-term volatility, the fast EMA has more influence, keeping the trend responsive. When volatility rises, the blend shifts toward the slow EMA, reducing noise and preventing overreaction. This blended output is then smoothed again to form the final trend spine, which acts as the structural backbone of the system.
Volatility-adaptive envelope
The envelope surrounding the trend spine is not based on ATR or fixed percentages. Instead, it is derived from:
Log returns of price.
An exponentially weighted variance estimate.
A configurable multiplier that scales envelope width.
This creates bands that automatically widen during volatile expansions and tighten during compression. The envelope therefore reflects the true statistical behavior of price rather than an arbitrary distance.
Inner hysteresis band
Inside the main envelope, an inner band is constructed using a hysteresis fraction. This inner zone is used to stabilize regime transitions:
It prevents rapid flipping between bullish and bearish states.
It allows trends to persist unless price meaningfully invalidates them.
It reduces whipsaws in sideways conditions.
Trend regime logic
The indicator operates with three regime states:
Bullish
Bearish
Neutral
Regime changes are confirmed using a configurable number of bars outside the adaptive envelope:
A bullish regime is confirmed when price closes above the upper envelope for the required number of bars.
A bearish regime is confirmed when price closes below the lower envelope for the required number of bars.
A trend exits back to neutral when price reverts through the trend spine.
This structure ensures that trends are confirmed by sustained pressure rather than single-bar spikes.
Active trend line
Once a regime is active, the indicator plots a single dominant trend line:
In a bullish regime, the lower envelope becomes the active trend support.
In a bearish regime, the upper envelope becomes the active trend resistance.
In neutral conditions, price itself is used as a placeholder.
This creates a simple, actionable visual reference for trend-following decisions.
Directional energy visualization
The indicator uses layered fills to visualize directional pressure:
Bullish energy fills appear when price holds above the active trend line.
Bearish energy fills appear when price holds below the active trend line.
Opacity gradients communicate strength and persistence rather than binary states.
A subtle “rim” effect is added using ATR-based offsets to give depth and reinforce the active side of the trend without cluttering the chart.
Signals and trend starts
Discrete signals are generated only when a new trend regime begins:
Buy signals appear at the first confirmed transition into a bullish regime.
Sell signals appear at the first confirmed transition into a bearish regime.
Signals are intentionally sparse. They are designed to mark regime shifts, not every pullback or continuation, making them suitable for higher-quality trend entries rather than frequent trading.
Candle coloring
Optional candle coloring reinforces regime context:
Bullish regimes tint candles toward the bullish color.
Bearish regimes tint candles toward the bearish color.
Neutral states remain visually muted.
This allows the chart to communicate trend state even when the envelope itself is partially hidden or de-emphasized.
Alerts
Built-in alerts are provided for key trend events:
Bull trend start.
Bear trend start.
Transition from trend to neutral.
Price crossing the trend spine.
These alerts support hands-off trend monitoring across multiple instruments and timeframes.
How to use it for trend following
Trend identification
Only trade in the direction of the active regime.
Ignore counter-trend signals during confirmed trends.
Entry alignment
Use the first regime signal as a structural entry.
Use pullbacks toward the active trend line as continuation opportunities.
Trend management
As long as price respects the active envelope boundary, the trend remains valid.
A move back through the spine signals loss of trend structure.
Market filtering
Periods where the indicator remains neutral highlight non-trending environments.
This helps avoid forcing trades during chop or compression.
Adaptive Trend Envelope is designed to behave like a living trend structure. Instead of forcing price into static rules, it adapts to volatility, confirms direction through sustained pressure, and presents trend information in a clean, readable form that supports disciplined trend-following workflows.
Power Hour Trendlines [LuxAlgo]The Power Hour Trendlines indicator is based on Power Hours detection, and includes up to three displayed trendlines derived from the closing prices of all the bars within the last user-selected Power Hours.
Users can edit the time of Power Hours, choose how many sessions to take into account, enable or disable any trendlines, and change their colors.
🔶 USAGE
The Power Hour is defined as the last hour of the trading session and is set by default from 3:00 p.m. to 4:00 p.m. New York time. During this period, volume and volatility enter the market. Traders using higher timeframes may use this period to enter or exit positions by placing MOC (Market on Close) orders.
This tool works under the hypothesis that prices made during power hours (periods with high trading activity) are more relevant when used for the construction of trendlines.
An initial trendline is fit using linear regression; prices from power hours located above this initial fit are used for the upper trendline, while the ones below the fit are used for the lower one.
As with any trendline, traders can analyze the slope to determine the market's direction:
Positive slope: The market is trending up.
Negative slope: The market is trending down.
No slope: The market is trending sideways.
As we can see in the image, Nasdaq and Bitcoin are clearly in downtrends, gold is clearly in an uptrend, and the euro/U.S. dollar is in a sideways market over the last visible sessions.
As you can see, the trend lines may or may not be parallel to each other. The wider the area, the more volatile the data. The narrower the area, the less volatile the data. Let's look at an example.
In the image, the Dow30 and the euro/U.S. dollar have opposite behaviors. The volatility above the middle trendline is growing in the first case but shrinking in the second. In both cases, the volatility in the bottom area seems steady, so there are no big surprises there.
Traders can adjust the number of sessions for calculations, making the tool ideal for analyzing price behavior over different time frames.
As the image shows, we can clearly see how the market behaves over different time periods. XLY has been moving down over the last 10, 20, and 40 sessions, with a steeper decline over shorter periods. However, it has been moving sideways over the last 70 sessions.
One of the main uses of trendlines is to provide key support and resistance. In the image, SPY is shown with trendlines over the last 20 sessions. These lines provide excellent reference points for trading and observing price behavior in those areas, such as whether prices are accepted or rejected, which may trigger a response from other traders.
🔹 Not Allowed Timeframes
For obvious reasons, timeframes larger than 1H are not allowed. The Power Hour is defined as the last hour of the trading session. The tool will display a warning message if the timeframe is longer than 60 minutes.
🔶 SETTINGS
Power Hour (NY Time): Choose a custom Power Hour in New York time
Sessions Memory: Select how many Power Hours to take into account for calculations.
🔹 Style
Top: Enable or disable the top line and choose the line and background colors.
Middle: Enable or disable the middle line and choose the line color.
Bottom: Enable or disable the bottom line and choose the line and background colors.
Background: Enable or disable the background color for top and bottom lines.
Chainbey AI - Pattern Memory Table (v2)Chainbey AI – Pattern Memory & Market Outcome Table
Chainbey AI Pattern Memory is an advanced market behavior reference indicator designed to help traders understand how the current price structure compares with historical market patterns.
Instead of repainting signals or forcing trades, this tool focuses on context awareness:
It analyzes the current price pattern range
Matches it against selected historical price structures
Displays how price reacted after similar patterns in the past
Shows an estimated directional outcome and momentum strength
All results are presented in a lightweight on-chart table, keeping the chart clean and readable.
🔍 What this indicator shows
📅 Matched historical date & time
📈 Expected direction (UP / DOWN / FLAT)
📊 Historical move percentage
⚡ Estimated momentum strength
🧠 Similarity score (lower = closer pattern match)
🎯 How traders use it
Confirm bias before entering a trade
Understand historical reactions at similar market structures
Avoid emotional decisions by referencing past behavior
Combine with support/resistance, volume, RSI, or trend tools
⚠️ This indicator does NOT generate buy/sell signals.
It is a decision-support & market insight tool, best used alongside your own strategy.
🧩 Best use cases
Crypto, Forex, Commodities, Indices
Intraday & swing trading
Market structure and pattern-based strategies
Bias confirmation before entries
⚠️ Disclaimer
This indicator is for educational and analytical purposes only.
It does not guarantee future performance and should not be considered financial advice.
Apex Adaptive TrailApex Adaptive Trail: Adaptive Volatility Trend System
This custom trend-following indicator improves on standard SuperTrend implementations by addressing two key weaknesses: excessive whipsaws during high volatility and false signals in ranging markets.
Core Logic:
- Synthetic Heikin Ashi values are calculated internally (without changing chart candles) to provide smoother source data for trend detection.
- ATR-based trailing stop with adaptive multiplier: dynamically adjusts between 0.8x and 1.5x the base factor based on current volatility (ATR / 50-period SMA of ATR). Widens in volatile conditions, tightens in quiet markets.
- Weighted Confluence Score (0-100%): Combines four independent filters, each contributing 25%:
• Price position relative to 21-period EMA (trend alignment)
• ADX > 20 (momentum strength)
• Choppiness Index < 60 (trending vs ranging detection)
• Alignment with Daily EMA(50) trend direction
Signals are only generated when price crosses the adaptive trail AND the confluence score exceeds 75% (standard) or 90% (MAX 🔥 ultra-strong). This combination significantly reduces low-quality entries compared to traditional SuperTrend crossovers.
Key Features:
- Dynamic confidence cloud (opacity based on score)
- Real-time dashboard showing volatility state, active filters, trend bias, and estimated historical win rate
- Optional dynamic/fixed profit targets
- Fully customizable filters and adaptive behavior
Usage: Best on 15m to 4H timeframes for trend-following strategies (Crypto, Forex, Indices). Enter on APEX signals, use trail as stop-loss, TP lines for partial exits.
This script integrates established concepts into a unique adaptive framework with volatility-responsive risk management and multi-filter validation.
Disclaimer: For educational and analysis purposes only. Past performance is not indicative of future results. Always use proper risk management.
"This script combines established indicators (ATR trailing, ADX, Choppiness Index, EMA, MTF) into a unique adaptive system with dynamic volatility adjustment and weighted confluence scoring – features not found together in standard SuperTrend variations."
ORB with Range Context📌 What This Indicator Does
This indicator plots the Opening Range (OR) — the high and low established during a user-defined session window at market open — and provides context on the range's significance by comparing it to recent volatility.
After the opening range session completes, the indicator displays:
• ORB High and Low as horizontal reference levels
• Optional Midline (often acts as intraday support/resistance)
• Target projections at customizable multiples when breakout occurs
• Range Quality classification (Narrow / Normal / Wide)
🔬 How It Works
Step 1: Opening Range Capture
During the session window (default: 09:15–09:20 IST for Indian markets), the indicator tracks the highest high and lowest low. These become the day's Opening Range boundaries.
Step 2: Range Quality Analysis
This is where this indicator differs from standard ORB tools. It compares today's range to the instrument's Average True Range (ATR) and classifies it:
• NARROW — Range is less than 0.5× ATR
Interpretation: Price compression. The market opened in a tight range relative to recent volatility. Compression often precedes expansion — breakouts from narrow ranges can be more directional.
• NORMAL — Range is between 0.5× and 1.2× ATR
Interpretation: Typical opening behavior. Standard breakout expectations apply.
• WIDE — Range is greater than 1.2× ATR
Interpretation: The market opened with unusual volatility — possibly due to gaps, news events, or overnight developments. Wide ranges may indicate that much of the day's move has already occurred.
Step 3: Breakout Detection
A breakout is confirmed when price closes beyond the ORB High or Low (not just wicks through). The indicator tracks the first breakout direction each day.
Step 4: Target Projection
On confirmed breakout, targets are calculated using the ORB range as the measurement unit:
• Target 1 = Breakout Level ± (Range × 1.0)
• Target 2 = Breakout Level ± (Range × 1.5)
• Target 3 = Breakout Level ± (Range × 2.0)
⚙️ Settings Guide
Opening Range Settings
• ORB Session Window — Time window for capturing the range. Default: 0915-0920 (first 5 min for NSE/BSE) or 0915-10:00(first 45 mins for NSE/BSE. US Markets: 0930-0935 or 0930-0945.
• Show Midline — Toggle the range midpoint display
Target Projection
• Target 1/2/3 (x Range) — Multipliers for profit targets. Default values (1.0, 1.5, 2.0) follow classical ORB methodology.
Range Quality Analysis
• ATR Period — Lookback for ATR calculation (default: 14)
• Narrow Threshold — Ranges below this ATR multiple are classified as narrow (default: 0.5)
• Wide Threshold — Ranges above this ATR multiple are classified as wide (default: 1.2)
📈 How to Use This Indicator
1. Apply to an intraday chart (1-min to 5-min recommended)
2. Wait for the ORB session to complete — levels appear after the time window ends
3. Check Range Quality in the info panel
4. Watch for breakout confirmation — price must close beyond ORB High or Low
5. Use projected targets for trade management
💡 Practical Tips
• Narrow Range Days: Often produce cleaner breakout trades. Tight opening suggests indecision that typically resolves directionally.
• Wide Range Days: If range exceeds 1.5× ATR, consider whether the instrument has already made its daily move.
• Midline Usage: After breakout, the midline often acts as a pullback level for re-entry or confirmation.
📊 Why Range Quality Matters
Most ORB indicators plot static levels without context. A 100-point range on NIFTY might be significant on a quiet day but trivial on a volatile day.
By normalizing against ATR, this indicator answers: "Is today's opening range tight or loose relative to what this instrument normally does?"
This helps traders:
• Calibrate profit expectations
• Assess risk appropriately
• Avoid mechanical trading without market context
🔔 Alerts Available
• ORB Bullish Breakout
• ORB Bearish Breakout
• Target 1 Hit
• Target 2 Hit
⚠️ Notes
• Works on intraday timeframes only
• Best suited for liquid instruments with defined opening sessions
• Range Quality is contextual guidance, not a standalone signal
• Always use appropriate risk management
Volume MAs Cloud Trend | Lyro RSVolume MAs Cloud Trend is a volume-weighted trend-following indicator designed to identify market direction, momentum strength, and dynamic trade management directly on price. By combining volume-adjusted moving averages, adaptive deviation bands, and an integrated ATR trailing stop, it delivers clear visual trend structure and actionable signals in a single overlay.
Key Features
Volume-Adjusted Moving Average
Uses a normalized formula: (Price × Volume) MA ÷ Volume MA, ensuring high-participation price moves carry greater influence. Supports 16+ MA types, with VWMA handled natively.
Deviation Band Cloud
Upper and lower bands are built from standard deviation over the MA length, scaled by independent positive and negative multipliers to adapt to volatility.
Cloud & Trail Modes
Cloud Mode visualizes trend structure using a filled band cloud.
Trail Mode switches to an ATR-based trailing stop for trend management.
Automatic Trend Signals
Bullish signals trigger when price crosses above the positive band.
Bearish signals trigger when price crosses below the negative band.
ATR Trailing Stop (Built-In)
A volatility-adjusted trailing stop initializes on each new trend and updates only in the trade direction, helping lock in gains while staying with the trend.
Custom Visuals & Palettes
Choose from Classic, Mystic, Accented, or Royal palettes, or define your own bullish and bearish colors. Includes MA glow, trend cloud fill, and trend-colored candles.
How It Works
MA Construction
Applies the selected moving average to volume-weighted price (or VWMA when selected) to create a participation-aware trend baseline.
Band Calculation
Calculates rolling standard deviation and offsets it using user-defined multipliers to form adaptive upper and lower trend bands.
Trend Detection
Crosses above the upper band confirm bullish momentum.
Crosses below the lower band confirm bearish momentum.
Trailing Stop Logic
On each new trend signal, an ATR-based trailing stop is initialized and dynamically updated in the trend direction.
Visual Synchronization
MA, cloud, trailing stop, and candles all change color in real time to reflect the current trend state.
Practical Use
Trend Confirmation
Sustained price action outside the cloud indicates strong directional momentum.
Breakout Identification
Band crosses highlight potential trend starts, especially when aligned with volatility expansion.
Trade Management
Trail Mode provides objective, volatility-based exits for trend-following strategies.
Quick Market Scanning
Color-coded candles and cloud structure allow fast visual assessment across multiple symbols and timeframes.
Customization
Adjust MA type and length to control responsiveness
Tune band multipliers for volatility sensitivity
Switch between Cloud and Trail modes depending on strategy
Customize color schemes to match your chart layout
⚠️ Disclaimer
This indicator is intended for technical analysis and educational purposes only. It does not guarantee results and should be used alongside proper risk management and additional analysis. The creator is not responsible for any financial decisions made using this tool.
Vdubus Momentum Lock (Overlay)The Top Indicator: "Vdubus Momentum Lock (Overlay)"
The Bottom Indicator: "Vdubus TrixStoch HMA"
Purpose: Precision timing. It shows you exactly when the pullbacks happen.
The Trigger Zones (48 / 52):
Buy Zone (Below 48): When the Blue line dips into this zone, the market is "reloading" for a buy.
Sell Zone (Above 52): When the Blue line pops into this zone, the market is "reloading" for a sell.
The Confluence Circles:
Green Dot ("Dip"): Appears only if HMA is Green AND Trix is Rising. This filters out bad buy signals during downtrends.
Red Dot ("Rally"): Appears only if HMA is Red AND Trix is Falling. This filters out bad sell signals during uptrends.
3. The Strategy:
A. Entry Logic (The Sniper)
Trend Check: Is HMA 100 Green or Red?
Momentum Check: Is TRIX 34 agreeing with the HMA?
Trigger:
Buy: Stoch K crosses under 48.
Sell: Stoch K crosses over 52.
Pulse Re-Entry: If Trix momentum was lost briefly but snaps back into alignment, re-enter immediately (even without a Stoch signal).
B. Exit Logic (The Safety)
Momentum Exit: If the TRIX slope flips against you (e.g., you are Long, but Trix turns down), CLOSE IMMEDIATELY.
Hard Deck (HMA Flip): If the HMA line changes color, CLOSE EVERYTHING. This is the emergency brake.
Ultimate Auto Trendlines Improved No lag, No Repaint with TableA major update - cleanest, most accurate non-repainting trendline tool.
What's new in this version:
• Connects MULTIPLE recent pivots (not just consecutive) → stronger, more reliable levels
• Solid lines extended far right → instant future S/R projection
• Built-in table (top-right): Price + EMA 10/20/50 (Above/Below) + MACD (Bull/Bear) + RSI (Bull/Bear) + ADX (Strong/Weak)
• Alerts for new trendlines — get notified the moment a fresh level forms
• Optional "R"/"S" pivot labels — clean visual swing confirmation
• Max 8 lines total → keeps your chart readable and focused
Why traders are adding this right now:
• 100% non-repainting – safe for live entries & alerts
• 80–85%+ touch/bounce rate in trending markets (SPY/QQQ/NASDAQ daily & 4H backtests)
• Angle filter kills flat/noise lines
• Works killer on stocks, indices, forex majors, crypto
Best settings to start:
Pivot Left/Right: 5/5
Min Angle: 12–15°
Max Trendlines: 8
Line Extension: 100–200 bars
Show Labels: On
Want the latest updates, settings tweaks, or new versions first?
Please Follow me on X → @TrendRiderPro1
Drop a like/favorite/comment if you add it – I read every one and reply to as many as I can.
Any feedback (bugs, ideas, your best settings) is super welcome!
Happy trading – let’s catch those clean bounces & big moves! 🚀📈
If you add it, drop a like/favorite/comment — I read every one and reply to as many as I can.
Any feedback (settings, bugs, ideas) is super welcome — helps me keep improving it.
Happy trading — let’s catch those clean bounces & big moves! 🚀
Vdubus TrixStoch + HMA FilterThe Bottom Indicator: "Vdubus TrixStoch HMA"
Purpose: Precision timing. It shows you exactly when the pullbacks happen.
The Top Indicator: "Vdubus Momentum Lock (Overlay)"
The Trigger Zones (48 / 52):
Buy Zone (Below 48): When the Blue line dips into this zone, the market is "reloading" for a buy.
Sell Zone (Above 52): When the Blue line pops into this zone, the market is "reloading" for a sell.
The Confluence Circles:
Green Dot ("Dip"): Appears only if HMA is Green AND Trix is Rising. This filters out bad buy signals during downtrends.
Red Dot ("Rally"): Appears only if HMA is Red AND Trix is Falling. This filters out bad sell signals during uptrends.
3. The Strategy:
A. Entry Logic (The Sniper)
Trend Check: Is HMA 100 Green or Red?
Momentum Check: Is TRIX 34 agreeing with the HMA?
Trigger:
Buy: Stoch K crosses under 48.
Sell: Stoch K crosses over 52.
Pulse Re-Entry: If Trix momentum was lost briefly but snaps back into alignment, re-enter immediately (even without a Stoch signal).
B. Exit Logic (The Safety)
Momentum Exit: If the TRIX slope flips against you (e.g., you are Long, but Trix turns down), CLOSE IMMEDIATELY.
Hard Deck (HMA Flip): If the HMA line changes color, CLOSE EVERYTHING. This is the emergency brake.
Price Action TrendPrice Action Trend measures trend *strength* by modelling where price sits inside a smoothed price-action channel, then applying RSI to that “channel position”. It doesn’t predict, but shows what price is doing now.
This indicator uses the same calculations as my old "Price Action Trend Overlay" script, which I'd published Protected for some forgotten reason. Some users have asked for the source code, so I'm republishing it as open source. I've also tidied up the code a bit, added some visualisations of elements that were present but never drawn, such as the PA channels themselves, drawn the trend metric in a separate pane, added alerts, and made some more configuration options available.
🟩 HIGHLIGHTS
⭐ Trend colouring on the main chart.
⭐ A trend line drawn in its own pane.
⭐ Overbought/oversold markers on the main chart, derived from the same PA calculations.
⭐ Optional “Price Average” line and channel colouring.
🟩 WHAT’S UNIQUE ABOUT THE TREND CALCULATION
Most “trend RSI” tools run RSI on close, or on some moving average of price.
This script runs RSI on a *normalised* price-action series:
- We build a smoothed channel from RMA(high) and RMA(low).
- We normalise price against that channel (relative to the channel midpoint and width).
- We run RSI on that normalised series (default 14, but optionally matched to the Trend Lookback Period).
Using highs and lows instead of close or OHLC4 makes the trend value sensitive to *range shape* and *asymmetry* (big wicks, uneven extremes), not just the centre of the candle.
As compared to a simple RSI (also included simply for comparison), this PA Trend tends to decay faster and recovers faster.
🟩 HOW TO USE IT (PRACTICAL)
⭐ Trend pane
- Treat the line as a measure of *trend strength*, not a prediction.
- Neutral zone = trend is not convincingly bullish or bearish.
- Strong moves away from neutral = “trend has conviction”.
⭐ Overbought / oversold markers
Overbought/oversold doesn’t mean “reversal right now”.
It means the *rate of directional change* is unsustainably strong.
- Overbought in an uptrend: trend is overheating. Tighten long stops; expect rest/retrace/reversal once overheating ends.
- Oversold in an uptrend: the countertrend down is likely exhausting. Potential “buy the dip” context.
- Reverse the above for downtrends.
This works on any market, any timeframe. Lower timeframes will be choppier.
Don’t trade these signals blindly; use market structure, S/R, and your other tools.
🟩 SETTINGS (OVERVIEW)
🟦 Settings
- Pane Plot Mode: choose whether the pane shows Trend or Overbought/Oversold series.
- Trend Lookback Period: channel smoothing for the trend model (higher = smoother, lower = faster).
- Show Overbought & Oversold Shapes: show/hide the triangles on the main chart.
- Overbought/sold Lookback Period: channel smoothing for OB/OS detection (lower = more sensitive).
- Overbought/sold Adaptive Length: smoothing for the dynamic OB/OS levels (lower = more adaptive).
🟦 Display
- Transparency for the candle colour: bar colour transparency (Gradient mode).
- Trend Colour Mode: Classic vs strength-based Gradient.
🟦 Price Average
- Show Price Average: show/hide the OHLC4 average price line.
- Lookback: length for the price average.
- Smoothing: SMA / EMA / RMA.
- Colour Channel by Price Average: neutral/green/red channel colouring depending on whether the price average is inside/above/below the channel.
🟦 Advanced
- Trend Upper/Lower Neutral Threshold: neutral zone bounds (also used by the dynamic OB/OS logic).
- PA RSI Length: choose Fixed (14) or match the Trend Lookback Period.
- Show RSI (close): optional “reference RSI” plot with length.
🟩 ALERTS
There are built-in alert conditions for this indicator:
- Overbought PA Trend: triggers when the PA overbought condition is true.
- Oversold PA Trend: triggers when the PA oversold condition is true.
- Trend flips up: triggers when the trend changes from down to up (ignores any intervening neutral bars).
- Trend flips down: triggers when the trend changes from up to down (ignores any intervening neutral bars).
- Lost overbought: triggers on the first red candle after the overbought condition ends (set this alert on close to avoid false alerts).
- Lost oversold: triggers on the first green candle after the oversold condition ends (set this alert on close to avoid false alerts).
🟩 REPAINTING / CALCULATION NOTES
According to my understanding, this indicator does not repaint (it does not go back and alter closed bars).
However, while the current candle is forming, values that depend on the current price will update in real time. Once the candle closes, they are fixed.
The overbought/oversold calculations use Williams fractal-style confirmation logic, which cannot be known until some bars afterwards.
This affects when the OB/OS levels update, but new confirmations only affect future calculations, not the past.
🟩 CREDITS
The idea for using smoothed highs/lows to create a price-action channel came from my humble trading mentor. All the code is my own.
🟩 DISCLAIMER
No indicator is a substitute for knowing what you’re doing.
By using this indicator you agree that it might not do what you or anyone else expects.
You retain full responsibility for your trading at all times.
Before trading with actual money, first make sure your risk management is professional-level.
Optimus S/R ZonesEnhanced S/R Zones Pro is a sophisticated Support and Resistance indicator designed for traders who need reliable, validated S/R levels with professional-grade visualization. Unlike basic pivot indicators, this tool validates levels based on historical price interaction and provides comprehensive analysis of your current position within the market structure.
✨ Key Features
📊 Extended Lookback Analysis
Lookback Range: 20-500 bars (far beyond standard 80-bar limits)
Pivot Strength: Adjustable 2-10 bars for confirmation
Separate Controls: Independent max levels for support (1-8) and resistance (1-8)
Smart Filtering: Automatic level spacing with customizable minimum distance (0.3-5%)
🎨 Advanced Zone Visualization
Three Zone Styles:
Filled: Solid colored zones
Outlined: Border-only zones
Both: Combined for maximum visibility
Adjustable Transparency: 50-95% opacity control
Dynamic Extension: Zones extend to the right indefinitely
Custom Zone Width: 0.05-1.0% of price
💪 Level Strength System
Touch Validation: Only shows levels tested multiple times
Minimum Touches: Filter for 1-5 minimum confirmations
Color Intensity: Stronger levels (more touches) display darker/brighter
Touch Detection: Customizable sensitivity (0.1-1.0% range)
Independent Display: Show touch counts without color coding
📱 Enhanced Dashboard
Level Count: Active support/resistance zones
Distance Metrics: Percentage to nearest S/R levels
Range Position: Where price sits between S/R (0-100%)
Color Coding: Visual feedback on market position
Four Positions: Top/Bottom, Left/Right placement
🎭 Customizable Visuals
Label Sizes: Tiny, Small, Normal, Large, Huge
Adjustable Line Width: 1-4 pixels
Custom Colors: Full color picker for support/resistance
Optional Touch Count: Toggle touch numbers on/off
Midpoint Line: Shows equilibrium between nearest S/R
🔔 Smart Alerts
Proximity Alerts: Triggers when approaching support zones
Resistance Alerts: Triggers when nearing resistance zones
Customizable Range: Based on touch detection sensitivity
🔧 How It Works
1. Pivot Detection
The indicator scans historical price action using configurable pivot strength to identify significant highs and lows. Extended lookback allows detection of major structural levels that shorter timeframes might miss.
2. Touch Validation
Each potential level is validated by counting how many times price has tested it within the specified touch detection range. Only levels meeting the minimum touch threshold are displayed.
3. Strength Ranking
Levels are ranked by:
Number of touches (primary)
Proximity to current price (secondary)
This ensures the most reliable and relevant levels are always shown.
4. Smart Filtering
The minimum distance filter prevents level clustering, keeping your chart clean and focusing only on distinct, actionable zones.
💡 Use Cases
Swing Trading
Identify major support/resistance for position entries
Set profit targets at strong resistance levels
Place stops below validated support zones
Day Trading
Quick identification of intraday S/R
Monitor range position for mean reversion trades
Use proximity alerts for entry timing
Position Trading
Extended lookback reveals major structural levels
Touch count validation ensures reliability
Range position helps time accumulation/distribution
Risk Management
Distance metrics help size positions appropriately
Strong levels (high touch count) for tight stops
Midpoint line for partial profit taking
⚙️ Settings Guide
Core Settings
Lookback Period: Start with 100 for swing trading, 50 for day trading
Pivot Strength: Higher values = fewer but stronger levels
Max Levels: 2-3 support and 2-3 resistance recommended
Min Distance: 1.0% prevents clustering, increase for volatile assets
Zone Settings
Zone Width: 0.25% default works well for most assets
Zone Style: "Both" for maximum visibility
Extend Zones: Keep enabled to track levels forward
Transparency: 85% provides good visibility without clutter
Level Strength
Show Level Strength: Enable for color-coded importance
Min Touches: 2-3 for validated levels
Touch Detection: 0.3% for precise levels, increase for volatile markets
Visual Settings
Label Size: Small/Normal for most charts
Show Touch Count: Enable to see level validation
Line Width: 2 for standard, 3-4 for presentation charts
📈 Best Practices
Start Conservative: Begin with default settings, adjust based on asset volatility
Combine Timeframes: Use different lookback periods on multiple charts
Respect Strong Levels: Higher touch counts indicate institutional interest
Watch Range Position: <30% = near support, >70% = near resistance
Use Alerts: Set proximity alerts to avoid constant chart watching
Validate Breaks: Zone width shows where true breaks occur vs. fakeouts
🚀 What Makes This Different
Unlike basic pivot indicators that simply mark highs/lows:
✅ Validates levels through touch count analysis
✅ Ranks levels by actual strength, not just recency
✅ Visualizes zones, not just lines
✅ Quantifies your position within market structure
✅ Extends lookback far beyond standard limits
✅ Separates support and resistance controls
🎓 Tips for New Users
First Time Setup:
Add indicator to chart
Enable dashboard in settings (default on)
Observe which levels price respects
Adjust lookback/strength to match your trading style
Set proximity alerts for your key levels
Optimization:
Forex: 0.2-0.3% zone width, 100-200 lookback
Stocks: 0.3-0.5% zone width, 50-150 lookback
Crypto: 0.4-0.6% zone width, 100-200 lookback
Indices: 0.2-0.4% zone width, 100-250 lookback
⚠️ Disclaimer
This indicator is a technical analysis tool and should not be used as the sole basis for trading decisions. Support and resistance levels are not guarantees of price behavior. Always use proper risk management, combine with other analysis methods, and consider fundamental factors. Past performance does not guarantee future results.
Asian and London Session High-Low (Auto UK DST) + PDH/PDLThis indicator automatically plots Asian session (7:00am–2:00pm MYT) and London session high/low using Malaysian time, with London adjusting automatically for UK Daylight Saving Time (4:00pm–9:00pm MYT in winter, 3:00pm–8:00pm MYT during DST).
It also shows Previous Day High/Low (PDH/PDL) and a 7:00am MYT daily reset line, while No-Trade zones are available but turned OFF by default and can be enabled when needed.
Chainbey Ai - Swing High/Low Range📈 Chainbey Ai – Swing High / Swing Low Range
Chainbey Ai – Swing High / Swing Low Range is a clean and powerful market-structure indicator designed to automatically identify key swing levels and visualize the active price range on any chart.
This tool helps traders clearly see where price is reacting, consolidating, or preparing for a breakout.
🔹 What This Indicator Does
✔ Automatically detects the latest confirmed Swing High
✔ Automatically detects the latest confirmed Swing Low
✔ Draws horizontal levels for both swings
✔ Labels levels clearly as “Swing High” and “Swing Low”
✔ Highlights the range between swings using a background fill
✔ Updates dynamically as new market structure forms
🔹 Why It’s Useful
Identify support & resistance without manual drawing
Visualize consolidation zones instantly
Spot breakout and fake-out areas faster
Ideal for range trading, breakout trading, and trend confirmation
Works perfectly with price action, volume, and order-flow concepts
🔹 Best Use Cases
Crypto (Spot & Futures)
Forex
Indices
Commodities (Gold, Silver, Oil)
Timeframes: Works on all timeframes (especially strong on 15M, 30M, 1H)
🔹 How to Trade With It
Buy bias when price holds above Swing Low inside the range
Sell bias when price rejects from Swing High
Breakout confirmation when price closes strongly outside the range
Combine with volume, momentum, or liquidity concepts for higher accuracy
🔹 Customization
Adjust Swing Length to control sensitivity
Enable/disable range background fill
Customize colors and transparency
Extend swing levels to the right for forward guidance
⚠️ Disclaimer
This indicator is a technical analysis tool, not financial advice.
Always manage risk and confirm signals with your own strategy.
🔗 Built by Chainbey Ai
Smart Structure • Clean Levels • Clear Ranges 🚀
Two Bar ATR Flip
This strategy was generated entirely from a natural language prompt, without a single line of code written or edited by a human developer.
Using CodaPro’s AI engine, the logic, structure, syntax, and alerts were all fully constructed by ARiS — OpenAI’s trading code architect integrated into the CodaPro workflow.
The result is a regime-based trend strategy that uses ATR trailing bands to detect directional flips, confirmed with a two-bar hold filter, and automatically routes alerts to brokers for live execution.
It is engineered with clean logic flow, risk-calibrated sizing, and automated broker payloads — suitable for immediate deployment or as a modular base for advanced quant systems.
Core Components:
1. ATR Flip Engine (Regime Detection)
SuperTrend-style band logic with hl2 ± ATR * multiplier.
Directional regime flips are tracked and locked using persistent variables.
Flip triggers are validated only on strong crossovers.
2. 2-Bar Confirmation Filter
Ensures regime flips persist for 2 full bars before allowing entries.
Eliminates transient noise and early reversals.
3. Dynamic Risk-Based Position Sizing
Uses equity-based % risk to calculate size based on ATR-derived stop distance.
No static contracts — size adjusts dynamically per market volatility.
4. Entry/Exit Logic
Entry logic supports long/short with full reversal logic (strategy.close_all() on flip).
SL and TP are derived from current ATR and auto-adjust per entry bar.
5. Broker Integration Payloads
Alerts include JSON payloads for enter and exit-all, with multiplier precision.
Ready for webhook integration with brokers like Tradovate or IBKR.
6. Visual Aids
Flip and confirmation signals are plotted for visual debugging.
Regime background colors (lime/red) for rapid context.
Trailing stoplines plotted dynamically based on trend.
Automation Notes:
Alerts built using alert.freq_once_per_bar_close
Full compatibility with webhook delivery systems
Designed for deterministic behavior: process_orders_on_close = true
Original Prompt Used by the user and generated by CodaPro.ai - ARiS
"Build a Pine Script strategy that flips between long and short using an ATR trailing stop.
Add a 2-bar confirmation after each flip before entering a position.
Include dynamic position sizing based on risk % and ATR stop distance.
Add take profit and stop loss based on ATR.
Generate broker payloads for entry and exit as webhook alerts."
Spot Futures Divergence & Auction ContextSpot–Futures Divergence & Auction Context
Spot–Futures Divergence & Auction Context is a contextual market analysis indicator designed to help traders understand where the market is positioned and when structural divergence is meaningful.
This tool compares spot and futures price structure using confirmed swing pivots and overlays that information with VWAP location, auction regime, and higher-timeframe (HTF) trend context.
⚠️ This indicator is NOT a buy/sell signal generator.
It is intended for discretionary decision support and market context only.
🔍 What This Indicator Shows
1️⃣ Spot–Futures Structural Divergence
Identifies divergence between spot and futures swing structure
Highlights where derivatives are leading or lagging cash markets
Uses confirmed pivots only (non-repainting)
2️⃣ Divergence Quality (DIV-A / DIV-B)
DIV-A: Divergence aligned with HTF trend
DIV-B: Divergence against or without HTF alignment
Helps distinguish high-quality context from early warnings
3️⃣ VWAP Context & Deviation Bands
Session VWAP plotted on futures
Optional VWAP deviation bands (±1σ / ±2σ / ±3σ) for auction stretch context
Bands are visual only, not signals
4️⃣ Auction Regime Detection
Classifies market as BALANCED or IMBALANCED
Helps avoid divergence during strong trend / directional auctions
5️⃣ Options Bias Panel (Context Only)
Provides a high-level directional or volatility bias, such as:
CALL BIAS
PUT BIAS
SELL PREMIUM
WAIT
This bias is informational, not an instruction to trade.
⚙️ Key Settings Explained
Futures / Execution Symbol
Select the futures or derivative symbol you are trading (e.g., NIFTY1!, BANKNIFTY1!, ES1!, BTCUSDT.P).
Spot / Cash Reference Symbol
Select the corresponding spot or cash index used for structural comparison.
Divergence Display Mode
Show All → Displays all divergences
Hide in Imbalanced → Suppresses divergences during strong directional auctions
DIV-A only in Imbalanced → Shows only HTF-aligned divergences on trend days
This is a discipline and visibility control, not a signal filter.
VWAP Deviation Bands
Optional visual bands to assess how far price is trading from fair value.
Best used for context, not entries.
🧭 How to Use (1-Page User Guide)
Recommended Workflow
Start with auction regime
Balanced → mean-reversion context
Imbalanced → trend / momentum context
Observe VWAP location
Near VWAP → fair value
Extended → stretched auction
Note Spot–Futures divergence
DIV-A → higher contextual importance
DIV-B → early warning or risk signal
Use Options Bias panel
As a guideline, not a trigger
Especially useful for options and volatility strategies
🚫 When to Ignore Divergence
Strong imbalanced trend with steep VWAP slope
News-driven or event-driven sessions
Very early session before structure forms
⚠️ Important Disclaimers
This indicator does not generate buy/sell signals.
No profitability or performance claims are made.
Past behavior does not guarantee future results.
Trading futures, options, and leveraged products involves significant risk.
Use this tool for analysis and education only.
📊 Best Use Cases
Index futures & options
Spot vs derivative structure analysis
Intraday auction and VWAP-based context
Risk awareness and trade selection support
Linear Regression Blend Candles [Adaptive]Regression Blend Candles
A hybrid candle system that blends standard OHLC candles with linear regression candles at a user-defined ratio. The result is a cleaner price representation that filters noise while preserving market structure. Adaptive modes automatically adjust the blend based on market conditions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
𝗛𝗢𝗪 𝗜𝗧 𝗪𝗢𝗥𝗞𝗦
The indicator calculates linear regression values for each OHLC component over a lookback period, then blends them with regular candle values based on your blend percentage. At 0% you see pure price action; at 100% you see full regression candles; anything between gives you a mix.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
𝗙𝗘𝗔𝗧𝗨𝗥𝗘𝗦
◽ Blend Control
Set a fixed blend percentage or enable adaptive mode. The blend slider lets you dial in exactly how much smoothing you want—useful for finding the sweet spot between noise reduction and signal responsiveness.
◽ Adaptive Blend Modes
Let the market decide the blend ratio:
• ATR — Higher volatility increases LR blend to filter chop
• StdDev — Similar concept using standard deviation
• ATR + StdDev — Combines both volatility measures
• R-Squared — Increases blend when price fits a linear trend well (high R² = clean trend = trust the regression more)
• R² + ATR — Combines trend quality with volatility for a balanced approach
◽ R-Squared Thresholds
Fine-tune when the R² adaptive mode kicks in. Below the low threshold, blend stays at minimum. Above the high threshold, blend reaches maximum. This prevents over-smoothing during choppy, non-linear price action.
◽ Post-LR Smoothing
Apply additional smoothing to the regression values before blending:
• ALMA — Arnaud Legoux Moving Average with offset/sigma control
• Kalman — Adaptive filter that balances responsiveness and smoothness
• KAMA — Kaufman Adaptive MA that adjusts to market efficiency
◽ Advanced LR Mode
Enable weighted regression with exponential decay (emphasizes recent bars) and lag correction (extrapolates based on velocity to reduce inherent LR lag).
◽ Ghost Candles
Display faded regular candles behind the blended candles to visualize the difference and spot divergences between raw price and the smoothed representation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
𝗦𝗨𝗚𝗚𝗘𝗦𝗧𝗘𝗗 𝗦𝗘𝗧𝗨𝗣𝗦
𝟭. 𝗧𝗿𝗲𝗻𝗱 𝗖𝗹𝗮𝗿𝗶𝘁𝘆 (𝗦𝘄𝗶𝗻𝗴 𝗧𝗿𝗮𝗱𝗶𝗻𝗴)
• LR Lookback: 14
• Blend %: 60-70%
• Smoothing: None
• Ghost Candles: On
Use for cleaner swing identification. The higher blend percentage filters out intrabar noise while ghost candles let you see when price deviates significantly from the smoothed trend—potential reversal or continuation signals.
𝟮. 𝗔𝗱𝗮𝗽𝘁𝗶𝘃𝗲 𝗡𝗼𝗶𝘀𝗲 𝗙𝗶𝗹𝘁𝗲𝗿 (𝗜𝗻𝘁𝗿𝗮𝗱𝗮𝘆)
• LR Lookback: 10
• Adaptive Blend: On
• Mode: R² + ATR
• Min/Max Blend: 25% / 75%
• R² Thresholds: 0.3 / 0.8
Ideal for intraday trading on volatile instruments. The blend automatically increases during clean trends (high R²) and volatile moves (high ATR), then backs off during choppy consolidation to keep you closer to raw price action when the regression isn't fitting well.
𝟯. 𝗨𝗹𝘁𝗿𝗮-𝗦𝗺𝗼𝗼𝘁𝗵 (𝗛𝗶𝗴𝗵𝗲𝗿 𝗧𝗶𝗺𝗲𝗳𝗿𝗮𝗺𝗲 𝗕𝗶𝗮𝘀)
• LR Lookback: 20
• Blend %: 80%
• Smoothing: ALMA (offset 0.85, sigma 6)
• Advanced LR: On (decay 0.9, lag correction 1.5)
Maximum smoothing for identifying higher timeframe directional bias. The combination of longer lookback, high blend, ALMA smoothing, and lag correction creates a highly filtered view that cuts through noise. Best used on 4H+ charts or as a trend filter for lower timeframe entries.
HA Trend Reclaim Daily Structure Pullback🔹 HA Trend Reclaim — Daily Structure Pullback System
HA Trend Reclaim is a professional-grade trend continuation indicator designed to highlight high-probability LONG and SHORT setups using a combination of:
Heikin Ashi candle structure
EMA trend alignment (9 & 50 EMA)
Daily High / Low market structure
Pullback → momentum reclaim logic
This indicator is built for traders who want clarity, discipline, and structure, not noise or over-signaling.
It focuses on trading with the dominant trend, entering only after price pulls back and confirms strength via momentum reclaim.
🔑 What Makes This Different
✔ No counter-trend signals
✔ No breakout chasing
✔ Built-in structure awareness
✔ Clear visual entries & risk levels
✔ Works across stocks, crypto, and futures
This script is ideal for traders who prefer fewer, higher-quality trades rather than constant signals.
2️⃣ HOW TO USE (FEATURED-FRIENDLY VERSION)
🟢 LONG Conditions
A LONG signal appears when:
EMA 9 is above EMA 50
Price is above EMA 50
Price pulls back into the EMA zone
Price reclaims EMA 9 upward
Heikin Ashi candle closes bullish (not a doji)
🔴 SHORT Conditions
A SHORT signal appears when:
EMA 9 is below EMA 50
Price is below EMA 50
Price pulls back into the EMA zone
Price reclaims EMA 9 downward
Heikin Ashi candle closes bearish (not a doji)
📦 Daily Structure Boxes
The indicator highlights the daily high–low range:
Green box → bullish daily bias
Red box → bearish daily bias
These boxes help traders avoid:
Mid-range chop
Late entries
Trading against daily momentum
3️⃣ BEST SETTINGS (VERY IMPORTANT FOR USERS)
Recommended Timeframes
Stocks: 5m, 15m, 1H
Crypto: 15m, 1H, 4H
Futures: 5m, 15m
Recommended Inputs
Setting Value
EMA Fast 9
EMA Slow 50
Swing Lookback 15
Runner RR 2.0
Heikin Ashi Enabled
Show Daily Boxes Enabled
Notes
Higher timeframes = fewer, stronger signals
Avoid low-liquidity instruments
Best used during active sessions (London / NY)
Broadening Formation Structure Review ToolThis script provides an educational, checklist-based framework for studying Broadening Formations together with basic Strat-style reversal behavior and higher-timeframe direction. It is designed to show multiple structural conditions in one place so users can observe how they interact. It does not execute trades, generate signals, or provide financial advice.
What makes this script original is the integration of four components into a single logical framework:
• dynamic tracking of Broadening Formation high/low levels
• proximity evaluation relative to those levels
• classification of simple bar reversal behavior
• higher-timeframe open–close continuity checks
Instead of using these concepts as separate tools, the script combines them into a single checklist so users can see when multiple conditions occur at the same time.
Broadening Formation levels may be user-defined or automatically derived using:
• unlimited dynamic expansion
• range-limited dynamic expansion
• swing-pivot detection
• manual input mode
Users may also optionally lock levels once a structure is identified.
Proximity to BF levels can be measured in several ways, including percentage, ticks, points, dollars, ATR multiples, or expected-move multiples. The script can also detect when price takes out BF highs or lows.
The script classifies basic Strat-style price behavior, including:
• two-up / two-down moves
• outside bars
• failed 2U/2D reversals
• 2D→2U and 2U→2D reversals
A selectable higher timeframe (such as 60, 240, D, W, or M) is used to evaluate direction by comparing the higher-timeframe open and close.
The on-chart table summarizes:
• current BF High and BF Low levels
• proximity status relative to those levels
• whether BF highs or lows have been taken out
• reversal classification results
• higher-timeframe direction
• theoretical risk distance and 2R/3R projections
Optional alerts can notify when three-condition or four-condition checklist alignment occurs, based only on the logical rules visible in the script. Optional chart lines for BF levels may also be displayed.
Transparency and behavior notes
• swing pivots repaint until confirmed
• higher-timeframe direction is only final at bar close
• dynamically derived BF levels may update as price forms new extremes
This script is intended purely for market-structure study and education. It does not guarantee performance, predict outcomes, or recommend trades.
Adaptive Bull Ratio Strategy█ Overview: Why This Strategy
Most option strategies fall into two traps:
They are too rigid: A "Call Ratio Spread" works great in slow markets but gets destroyed if the market rallies hard.
They are too simple: A simple "Buy Call" suffers from time decay (Theta) if the market chops sideways.
The Adaptive Bull Ratio Strategy solves both . It is a living strategy that "shifts gears" based on price action.
It is called "Adaptive" because it morphs its structure three times during a trade. It starts conservative to harvest Time Decay, but if the market explodes upwards, it "uncaps" itself to ride the trend aggressively.
█ The Entry Philosophy: Why Supertrend?
The default setting uses the Supertrend indicator as the trigger. This is intentional:
Volatility Awareness: Supertrend adapts to market noise using ATR. In high volatility, bands widen to prevent false entries.
Trend Confirmation: Since Phase 1 involves selling options, entering "too early" against a falling market is dangerous. Supertrend forces patience, waiting for a confirmed reversal (Close > Trend Line), ensuring the momentum is actually in your favor before you commit capital.
The "Drift" Benefit: This strategy excels in markets that "drift" upwards. Supertrend identifies these trends while filtering out short-term chop.
Flexibility with External Sources:
While Supertrend is the default, the strategy is designed to be flexible. You can enable the 'Enable External Source' option in the settings to plug in any custom indicator (e.g., Moving Averages, Parabolic SAR, or a proprietary trendline).
The Golden Rule for External Sources: The script interprets a Bullish Signal whenever your External Source line is below the Close price (Ext Source < Close).
Compatibility: As long as your custom indicator behaves like a support line in an uptrend (plotting below the candles), it will work seamlessly with this strategy's logic.
█ The "Long Only" Rationale: Avoiding the Volatility Trap
Why not trade this on the short side (Puts) during crashes?
The Volatility Trap (Vega Risk): In Bull markets, Implied Volatility (IV) usually drops, helping your sold options decay faster. In Bear markets, IV explodes (panic). Selling OTM Puts during a crash is dangerous as their value skyrockets, neutralizing gains.
Velocity Risk: Bear markets crash fast ("Elevator Down"). Prices can blow through adjustment levels faster than the strategy can safely roll down, causing slippage.
Structural Skew: OTM Puts are inherently more expensive. Buying expensive ITM Puts and selling expensive OTM Puts shifts the breakeven further away, making V-shape recoveries painful.
█ How It Works & Stands Out
This strategy actively transforms risk profiles based on market movement:
Phase 1: The "Safe" Start (Entry)
Setup: Initiates a Call Ratio Spread (Buy 2 ITM, Sell 4 OTM) + Protective Puts.
Logic: Profits from sideways drift or slow rallies via Time Decay (Theta). The sold options finance the trade.
Phase 2: The "Shift" (Adjustment Level 1)
Trigger: Market moves above Leg 2 (3 OTM Call).
Action: Rolls Up the position. Exits initial legs, enters new higher legs, and adds a Short Put to finance the roll.
Impact: Aggressive. You bet the trend is strong enough to support the added downside risk of the short put.
Phase 3: The "Uncap" (Adjustment Level 2)
Trigger: Market moves above Leg 3 (4 OTM Call).
Action: Exits all Sold Calls.
Impact: Uncaps profit potential. The trade becomes a Net Long position (Long Calls + Short Puts), allowing you to ride a massive rally without a ceiling.
Phase 4: The "Lock-In" (Optional Trail Adjustment)
Trigger: The market goes parabolic (price rises X levels above Leg 3, configurable in settings).
Action (If Enabled):
Call Adj: Exits the Phase 3 calls and buys fresh 1-OTM calls (Rolling Up to lock profits).
Put Adj: Exits all Put legs (Removing downside risk completely).
Impact: Maximum Safety. This phase is about "banking" the windfall from a massive rally and leaving a smaller, risk-free runner to capture any final extension.
█ How to Start: A Quick Setup Guide
Step 1: Map Expiry Dates
Manually input your trading expiry dates in Settings -> Expiry Management.
Format: YYYY-MM-DD (e.g., 2025-12-25). Strict adherence required for DhanHQ.
Step 2: Configure Symbol & Size
Exchange/Symbol: Enter NSE and NIFTY (or your ticker).
Lot Multiplier: Default is 1. Set to 2 to double all quantities (e.g., Buy 2 becomes Buy 4).
Step 3: Understand Visuals
Entry Window (Light Blue): Strategy is scanning for new trades.
Non-Entry Window (Dark Blue): Trading blocked (Day before Expiry & Expiry Day). Only management allowed.
Green Box: Valid Late Entry Zone.
Red Dashed Line: Invalidation Level (if price touches this, no late entry).
Fuchsia Line: Trigger level for Special Trail Adjustments (Phase 4).
IMPORTANT: Broker & Technology Heads-Up:
The alerts generated by this script ({"secret": "...", "alertType": "multi_leg_order"...}) are specifically formatted for the DhanHQ webhook structure.
Dhan Users: Plug-and-play.
Other Brokers: You need middleware (NextLevelBot, Quantiply) to parse the JSON.
█ Risk Disclaimer & Advice
Trading options involves substantial risk.
The Whipsaw Risk: In Phase 2, you are Long Calls and Short Puts. A sharp reversal causes losses on both sides.
Margin: Selling options requires significant margin. Keep a 15-20% cash buffer to handle adjustments instantly.
Testing: This strategy is optimized for NIFTY Weekly Options. Effectiveness on BankNifty or Stocks is untested and may require parameter tuning.
Advice:
Backtest: Use TradingView Replay.
Paper Trade: Run for at least one expiry cycle before live deployment.
Consult: Seek professional financial advice before trading.
Practical Tips for Smooth Execution
For a new trader deploying this system, these operational tips are vital:
Capital Buffer: Do not trade at your limit. Always keep 10-15% free cash in your broker account. Adjustments (specifically Phase 2, where you sell an extra Put) require additional margin instantly. If margin is short, the order fails, and your hedge breaks.
Liquidity Awareness : The script trades "Far Deep OTM" options (Leg 4) to reduce margin. On indices like Nifty/BankNifty, this is fine. On individual stocks, these deep strikes might be illiquid. Check the option chain volume before deploying on stocks.
Trust the Process (but Verify) : While the algo drives, you are the pilot.
Check your API connection every morning.
Ensure the "Entry Window" background color on the chart matches your real-world date.
Verify that your broker executed all legs of a multi-leg order (partial fills are rare but possible).
The "Human" Stop: If major news breaks (e.g., unexpected election results, war announcements), volatility can expand faster than any algo can react. It is acceptable—and smart—to pause the strategy during known "Black Swan" events or earnings releases.
█ Timeframe Selection: The 30-Minute Standard
Critical Requirement: This indicator must be applied to a 30-minute chart.
Why?
Noise Filtering: The Supertrend logic is tuned to capture multi-day trends. Lower timeframes (5m, 15m) are full of "noise"—random fluctuations that look like trend changes but aren't.
Execution Logic (The Hybrid Engine): The script has a built-in "Dual Timeframe" architecture.
Decision Layer (30m): Uses the chart timeframe to decide when to be Bullish or Bearish.
Execution Layer (5m): Internally fetches 5-minute data to manage the how (Adjustments, Late Entries, and precise invalidation).
The Risk of Lower Timeframes: If you run the main chart on 5-minutes, you destroy this hierarchy. You will get too many signals, pay too much brokerage, and the internal logic may behave erratically.
Recommendation: Always keep your TradingView chart interval at 30m. Do not switch to lower timeframes expecting "faster" signals; you will likely just get "false" signals.
█ Testing Scope, Feedback
⚠️ Important Note on Asset Classes:
This strategy logic and the associated strike step calculations have been rigorously tested ONLY on NIFTY Index Options with Weekly Expiry.
BankNifty / Sensex / FinNifty: The volatility characteristics (ATR) and strike intervals of these instruments differ significantly from NIFTY. The effectiveness of this strategy on these other scripts has not been verified and may require different parameter tuning (e.g., strike_step or ATR Length).
Stocks: Individual stock options often lack the liquidity required for the "Deep OTM" legs, leading to potential execution failures.
We encourage traders to backtest this logic on other indices and share their findings! If you find a robust parameter set for BankNifty or observe unique behaviors on other scripts, please let us know in the comments below so we can improve the algorithm for everyone. Your feedback is appriciated.
Tori's Trendline Strategy with sugested stop loss and tp levels this will draw its own trendlines looks for consolidation and determines which pressure is building up inside the consolidation to minimize fake outs. also suggests long and short entries along with sl and tp levels. if you want to see the chart more clear shut off the long and short entry suggestions in the settings .
The Institutional Anchor (Daily OC Zone)The Institutional Anchor (Daily OC)
This indicator is a high-performance tool for traders who rely on "Institutional Candles" or "Opening Candles" (OC) to define their daily bias. Built on the latest Pine Script® v6 engine, it provides a stable, non-repainting foundation for identifying key institutional support and resistance levels.
Core Features & Technical Edge
1. Dual-Mode Zone Definition
Traders have different ways of defining institutional strength. This script supports both methods to suit your specific strategy:
Body-Only Mode: Focuses on the "Real Move" by using the Open and Close of the anchor candle.
Full Range Mode (Wicks): Accounts for total liquidity grabs and volatility by including the High and Low.
2. Precision Equilibrium (Mean Threshold)
In institutional trading, the 50% level of a candle is the "Fair Value" or Mean Threshold.
Includes a customizable Midline with independent styling (Solid, Dashed, Dotted).
Automatically calculates the exact mathematical center, helping you spot high-probability rejections at the "Equilibrium" of the move.
3. Professional Visualization Suite
Global Timezone Alignment: A built-in UTC Offset ensures you can align with New York (UTC-5), London (UTC+0), or your specific exchange time without manual calculations.
Auto-Naming System: Automatically labels zones with the Day of the Week (e.g., "Monday OC") to help you track weekly cycles and "Power of 3" (Accumulation/Manipulation/Distribution).
Historical Memory: Choose to show only the current day's active zone for a clean workspace, or display historical zones to find "nested" levels from previous days.
4. Dynamic Price Action Alerts
Stay notified without being glued to the screen. The script includes pre-configured, logically consistent alert conditions:
Equilibrium Touch: Triggers the moment price interacts with the 50% Mean Threshold.
Boundary Breach: Notifies you when price exits or taps the upper or lower edges of the zone.
5. Universal Market Compatibility
BTC & Crypto Optimized: Handles 24/7 data streams flawlessly without logic gaps.
Forex Precision: Perfect for London Open or Midnight Open strategies on pairs like EUR/USD.
Non-Repainting: Once the anchor hour closes, the zone is locked, providing a reliable reference point for the rest of the trading day.
How to Use
Market Open Hour: Enter the hour (24h format) of your chosen anchor candle (e.g., 2 for 2:00 AM).
UTC Offset: Match the offset to your preferred trading session time.
Customize Style: Adjust colors, transparency, and line styles to match your chart theme.






















