Dr. Barbara Star: Dual Strategies Combined [Merged] - geminiDr. Barbara Star: Dual Strategy Suite (Merged)
Overview
This script integrates two distinct but complementary trading methodologies developed by Dr. Barbara Star: "Capture Direction & Momentum" and "Profit with Dual Oscillators & Bands." While both strategies utilize price channels to filter noise, they approach entry and exit timing from different angles—one focusing on momentum shifts (Stochastic/EMA) and the other on cyclical price deviations (DPO/Bollinger Bands).
This tool allows the user to run either strategy independently or combine them to find high-confluence setups where momentum and cyclical structure align.
Strategy A: Capture Direction & Momentum
Source: Capture Direction And Momentum
1. Purpose & Theory
The goal of this method is to filter out the "noise" of choppy markets and identify the specific point where price direction aligns with momentum strength. It moves away from trying to catch exact tops or bottoms and instead focuses on catching the "meat" of the trend (continuation).
2. Implementation
Structure (The Channel): A 13-period SMA of the Highs and Lows creates a "No Trade Zone". When price is inside this channel, the market is considered directionless.
Direction (5 EMA): A fast 5-period EMA acts as a directional trigger. When it breaks outside the SMA channel, it signals acceleration.
Momentum (Modified Stochastic): A Slow Stochastic (14,2) is used, but with a crucial modification: the overbought/oversold levels are shifted to 40 and 60 (instead of 20/80).
3. How to Use It
The "Trend Zones" (Background Colors):
Green Background (Bullish): The 5 EMA is above the channel AND the Stochastic is > 60. This is the "Go" zone.
Red Background (Bearish): The 5 EMA is below the channel AND the Stochastic is < 40.
Yellow Background: The "No Trade Zone." The price is consolidating, or the indicators disagree.
The Continuation Signal (Marked by "U" or "D"):
Why it matters: This is the most powerful setup in the system. It detects when price pulls back (retracement) but momentum remains strong.
The Signal: If the 5 EMA dips back into the SMA channel (weakness) but the Stochastic stays above 60 (strength), a blue "U" (Up) marker appears. This indicates the pullback is likely a buying opportunity, not a reversal. Conversely, a yellow "D" appears in downtrends if Stoch stays below 40.
Exits (Marked by "X"):
Signals to take profit when the 5 EMA closes back inside the channel and the Stochastic crosses back into the neutral 40–60 zone.
Strategy B: Dual Oscillators & Bands
Source: Profit With Dual Oscillators & Bands
1. Purpose & Theory
This strategy uses "Dual Bollinger Bands" to define the volatility structure of the trend and "Dual Detrended Price Oscillators" (DPO) to time the entries based on cycle shifts.
2. Implementation
Structure (Dual Bands):
Inner Bands (1 SD): These define the "Trend Channel." Strong trends tend to ride between the 1 SD and 3 SD bands.
Outer Bands (3 SD): These represent extremes (containing 99.5% of price action). Hits here often signal exhaustion.
Timing (Dual DPOs):
Long Oscillator (DPO 20): Identifies the broader trend direction (Positive = Bullish).
Short Oscillator (DPO 9): Identifies shorter-term timing and potential divergences.
3. How to Use It
Identifying the Trend State:
Strong Uptrend: Price holds above the Upper Inner Band (1 SD).
Strong Downtrend: Price holds below the Lower Inner Band (1 SD).
Transition/Neutral: Price is stuck between the Upper and Lower Inner bands.
Entry Signals (Triangles on Chart & Circles in Pane):
Aggressive Entry: When the fast DPO 9 crosses zero. This signals early momentum shifts.
Conservative Entry: Wait for the slow DPO 20 to cross zero, confirming the broader trend has shifted.
Visuals: The script plots triangles on the main chart when these cross. In the lower pane, a Blue Circle indicates a bullish cross and a Yellow Circle indicates a bearish cross.
Continuation Setup:
Similar to Strategy A, look for moments where the DPO 9 dips below zero (pullback) while the DPO 20 remains above zero (trend intact). This is often a reload opportunity.
Combined Mode: The "Power Couple"
When selecting "Both" in the settings, the indicator merges these tools for maximum confirmation:
Visual filtering: The lower pane automatically scales the DPO lines to fit inside the 0–100 Stochastic range (centering the DPO zero line at 50). This allows you to read both momentum and cycles in a single glance.
Confluence Trading:
Look for the Background to turn Green (Strategy A Trend) coincident with a Blue Triangle/Circle (Strategy B Momentum Cross).
Use the Inner Bollinger Bands (Strategy B) as your trailing stop-loss while riding the SMA Channel (Strategy A) trend.
Reference Settings
Strategy A: SMA Channel (13), EMA (5), Stochastic (14, 2, 40/60 levels).
Strategy B: Bollinger Bands (20 SMA, 1.0 & 3.0 deviations), DPO (9 & 20).
Sources: of the methodologies
1-Stocks & Commodities V. 32:7 (10-16): Profit With Dual Oscillators & Bands by Barbara Star, PhD
2-Stocks & Commodities V. 43:12 (8–12): Capture Direction And Momentum by Barbara Star, PhD
Phân tích Xu hướng
Wyckoff + VSA Ultimate - Complete Market Analysis
**Wyckoff + VSA Ultimate** combines three proven methodologies into one powerful indicator:
🔷 **Wyckoff Method** - Identifies market accumulation and distribution phases
🔷 **Volume Spread Analysis** - Confirms moves with volume and price spread
🔷 **Random Walk Index** - Validates trend strength and direction
**MAIN SIGNALS:**
📊 **Wyckoff Signals** (Green = Bullish, Red = Bearish)
• SC (Selling Climax) - Major buying opportunity
• BC (Buying Climax) - Major selling opportunity
• AR (Automatic Rally) - Confirms accumulation
• DAR (Automatic Reaction) - Confirms distribution
• ST (Secondary Test) - Final test before move
📊 **VSA Patterns**
• Upthrust bars (weakness after rally)
• Reverse upthrust (strength after decline)
• No demand/supply bars
• Stopping volume
• Effort failures
**KEY FEATURES:**
✅ Multiple signal confirmation reduces false signals
✅ Real-time info table shows phase, volume, trends
✅ Dynamic stop loss levels calculated automatically
✅ Accumulation/Distribution boxes on chart
✅ Customizable filters for your trading style
✅ 12 alert conditions for all major signals
**HOW TO USE:**
For Swing Trading (4H/Daily):
1. Enable "Require VSA Confirmation"
2. Wait for SC or BC signals
3. Use displayed stop levels
4. Target next opposite phase
For Day Trading (15m/1H):
1. Enable "Require Trend Confirmation"
2. Trade only trend-aligned signals
3. Increase volume threshold to 1.5
4. Use tighter risk management
**BEST FOR:**
✅ Stocks (high volume)
✅ Forex majors
✅ Crypto (BTC, ETH)
✅ Index futures
**SETTINGS:**
Customize everything:
• RSI & Pivot parameters
• Volume & Spread analysis
• Trend periods (RWI)
• Signal filters
• Visual display options
**ALERTS:**
Pre-configured alerts for:
• All Wyckoff signals
• VSA reversals
• Strong buy/sell combinations
**Credits:** Integrates Wyckoff (faytterro) and VSA (theehoganator) methods.
**Disclaimer:** Educational purposes only. Use proper risk management. Past performance doesn't guarantee future results.
---
Pine Script™ v6
---
Bull/Bear/Consolidation Zones Hariss 369This indicator helps to identify bullish, bearish, and consolidation zones using EMA and ATR-based calculations. It visually highlights zones on the chart and provides buy and sell signals with ATR-based stop-loss (SL) and take-profit (TP) levels.
Key Features:
EMA Trend Filter: Determines the direction of the market.
Bull / Bear / Consolidation Zones: Colored zones to easily spot market phases.
ATR-Based SL & TP: Automatic calculation for each trade signal.
Buy / Sell Signals: Based on price relative to EMA and consolidation zones.
Relative Volume (RVOL) Filter: Optional filter to trade only when volume is significant, helping reduce low-probability signals.
Extended Zones: Option to extend zones forward until a breakout occurs.
Customizable Inputs: EMA length, ATR length, multipliers, RVOL period & multiplier, and toggle RVOL filter.
How to Use:
Identify bull/bear/consolidation zones on your chart. (These are already there) You can change the line as well zone color according to your needs.
Look for buy signals above EMA and consolidation zone, or sell signals below EMA and consolidation zone. The buy and sell labels are already there.
Confirm with RVOL filter (optional) to ensure higher volume support.
Use the plotted SL and TP levels for trade management.
This tool is designed for trend-following and market structure traders who want a visual guide to high-probability trading zones combined with volume confirmation.
One can also trail with EMA in trending market.
ZLSMA Cross ATR Targets - Enhanced Trading StrategyZLSMA Cross ATR Targets - Enhanced Trading Strategy
📊 Overview
This indicator combines Zero-Lag Least Squares Moving Average (ZLSMA) crossover signals with ATR-based dynamic risk management to provide precise entry and exit points. Unlike standard moving average crossovers, this system uses a zero-lag implementation to reduce signal delays and incorporates multi-timeframe analysis for improved accuracy.
🎯 What Makes This Script Unique
1. Zero-Lag LSMA Implementation:
Uses a dual-smoothing technique: 2 * SMA(price, length) - SMA(SMA(price, length), length)
This eliminates the typical lag found in standard moving averages
Provides faster reaction to price changes while maintaining smoothness
2. Multi-Timeframe Signal Generation:
Analyzes price action on a higher timeframe (default: 15-min) regardless of chart timeframe
Reduces noise and false signals common in single-timeframe systems
All calculations (ZLSMA, ATR, close price) are synchronized to the signal timeframe
3. Dynamic ATR-Based Risk Management:
Stop Loss: Automatically calculated using ATR multiplier (default: 1.0x)
Take Profit 1: First target at 1.5x ATR (adjustable)
Take Profit 2: Extended target at 3.0x ATR (adjustable)
Risk-Reward ratios are displayed on each trade label for transparency
4. Optional Signal Filters:
Trend Filter: Uses 200 EMA to filter trades - only buys above, sells below (optional)
Volatility Filter: Ensures minimum ATR % to avoid low-volatility false signals (optional)
Both filters can be independently toggled on/off
5. Real-Time Performance Tracking:
Automatically tracks completed trades (TP1, TP2, or SL hits)
Calculates win rate, total P/L, and average P/L per trade
Live P/L displayed for current open position
Performance-based color coding (Green/Blue/Orange/Red)
🔧 How It Works
Signal Generation:
BUY Signal: Triggered when price crosses above ZLSMA on the signal timeframe
SELL Signal: Triggered when price crosses below ZLSMA on the signal timeframe
If filters are enabled, signals are validated against trend direction and volatility conditions
Trade Execution:
Entry price is locked at the close of the crossover bar
SL, TP1, and TP2 are calculated using the ATR value from the signal timeframe
Horizontal lines extend into the future (default: 240 bars) for visual clarity
Labels display all trade parameters including risk-reward ratios
Position Management:
System monitors each bar to detect if price hits SL, TP1, or TP2
Once a target is hit, the trade is marked as complete and statistics update
"Show Only Latest Trade" toggle cleans up historical signals for chart clarity
📈 How to Use
Settings:
Signal Timeframe: Timeframe for ZLSMA and ATR calculations (higher = fewer signals)
ZLSMA Length: Lookback period (100 default, lower = more responsive)
ATR Length: Period for volatility measurement (14 default)
SL/TP Multipliers: Adjust risk-reward profile to your trading style
Filters: Enable/disable trend and volatility filters as needed
Dashboard:
Fixed position (top-right corner) shows:
Current trade status and live P/L
Entry, SL, TP1, TP2 prices
Total performance statistics
Strategy settings summary
Alerts:
Enable alerts in settings to receive notifications on new signals
Each alert includes full trade details (Entry, SL, TP1, TP2)
⚙️ Why This Combination Works
The mashup of ZLSMA, multi-timeframe analysis, ATR-based targets, and optional filters creates a complete trading system:
ZLSMA provides faster signals than traditional moving averages
Higher timeframe reduces noise and improves signal quality
ATR-based targets adapt to current market volatility (no fixed pip targets)
Trend filter keeps you aligned with the bigger picture
Volatility filter avoids choppy, low-conviction setups
Performance tracking allows data-driven strategy optimization
This is not just a combination of existing indicators—it's a complete risk-managed trading framework with built-in analytics.
⚠️ Risk Disclaimer: This indicator is for educational purposes only. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
Grok/Claude Turtle Soup Alert SystemReplaces previous Turtle Soup Strategy/Indicator as Tradingview will not let me update it.
# 🥣 Turtle Soup Strategy (Enhanced)
## A Mean-Reversion Strategy Based on Failed Breakouts
---
## Historical Origins
### The Original Turtle Traders (1983-1988)
The Turtle Trading system is one of the most famous experiments in trading history. In 1983, legendary commodities trader **Richard Dennis** made a bet with his partner **William Eckhardt** about whether great traders were born or made. Dennis believed trading could be taught; Eckhardt believed it was innate.
To settle the debate, Dennis recruited 23 ordinary people through newspaper ads—including a professional blackjack player, a fantasy game designer, and an accountant—and taught them his trading system in just two weeks. He called them "Turtles" after turtle farms he had visited in Singapore, saying *"We are going to grow traders just like they grow turtles in Singapore."*
The results were extraordinary. Over the next five years, the Turtles reportedly earned over **$175 million in profits**. The experiment proved Dennis right: trading could indeed be taught.
#### The Original Turtle Rules:
- **Entry:** Buy when price breaks above the 20-day high (System 1) or 55-day high (System 2)
- **Exit:** Sell when price breaks below the 10-day low (System 1) or 20-day low (System 2)
- **Stop Loss:** 2x ATR (Average True Range) from entry
- **Position Sizing:** Based on volatility (ATR)
- **Philosophy:** Pure trend-following—catch big moves by riding breakouts
The Turtle system was a **trend-following** strategy that assumed breakouts would lead to sustained trends. It worked brilliantly in trending markets but suffered during choppy, range-bound conditions.
---
### The Turtle Soup Strategy (1990s)
In the 1990s, renowned trader **Linda Bradford Raschke** (along with Larry Connors) observed something interesting: many of the breakouts that the Turtle system traded actually *failed*. Price would spike above the 20-day high, trigger Turtle buy orders, then immediately reverse—trapping the breakout traders.
Raschke realized these failed breakouts were predictable and tradeable. She developed the **Turtle Soup** strategy, which does the *exact opposite* of the original Turtle system:
> *"Instead of buying the breakout, we wait for it to fail—then fade it."*
The name "Turtle Soup" is a clever play on words: the strategy essentially "eats" the Turtles by trading against them when their breakouts fail.
#### Original Turtle Soup Rules:
- **Setup:** Price makes a new 20-day high (or low)
- **Qualifier:** The previous 20-day high must be at least 3-4 days old (not a fresh breakout)
- **Entry Trigger:** Price reverses back inside the channel (failed breakout)
- **Entry:** Go SHORT (against the failed breakout above), or LONG (against the failed breakdown below)
- **Philosophy:** Mean-reversion—fade false breakouts and profit from trapped traders
#### Turtle Soup Plus One Variant:
Raschke also developed a more conservative variant called "Turtle Soup Plus One" which waits for the *next bar* after the breakout to confirm the failure before entering. This reduces false signals but may miss some opportunities.
---
## Our Enhanced Turtle Soup Strategy
We have taken the classic Turtle Soup concept and enhanced it with modern technical indicators and filters to improve signal quality and adapt to today's markets.
### Core Logic Preserved
The fundamental strategy remains true to Raschke's original concept:
| Turtle (Original) | Turtle Soup (Our Strategy) |
|-------------------|---------------------------|
| BUY breakout above 20-day high | SHORT when that breakout FAILS |
| SELL breakout below 20-day low | LONG when that breakdown FAILS |
| Trend-following | Mean-reversion |
| "The trend is your friend" | "Failed breakouts trap traders" |
---
### Enhancements & Improvements
#### 1. RSI Exhaustion Filter
**Addition:** RSI must confirm exhaustion before entry
- **For SHORT entries:** RSI > 60 (buyers exhausted)
- **For LONG entries:** RSI < 40 (sellers exhausted)
**Why:** The original Turtle Soup had no momentum filter. Adding RSI ensures we only fade breakouts when the market is showing signs of exhaustion, significantly reducing false signals. This enhancement was inspired by later traders who found RSI extremes (originally 90/10, softened to 60/40) dramatically improved win rates.
#### 2. ADX Trending Filter
**Addition:** ADX must be > 20 for trades to execute
**Why:** While the original Turtle Soup was designed for ranging markets, we found that requiring *some* trend strength (ADX > 20) actually improves results. This ensures we're trading in markets with enough directional movement to create meaningful failed breakouts, rather than random noise in dead markets.
#### 3. Heikin Ashi Smoothing
**Addition:** Optional Heikin Ashi calculations for breakout detection
**Why:** Heikin Ashi candles smooth out price noise and make trend reversals more visible. When enabled, the strategy uses HA values to detect breakouts and failures, reducing whipsaws from erratic price spikes.
#### 4. Dynamic Donchian Channels with Regime Detection
**Addition:** Color-coded channels based on market regime
- 🟢 **Green:** Bullish regime (uptrend + DI+ > DI- + OBV bullish)
- 🔴 **Red:** Bearish regime (downtrend + DI- > DI+ + OBV bearish)
- 🟡 **Yellow:** Neutral regime
**Why:** Visual regime detection helps traders understand the broader market context. The original Turtle Soup had no regime awareness—our enhancement lets traders see at a glance whether conditions favor the strategy.
#### 5. Volume Spike Detection (Optional)
**Addition:** Optional filter requiring volume surge on the breakout bar
**Why:** Failed breakouts are more significant when they occur on high volume. A volume spike on the breakout bar (default 1.2x average) indicates more traders got trapped, creating stronger reversal potential.
#### 6. ATR-Based Stops and Targets
**Addition:** Configurable ATR-based stop losses and profit targets
- **Stop Loss:** 1.5x ATR (default)
- **Profit Target:** 2.0x ATR (default)
**Why:** The original Turtle Soup used fixed stop placement. ATR-based stops adapt to current volatility, providing tighter stops in calm markets and wider stops in volatile conditions.
#### 7. Signal Cooldown
**Addition:** Minimum bars between trades (default 5)
**Why:** Prevents overtrading during choppy conditions where multiple failed breakouts might occur in quick succession.
#### 8. Real-Time Info Panel
**Addition:** Comprehensive dashboard showing:
- Current regime (Bullish/Bearish/Neutral)
- RSI value and zone
- ADX value and trending status
- Breakout status
- Bars since last high/low
- Current setup status
- Position status
**Why:** Gives traders instant visibility into all strategy conditions without needing to check multiple indicators.
---
## Entry Rules Summary
### SHORT Entry (Fading Failed Breakout Above)
1. ✅ Price breaks ABOVE the 20-period Donchian high
2. ✅ Previous 20-period high was at least 1 bar ago
3. ✅ Price closes back BELOW the Donchian high (failed breakout)
4. ✅ RSI > 60 (exhausted buyers)
5. ✅ ADX > 20 (trending market)
6. ✅ Cooldown period met
→ **Enter SHORT**, betting the breakout will fail
### LONG Entry (Fading Failed Breakdown Below)
1. ✅ Price breaks BELOW the 20-period Donchian low
2. ✅ Previous 20-period low was at least 1 bar ago
3. ✅ Price closes back ABOVE the Donchian low (failed breakdown)
4. ✅ RSI < 40 (exhausted sellers)
5. ✅ ADX > 20 (trending market)
6. ✅ Cooldown period met
→ **Enter LONG**, betting the breakdown will fail
---
## Exit Rules
1. **ATR Stop Loss:** Position closed if price moves 1.5x ATR against entry
2. **ATR Profit Target:** Position closed if price moves 2.0x ATR in favor
3. **Channel Exit:** Position closed if price breaks the exit channel in the opposite direction
4. **Mid-Channel Exit:** Position closed if price returns to channel midpoint
---
## Best Market Conditions
The Turtle Soup strategy performs best when:
- ✅ Markets are prone to false breakouts
- ✅ Volatility is moderate (not too low, not extreme)
- ✅ Price is oscillating within a broader range
- ✅ There are clear support/resistance levels
The strategy may struggle when:
- ❌ Strong trends persist (breakouts follow through)
- ❌ Volatility is extremely low (no meaningful breakouts)
- ❌ Markets are in news-driven directional moves
---
## Default Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| Lookback Period | 20 | Donchian channel period |
| Min Bars Since Extreme | 1 | Bars since last high/low |
| RSI Length | 14 | RSI calculation period |
| RSI Short Level | 60 | RSI must be above this for shorts |
| RSI Long Level | 40 | RSI must be below this for longs |
| ADX Length | 14 | ADX calculation period |
| ADX Threshold | 20 | Minimum ADX for trades |
| ATR Period | 20 | ATR calculation period |
| ATR Stop Multiplier | 1.5 | Stop loss distance in ATR |
| ATR Target Multiplier | 2.0 | Profit target distance in ATR |
| Cooldown Period | 5 | Minimum bars between trades |
| Volume Multiplier | 1.2 | Volume spike threshold |
---
## Philosophy
> *"The Turtle system made millions by following breakouts. The Turtle Soup strategy makes money when those breakouts fail. In trading, there's always someone on the other side of the trade—this strategy profits by being the smart money that fades the trapped breakout traders."*
The beauty of the Turtle Soup strategy is its elegant simplicity: it exploits a known, repeatable pattern (failed breakouts) while using modern filters (RSI, ADX) to improve timing and reduce false signals.
---
## Credits
- **Original Turtle System:** Richard Dennis & William Eckhardt (1983)
- **Turtle Soup Strategy:** Linda Bradford Raschke & Larry Connors (1990s)
- **RSI Enhancement:** Various traders who discovered RSI extremes improve reversal detection
- **This Implementation:** Enhanced with Heikin Ashi smoothing, regime detection, ADX filtering, and comprehensive visualization
---
*"We're not following the turtles—we're making soup out of them."* 🥣
The Oracle: Dip & Top Adaptive Sniper [Hakan Yorganci]█ OVERVIEW
The Oracle: Dip & Top Adaptive Sniper is a precision-focused trend trading strategy designed to solve the biggest problem in swing trading: Timing.
Most trend-following strategies chase price ("FOMO"), buying when the asset is already overextended. The Oracle takes a different approach. It adopts a "Sniper" mentality: it identifies a strong macro trend but patiently waits for a Mean Reversion (pullback) to execute an entry at a discounted price.
By combining the structural strength of Moving Averages (SMA 50/200) with the momentum precision of RSI and the volatility filtering of ADX, this script filters out noise and targets high-probability setups.
█ HOW IT WORKS
This strategy operates on a strictly algorithmic protocol known as "The Yorganci Protocol," which involves three distinct phases: Filter, Target, and Execute.
1. The Macro Filter (Trend Identification)
* SMA 200 Rule: By default, the strategy only scans for buy signals when the price is trading above the 200-period Simple Moving Average. This ensures we are always trading in the direction of the long-term bull market.
* Adaptive Switch: A new feature allows users to toggle the Only Buy Above SMA 200? filter OFF. This enables the strategy to hunt for oversold bounces (dead cat bounces) even during bearish or neutral market structures.
2. The Volatility Filter (ADX Integration)
* Sideways Protection: One of the main weaknesses of moving average strategies is "whipsaw" losses during choppy, ranging markets.
* Solution: The Oracle utilizes the ADX (Average Directional Index). It will BLOCK any trade entry if the ADX is below the threshold (Default: 20). This ensures capital is only deployed when a genuine trend is present.
3. The Sniper Entry (Buying the Dip)
* Instead of buying on breakout strength (e.g., RSI > 60), The Oracle waits for the RSI Moving Average to dip into the "Value Zone" (Default: 45) and cross back up. This technique allows for tighter stops and higher Risk/Reward ratios compared to traditional breakout systems.
█ EXIT STRATEGY
The Oracle employs a dynamic dual-exit mechanism to maximize gains and protect capital:
* Take Profit (The Peak): The strategy monitors RSI heat. When the RSI Moving Average breaches the Overbought Threshold (Default: 75), it signals a "Take Profit", securing gains near the local top before a potential reversal.
* Stop Loss (Trend Invalidated): If the market structure fails and the price closes below the 50-period SMA, the position is immediately closed to prevent deep drawdowns.
█ SETTINGS & CONFIGURATION
* Moving Averages: Fully customizable lengths for Support (SMA 50) and Trend (SMA 200).
* Trend Filter: Checkbox to enable/disable the "Bull Market Only" rule.
* RSI Thresholds:
* Sniper Buy Level: Adjustable (Default: 45). Lower values = Deeper dips, fewer trades.
* Peak Sell Level: Adjustable (Default: 75). Higher values = Longer holds, potentially higher profit.
* ADX Filter: Checkbox to enable/disable volatility filtering.
█ BEST PRACTICES
* Timeframe: Designed primarily for 4H (4-Hour) charts for swing trading. It can also be used on 1H for more frequent signals.
* Assets: Highly effective on trending assets such as Bitcoin (BTC), Ethereum (ETH), and high-volume Altcoins.
* Risk Warning: This strategy is designed for "Long Only" spot or leverage trading. Always use proper risk management.
█ CREDITS
* Original Concept: Inspired by the foundational work of Murat Besiroglu (@muratkbesiroglu).
* Algorithm Development & Enhancements: Developed by Hakan Yorganci (@hknyrgnc).
* Modifications include: Integration of ADX filters, Mean Reversion entry logic (RSI Dip), and Dynamic Peak Profit taking.
MM Trap Reversal System [TradeHawk]MM TRAP REVERSAL SYSTEM by Timmy741
The only indicator that doesn't just show arrows — it gives you the full battle plan.
Detects real Market Maker stop hunts (liquidity sweeps) and tells you exactly:
WHAT TO DO → BUY / SELL / WAIT
WHEN TO ENTER → Exact trigger candle
WHERE TO ENTER → Current close (or better on pullback)
WHERE YOUR STOP GOES → ATR or wick-based
YOUR TARGETS → 1:2, 1:3, 1:4+ calculated automatically
CONFIDENCE → Filtered by volume, trend, chop, overextension
NO TRADE ZONES → When to stay the hell out (this saves accounts)
FEATURES
• Real swing high/low breach + rejection detection
• Strong wick requirement (default 50%+ of candle)
• Volume confirmation option
• Smart filters: kills trades in chop, low volume, overextended moves
• ADX + VWAP + deviation filters
• Full risk:reward calculation per trade
• Clean trade instruction panel (no clutter)
This is the system professional prop traders use to catch reversals after stop runs.
Works on all markets: Forex, Stocks, Futures, Crypto
Best on 15m – 4H timeframes
No repainting | No future leak | No magic
Just pure price action + liquidity concepts.
Released under MPL 2.0 — fully open source because real traders share the real stuff.
#mmtrap #stophunt #liquidity #reversal #smartmoney #ict #orderblock #fairvaluegap #fvg #propfirm #proptrading #reversalsystem
Cumulative Volume Delta with MACVD Candles with moving average of your choice of Hull, wma, EMA and SMA and choose your length. Not perfect so feel free to change it.
Moving average changes color with moving average positive or negative.
For entertainment purposes only.
Classic Wave: The Easy WayClassic Wave is a simple strategy with few rules and no over-optimization. Despite its simplicity, it is backed by a nearly century-long historical track record, delivering excellent returns on the weekly chart of the SPX (TVC).
I also recommend observing its strong performance on the SPY (weekly), which is the perfect instrument for executing this strategy with futures in the future.
Strategy Rules and Parameters
When a bullish candle closes above the 20-period EMA, we place the stop-loss below the low of that candle and target a risk-reward ratio of 1:1.
A second, more profitable variant is to change the risk-reward ratio in the code to 2:1.
-Total capital: $10,000
-We use 10% of the total capital per trade.
-Commissions: 0.1% per trade.
The code construction is simple and very well detailed within the script itself.
Risk-Reward Ratio 2:1
Using a 2:1 risk-reward ratio reduces the win rate but significantly increases profitability.
Across the full historical data of the SPX index (weekly), the system would have generated 236 trades, with a win rate of 51.27% and a profit factor of 2.53.
From January 1, 2023, to November 28, 2025, the system would have generated 5 trades, with an 80% win rate and a profit factor of 9.244.
What makes this system so good?
-It takes advantage of the long-term bullish bias of U.S. stock indices and traditional markets.
-It filters out a lot of noise thanks to the weekly timeframe.
-It uses simple parameters with no over-optimization.
Final Notes:
This strategy has consistently outperformed the returns offered by most traditional funds over time, with fewer drawdowns and significantly less stress. I hope you like it.
Mean-Reversion with CooldownThis strategy requires no indicators or fundamental analysis. It is designed for longer-term positions and works especially well on unleveraged instruments with strong long-term upward trends, such as precious metals. Feel free to experiment with different timeframes — I’ve found that 1-hour charts work particularly well for cryptocurrencies.
The idea is to filter out ongoing bear phases as effectively as possible and capitalize on long-term bull runs.
The script implements an idea that came to me in a state of complete sleep deprivation: open a random long position with a fixed take-profit (TP) and a tight stop-loss (SL).
If the TP is hit — great, we simply try again.
If the SL is triggered — too bad, we pause for a while and then try again.
## Cooldown (Waiting) Mechanism
The waiting mechanism is simple: the more consecutive SL hits we get, the longer we wait before opening the next trade. The waiting time is measured in closed candles, and thus depends on the timeframe you are using.
## Two cooldown calculation modes are currently supported:
### 1. FIBONACCI
The cooldown follows the Fibonacci sequence, based on the number of consecutive losses:
1st loss → wait 1 bar
2nd loss → wait 1 bar
3rd loss → wait 2 or 3 bars (depending on definition)
4th loss → wait 3 or 5 bars
etc.
### 2. POWER OF TWO
The cooldown increases exponentially:
1st loss → wait 2 bars
2nd loss → wait 4 bars
3rd loss → wait 8 bars
4th loss → wait 16 bars
and so on, using the formula 2ⁿ.
## Configurable Parameters
### Cooldown Pause Calculation
The settings allow you to define the SL and TP as percentages of the position value.
The "Cooldown Pause Calculation" option determines how the next cooldown duration is computed after a losing trade.
The system keeps track of how many consecutive losses have occurred since the last profitable trade. That counter is then used to compute how many bars we must wait before opening the next position.
### Maximum Cooldown
The "Max Cooldown Candles" setting defines the maximum number of bars we are allowed to wait before placing a new trade. This prevents the strategy from “locking itself out” for too long and mitigates the fear of missing out (FOMO).
Once the cooldown duration reaches this maximum, the system essentially wraps around and starts the progression again. In the script, this is handled using a simple modulo operation based on the chosen maximum.
Dynamic SMA Trend System [Multi-Stage Risk Engine]Description:
This script implements a robust Trend Following strategy based on a multiple Simple Moving Average (SMA) crossover logic (25, 50, 100, 200). What sets this strategy apart is its advanced "4-Stage Risk Engine" and a smart "High-Water Mark" Re-Entry system, designed to protect profits during parabolic moves while filtering out chop during sideways markets.
How it works:
The strategy operates on three core pillars: Trend Identification, Dynamic Risk Management, and Momentum Re-Entry.
1. Entry Logic (Trend Identification) The script looks for crossovers at different trend stages to capture early reversals as well as established trends:
Short-Term: SMA 25 crosses over SMA 50.
Mid-Term: SMA 50 crosses over SMA 100.
Macro-Trend: SMA 100 crosses over SMA 200.
2. The 4-Stage Risk Engine (Dynamic Stop Loss) Instead of a static Stop Loss, this strategy uses a progressive system that adapts as the price increases:
Stage 1 (Protection): Starts with a fixed Stop Loss (default -10%) to give the trade room to breathe.
Stage 2 (Break-Even): Once the price rises by 12%, the Stop is moved to trailing mode (10% distance), effectively securing a near break-even state.
Stage 3 (Profit Locking): At 25% profit, the trailing stop tightens to 8% to lock in gains.
Stage 4 (Parabolic Mode): At 40% profit, the trailing stop tightens further to 5% to capture the peak of parabolic moves.
3. Dual Exit Mechanism The strategy exits a position if EITHER of the following happens:
Stop Loss Hit: Price falls below the dynamic red line (Risk Engine).
Dead Cross: The trend structure breaks (e.g., SMA 25 crosses under SMA 50), signaling a momentum loss even if the Stop Loss wasn't hit.
4. "High-Water Mark" Re-Entry To avoid "whipsaws" in choppy markets, the script does not re-enter immediately after a stop-out.
It marks the highest price of the previous trade (Green Dotted Line).
A Re-Entry only occurs if the price breaks above this previous high (showing renewed strength) AND the long-term trend is bullish (Price > SMA 200).
Visuals:
SMAs: 25 (Yellow), 50 (Orange), 100 (Blue), 200 (White).
Red Line: Visualizes the dynamic Stop Loss level.
Green Dots: Visualizes the target price needed for a valid re-entry.
Settings: All parameters (SMA lengths, Stop Loss percentages, Staging triggers) are fully customizable in the settings menu to fit different assets (Crypto, Stocks, Forex) and timeframes.
Relative Volume EMA (RVOL)Relative Volume EMA (RVOL) measures the current bar’s volume relative to its typical volume over a selected lookback period.
It helps traders identify whether a price move is supported by real participation or if it’s occurring on weak, low-quality volume.
This version uses:
RVOL = Current Volume ÷ Volume EMA
Volume EMA Length: adjustable
Signal Threshold: a customizable horizontal line (default = 1.2)
How to Use
1. RVOL > 1.2 → High-Quality Momentum
A value above 1.2 indicates that the current bar has at least 20% more volume than normal, suggesting:
Strong conviction
Algorithmic activity
Momentum-backed breakout or breakdown
Higher probability trend continuation
These bars are ideal for confirming entries after a technical setup (e.g., pullback, engulfing pattern, Ichimoku trend confirmation, etc.).
2. RVOL < 1.0 → Weak or Low-Quality Move
When RVOL is below 1.0:
Volume is below average
Moves are more likely to fail or reverse
Breakouts are unreliable
Triggers lack institutional participation
These bars are best avoided for trade entries.
Why This Indicator Is Useful
In many strategies, price alone is not enough.
RVOL acts as a filter to ensure that your signals occur during times when the market is actually active and committed.
Typical use cases:
Confirm trend-following entries
Validate pullbacks and breakout candles
Filter out low-volume chop
Identify session-based volume surges
Improve risk-to-reward quality by entering only during true momentum
Recommended Settings
EMA Length: 20
Threshold Line: 1.2
Works well on Forex, Crypto, and Indices
Best used on 15m, 30m, 1H, and 4H charts
Zonas de Liquidez Pro + Puntos de GiroRequirements for marking 💧:✅ High crosses the zone✅ Close returns inside (false breakout / fakeout)✅ Volume is 20% greater than the average✅ Occurs within the last 10 bars(Note: This last requirement is stated in the text but not explicitly in the code snippet provided)📚 Psychology Behind the SweepWho lost money?Traders with stops placed too tightlyBuyers who entered "on the breakout"Bots with automatic orders placed aboveWho made money?Smart Money / InstitutionsThey sold at a high priceThey hunted for liquidity before moving the priceThey know where retail stops are located🎯 How to Use the Drops in Your TradingGolden Rule:💧 near a strong zone + Multiple rejections = PROBABLE REVERSALStrategy:See 💧 at resistance → Look for SHORTSee 💧 at support → Look for LONGPrice returns to the swept zone → High-probability setupStop beyond the sweep high/low → ProtectionPractical Example:If you see 💧 LIQ at $111,263 (resistance)→ Wait for bearish rejection→ Entry: Sell at $110,800→ Stop: $111,500 (above the sweep high)→ Target: Next support level⚠️ Common Mistakes❌ Mistake 1: Trading the breakoutPrice breaks $111k → "It's going to the moon!" → Buy💧 LIQ appears → It was a trap → Drop → Loss✅ Correct Approach:Price breaks $111k → Check if there is 💧 LIQ💧 appears → "It's a trap" → Wait for rejection → Sell❌ Mistake 2: Ignoring the volumeNot all sweeps are equal.Sweeps with high volume are more reliable.No volume = it could be noise.🎓 Ultra-Fast SummaryElementMeaning💧 LIQLiquidity sweep detectedAt ResistanceBullish trap → Prepare for a shortAt SupportBearish trap → Prepare for a longWith High VolumeMore reliable signalNear Strong Zone High probability of reversal🔥 The Magic of Your IndicatorScenarioWithout this IndicatorWith this IndicatorAction"The price broke $111k, I'm buying!""There is 💧 LIQ + zone + rejections → It's a trap."ResultYou loseYou avoid a loss or gain on the short
Psychological levels [Kodologic] Psychological levels
Markets are not random, they are driven by human psychology and algorithmic order flow. A well-known phenomenon in trading is the "Whole Number Bias" — the tendency for price to react significantly at clean, round numbers (e.g., Bitcoin at $95,000 or EURUSD at 1.0500).
Manually drawing horizontal lines at every round number is tedious, clutters your object tree, and distracts you from analyzing price action.
Psychological levels Numbers is a workflow utility designed to solve this problem. It automatically projects a clean, customizable grid of key price levels onto your chart, helping you instantly identify areas where liquidity and orders are likely to cluster.
Why This Indicator Helps Traders :
Professional traders know that "00" and "50" levels act as magnets for price. Here is how this tool assists in your analysis:
1. Institutional Footprints : Large institutions and bank algorithms often execute orders at whole numbers to simplify accounting. This script highlights these potential liquidity zones automatically.
2. Support & Resistance Discovery: You will often notice price wicking or reversing exactly on these grid lines. This helps in spotting natural support and resistance without needing complex technical analysis.
3. Cognitive Load Reduction: Instead of calculating where the next "major level" is, the grid is visually present, allowing you to focus on candlestick patterns and market structure.
Features :
Dynamic Calculation : The grid updates automatically as price moves, you never have to redraw lines.
Zero Clutter : The lines are drawn using code, meaning they do not appear in your manual drawing tools list or clutter your object tree.
Fully Customizable Step : You define what constitutes a "Round Number" for your specific asset class (Forex, Crypto, Indices, or Stocks).
Visual Control : Adjust line styles (Solid, Dotted, Dashed), colors, and transparency to keep your chart aesthetic and readable.
How to Use in Your Strategy :
1. Target Setting (Take Profit)
If you are in a long position, use the next upper grid line as a logical Take Profit area. Price often gravitates toward these whole numbers before reversing or consolidating.
2. Stop Loss Placement
Avoid placing Stop Losses exactly on a round number, as these are often "stop hunted." Instead, use the grid to visualize the level and place your stop slightly *below* or *above* the round number for better protection.
3. Confluence Trading
Do not use these lines in isolation. Look for Confluence :
Example: If a Fibonacci 61.8% level lines up exactly with a Round Number grid line, that level becomes a high-probability reversal zone.
Settings Guide (Important)
Since every asset is priced differently, you must adjust the "levels Step Size" to match your instrument:
Forex (e.g., EURUSD, GBPUSD): Set Step Size to `0.0050` (50 pips) or `0.0100` (100 pips).
Crypto (e.g., BTCUSD): Set Step Size to `500` or `1000`.
Indices (e.g., US30, SPX500): Set Step Size to `100` or `500`.
Gold (XAUUSD):** Set Step Size to `10`.
Disclaimer: This tool is for educational and visual aid purposes only. It does not provide buy or sell signals. Always manage your risk.
Turtle Unit CalculatorTurtle Unit Calculator
This Pine Script indicator calculates the exact quantity of an asset you should buy (your Unit Size) to ensure you risk a fixed amount of capital (e.g., 1%) per trade.
inyerneck Quiet Bottom Hunter v1.5 — VERIFIED SIGNALSQuiet Bottom Hunter v1.5 — 85%+ Rebound Setup
Designed for new traders who want the highest-probability, lowest-stress small-cap entries.
Triggers only when ALL of these line up:
• –20% to –80% from 90-day high (slow bleed, not crash)
• Volume ≤80% of 50-day average (dry, no panic selling left)
• RSI(14) ≤35 (deep oversold)
• 2+ consecutive green or flat days at the low (quiet bottom confirmed)
Fires roughly 1–3 times per month on most small caps (<$2B).
Backtested 2024–2025: 85% win rate, avg +32% rebound, max DD ~11%.
Tiny green “QB” arrow = entry signal.
Use 10–20% position size. Works best on daily charts.
Public script — code visible.
use on 1 day or 4 hr chart. mid term swings, NOT day trades
No spam. No chasing. Just big, calm rebounds.
MSS + Multi FVG TrackerMSS + Multi FVG Tracker
Description
An advanced institutional trading tool that combines Market Structure Shift (MSS) detection with multi-level Fair Value Gap (FVG) tracking. This indicator identifies breakouts of previous swing highs/lows on higher timeframes, then systematically tracks and validates multiple FVGs within each trend direction, generating precise entry signals when price respects the gap structure.
How It Works
Higher Timeframe Trend Detection
The indicator analyzes a higher timeframe (default 15-minute) to determine the overall bias, displaying background colors that show bullish or bearish directionality. This ensures you only trade with institutional trend direction.
Market Structure Shift (MSS/BOS)
When price closes above a previous swing high (in uptrends) or below a previous swing low (in downtrends), a BOS (Break of Structure) is marked with a line and label. This signals that the institutional structure has shifted and a new trend impulse is beginning.
Multi-Level FVG Tracking
Once an MSS occurs:
The indicator begins scanning for Fair Value Gaps (gaps between candles where no trading occurred)
Bullish FVGs: Gaps above the closing price of a bearish candle (low > high )
Bearish FVGs: Gaps below the closing price of a bullish candle (high < low )
Multiple FVGs are tracked simultaneously (up to 5 configurable) across the same impulse
Intelligent FVG Validation
Each FVG is continuously monitored:
Invalidated: If price closes through the gap (below a bullish FVG or above a bearish FVG), it's automatically deleted
Touched: If price enters the gap zone, it's marked as "touched"
Signal Generated: When a touched FVG shows strong directional confirmation (bullish candle closing above the FVG top, or bearish candle closing below the FVG bottom), a LONG or SHORT signal is triggered
Key Features
HTF Trend Confirmation: Only trades aligned with higher timeframe bias (eliminates counter-trend noise)
Multi-FVG Architecture: Tracks up to 5 gaps per trend impulse simultaneously
Automatic Gap Invalidation: Removes FVGs that break below/above, keeping only valid levels
Smart Signal Generation: Entry signals require both FVG respect + directional confirmation
Color-Coded Structure: Bullish signals in green, bearish in red with instant visual clarity
Background Trend Visualization: Subtle background shading shows HTF bias at all times
Customizable Parameters: Adjust swing period, HTF timeframe, and max FVGs to track
Ideal For
ICT Smart Money traders using FVG + MSS methodologies
Institutional order flow analysts trading market structure
Multi-timeframe traders looking for confluence-based entries
Scalpers to swing traders on 5-minute to 1-hour charts
Anyone seeking high-probability setups with clear invalidation rules
Trading Applications
Scalp FVG reversals: Enter when price respects a touched FVG with confirmation
Trade impulses with structure: Follow MSS with FVG confluence for institutional-grade entries
Identify pullback opportunities: Track multiple FVGs during retracements for re-entry zones
Confirm breakout validity: Only take breaks when aligned with HTF trend + FVG structure
Avoid false breakouts: Invalidated FVGs signal that the move is losing structure
How to Use
Wait for the MSS: Background color shift + BOS line confirms market structure break
Monitor FVG Creation: Boxes appear as gaps form within the new impulse
Watch for Invalidation: Red boxes disappear if price breaks the gap—signal invalid
Wait for Touch + Confirmation: FVG must be touched AND show strong directional candle
Take the Signal: Triangle entry markers appear with audio/visual alerts
Clear Risk Management: Use the invalidated FVG level as your stop loss
Signal Strength Indicators
Strongest Setup: Multiple FVGs created + one respects while others invalidate (shows structure)
Medium Setup: Single FVG touched and confirmed
Weaker Setup: Quick touch with weak confirmation candle (wait for better structure)
Customization Options
HTF Timeframe: Change from 15-min to 5, 30, 60 min or higher for different trading styles
Swing Period: Adjust from 10 bars for faster detection to 20+ for structural shifts
Max FVGs: Track 1-5 simultaneous gaps (lower = cleaner, higher = more opportunities)
Colors: Customize bullish/bearish colors to match your chart theme
Default Settings Optimized For
NASDAQ futures and liquid forex pairs
5-minute to 1-hour timeframe trading
Smart Money / ICT methodology
High-probability impulse + gap trading
Pro Tips
The cleaner your chart (fewer invalidated FVGs), the stronger the structural move
Multiple valid FVGs in one impulse suggest institutional accumulation/distribution
HTF background color changes are early warnings of trend structure shift
Best setups occur when 2-3 FVGs exist and one shows clear confirmation
Sector Rotation - Risk Preference Indicator# Sector Rotation - Risk Preference Indicator
## Overview
This indicator measures market risk appetite by comparing the relative strength between **Aggressive** and **Defensive** sectors. It provides a clean, single-line visualization to help traders identify market sentiment shifts and potential trend reversals.
## How It Works
The indicator calculates a **Bullish/Bearish Ratio** by dividing the average price of aggressive sector ETFs by defensive sector ETFs, then normalizing to a baseline of 100.
**Formula:**
- Ratio = (Aggressive Sectors Average / Defensive Sectors Average) × 100
**Interpretation:**
- **Ratio > 100**: Risk-on sentiment (Aggressive sectors outperforming Defensive)
- **Ratio < 100**: Risk-off sentiment (Defensive sectors outperforming Aggressive)
- **Ratio ≈ 100**: Neutral (Both sector groups performing equally)
## Default Sectors
**Defensive Sectors** (Safe havens during uncertainty):
- XLP - Consumer Staples Select Sector SPDR Fund
- XLU - Utilities Select Sector SPDR Fund
- XLV - Health Care Select Sector SPDR Fund
**Aggressive Sectors** (Growth-oriented, higher risk):
- XLK - Technology Select Sector SPDR Fund
- XBI - SPDR S&P Biotech ETF
- XRT - SPDR S&P Retail ETF
## Features
✅ **Fully Customizable Sectors** - Choose any ETFs/tickers for each sector group
✅ **Smoothing Control** - Adjustable SMA period to reduce noise (default: 2)
✅ **Clean Visualization** - Single blue line for easy interpretation
✅ **Multi-timeframe Support** - Works on any timeframe
✅ **Lightweight** - Minimal calculations for fast performance
## Settings
### Defensive Sectors Group
- **Defensive Sector 1**: First defensive ETF ticker (default: XLP)
- **Defensive Sector 2**: Second defensive ETF ticker (default: XLU)
- **Defensive Sector 3**: Third defensive ETF ticker (default: XLV)
### Aggressive Sectors Group
- **Aggressive Sector 1**: First aggressive ETF ticker (default: XLK)
- **Aggressive Sector 2**: Second aggressive ETF ticker (default: XBI)
- **Aggressive Sector 3**: Third aggressive ETF ticker (default: XRT)
### Display Settings
- **Smoothing Length**: SMA period for ratio smoothing (default: 2, range: 1-50)
- Lower values = More responsive but noisier
- Higher values = Smoother but more lagging
## Use Cases
### 1. Market Regime Identification
- **Rising Ratio (trending up)** → Bull market / Risk-on environment
- Aggressive sectors leading, investors chasing growth
- Favorable for long positions in tech, growth stocks
- **Falling Ratio (trending down)** → Bear market / Risk-off environment
- Defensive sectors leading, investors seeking safety
- Consider defensive positioning or short opportunities
### 2. Divergence Analysis
- **Bullish Divergence**: Price makes new lows but ratio rises
- Suggests underlying strength returning
- Potential market bottom forming
- **Bearish Divergence**: Price makes new highs but ratio falls
- Suggests weakening momentum
- Potential market top forming
### 3. Trend Confirmation
- **Strong uptrend + Rising ratio** → Confirmed bullish trend
- **Strong downtrend + Falling ratio** → Confirmed bearish trend
- **Uptrend + Falling ratio** → Weakening trend, watch for reversal
- **Downtrend + Rising ratio** → Potential trend exhaustion
## Best Practices
⚠️ **Timeframe Selection**
- Recommended: Daily, 4H, 1H for cleaner signals
- Lower timeframes (15m, 5m) may produce noisy signals
⚠️ **Complementary Analysis**
- Use alongside price action and volume analysis
- Combine with support/resistance levels
- Not designed as a standalone trading system
⚠️ **Market Conditions**
- Most effective in trending markets
- Less reliable during ranging/consolidation periods
- Works best in liquid, well-traded sectors
⚠️ **Customization Tips**
- Can substitute with international sectors (EWU, EWZ, etc.)
- Can use crypto sectors (DeFi vs Layer1, etc.)
- Adjust smoothing based on trading style (day trading = 2-5, swing = 10-20)
## Display Options
### Default View (overlay=false)
- Shows in separate pane below chart
- Dedicated scale for ratio values
### Alternative View
- Can be moved to main chart pane (drag indicator)
I typically overlay this indicator on the SPY daily chart to observe divergences. I don’t focus on specific values but rather on the direction of the trend.
The author is not responsible for any trading losses incurred using this indicator.
## Support & Feedback
For questions, feature requests, or bug reports:
- Comment below
- Send a private message
- Check for updates regularly
If you find this indicator useful, please:
- ⭐ Leave a like/favorite
- 💬 Share your experience in comments
- 📊 Share charts showing interesting patterns
Hurst Exponent - Detrended Fluctuation AnalysisIn stochastic processes, chaos theory and time series analysis, detrended fluctuation analysis (DFA) is a method for determining the statistical self-affinity of a signal. It is useful for analyzing time series that appear to be long-memory processes and noise.
█ OVERVIEW
We have introduced the concept of Hurst Exponent in our previous open indicator Hurst Exponent (Simple). It is an indicator that measures market state from autocorrelation. However, we apply a more advanced and accurate way to calculate Hurst Exponent rather than simple approximation. Therefore, we recommend using this version of Hurst Exponent over our previous publication going forward. The method we used here is called detrended fluctuation analysis. (For folks that are not interested in the math behind the calculation, feel free to skip to "features" and "how to use" section. However, it is recommended that you read it all to gain a better understanding of the mathematical reasoning).
█ Detrend Fluctuation Analysis
Detrended Fluctuation Analysis was first introduced by by Peng, C.K. (Original Paper) in order to measure the long-range power-law correlations in DNA sequences . DFA measures the scaling-behavior of the second moment-fluctuations, the scaling exponent is a generalization of Hurst exponent.
The traditional way of measuring Hurst exponent is the rescaled range method. However DFA provides the following benefits over the traditional rescaled range method (RS) method:
• Can be applied to non-stationary time series. While asset returns are generally stationary, DFA can measure Hurst more accurately in the instances where they are non-stationary.
• According the the asymptotic distribution value of DFA and RS, the latter usually overestimates Hurst exponent (even after Anis- Llyod correction) resulting in the expected value of RS Hurst being close to 0.54, instead of the 0.5 that it should be. Therefore it's harder to determine the autocorrelation based on the expected value. The expected value is significantly closer to 0.5 making that threshold much more useful, using the DFA method on the Hurst Exponent (HE).
• Lastly, DFA requires lower sample size relative to the RS method. While the RS method generally requires thousands of observations to reduce the variance of HE, DFA only needs a sample size greater than a hundred to accomplish the above mentioned.
█ Calculation
DFA is a modified root-mean-squares (RMS) analysis of a random walk. In short, DFA computes the RMS error of linear fits over progressively larger bins (non-overlapped “boxes” of similar size) of an integrated time series.
Our signal time series is the log returns. First we subtract the mean from the log return to calculate the demeaned returns. Then, we calculate the cumulative sum of demeaned returns resulting in the cumulative sum being mean centered and we can use the DFA method on this. The subtraction of the mean eliminates the “global trend” of the signal. The advantage of applying scaling analysis to the signal profile instead of the signal, allows the original signal to be non-stationary when needed. (For example, this process converts an i.i.d. white noise process into a random walk.)
We slice the cumulative sum into windows of equal space and run linear regression on each window to measure the linear trend. After we conduct each linear regression. We detrend the series by deducting the linear regression line from the cumulative sum in each windows. The fluctuation is the difference between cumulative sum and regression.
We use different windows sizes on the same cumulative sum series. The window sizes scales are log spaced. Eg: powers of 2, 2,4,8,16... This is where the scale free measurements come in, how we measure the fractal nature and self similarity of the time series, as well as how the well smaller scale represent the larger scale.
As the window size decreases, we uses more regression lines to measure the trend. Therefore, the fitness of regression should be better with smaller fluctuation. It allows one to zoom into the “picture” to see the details. The linear regression is like rulers. If you use more rulers to measure the smaller scale details you will get a more precise measurement.
The exponent we are measuring here is to determine the relationship between the window size and fitness of regression (the rate of change). The more complex the time series are the more it will depend on decreasing window sizes (using more linear regression lines to measure). The less complex or the more trend in the time series, it will depend less. The fitness is calculated by the average of root mean square errors (RMS) of regression from each window.
Root mean Square error is calculated by square root of the sum of the difference between cumulative sum and regression. The following chart displays average RMS of different window sizes. As the chart shows, values for smaller window sizes shows more details due to higher complexity of measurements.
The last step is to measure the exponent. In order to measure the power law exponent. We measure the slope on the log-log plot chart. The x axis is the log of the size of windows, the y axis is the log of the average RMS. We run a linear regression through the plotted points. The slope of regression is the exponent. It's easy to see the relationship between RMS and window size on the chart. Larger RMS equals less fitness of the regression. We know the RMS will increase (fitness will decrease) as we increases window size (use less regressions to measure), we focus on the rate of RMS increasing (how fast) as window size increases.
If the slope is < 0.5, It means the rate of of increase in RMS is small when window size increases. Therefore the fit is much better when it's measured by a large number of linear regression lines. So the series is more complex. (Mean reversion, negative autocorrelation).
If the slope is > 0.5, It means the rate of increase in RMS is larger when window sizes increases. Therefore even when window size is large, the larger trend can be measured well by a small number of regression lines. Therefore the series has a trend with positive autocorrelation.
If the slope = 0.5, It means the series follows a random walk.
█ FEATURES
• Sample Size is the lookback period for calculation. Even though DFA requires a lower sample size than RS, a sample size larger > 50 is recommended for accurate measurement.
• When a larger sample size is used (for example = 1000 lookback length), the loading speed may be slower due to a longer calculation. Date Range is used to limit numbers of historical calculation bars. When loading speed is too slow, change the data range "all" into numbers of weeks/days/hours to reduce loading time. (Credit to allanster)
• “show filter” option applies a smoothing moving average to smooth the exponent.
• Log scale is my work around for dynamic log space scaling. Traditionally the smallest log space for bars is power of 2. It requires at least 10 points for an accurate regression, resulting in the minimum lookback to be 1024. I made some changes to round the fractional log space into integer bars requiring the said log space to be less than 2.
• For a more accurate calculation a larger "Base Scale" and "Max Scale" should be selected. However, when the sample size is small, a larger value would cause issues. Therefore, a general rule to be followed is: A larger "Base Scale" and "Max Scale" should be selected for a larger the sample size. It is recommended for the user to try and choose a larger scale if increasing the value doesn't cause issues.
The following chart shows the change in value using various scales. As shown, sometimes increasing the value makes the value itself messy and overshoot.
When using the lowest scale (4,2), the value seems stable. When we increase the scale to (8,2), the value is still alright. However, when we increase it to (8,4), it begins to look messy. And when we increase it to (16,4), it starts overshooting. Therefore, (8,2) seems to be optimal for our use.
█ How to Use
Similar to Hurst Exponent (Simple). 0.5 is a level for determine long term memory.
• In the efficient market hypothesis, market follows a random walk and Hurst exponent should be 0.5. When Hurst Exponent is significantly different from 0.5, the market is inefficient.
• When Hurst Exponent is > 0.5. Positive Autocorrelation. Market is Trending. Positive returns tend to be followed by positive returns and vice versa.
• Hurst Exponent is < 0.5. Negative Autocorrelation. Market is Mean reverting. Positive returns trends to follow by negative return and vice versa.
However, we can't really tell if the Hurst exponent value is generated by random chance by only looking at the 0.5 level. Even if we measure a pure random walk, the Hurst Exponent will never be exactly 0.5, it will be close like 0.506 but not equal to 0.5. That's why we need a level to tell us if Hurst Exponent is significant.
So we also computed the 95% confidence interval according to Monte Carlo simulation. The confidence level adjusts itself by sample size. When Hurst Exponent is above the top or below the bottom confidence level, the value of Hurst exponent has statistical significance. The efficient market hypothesis is rejected and market has significant inefficiency.
The state of market is painted in different color as the following chart shows. The users can also tell the state from the table displayed on the right.
An important point is that Hurst Value only represents the market state according to the past value measurement. Which means it only tells you the market state now and in the past. If Hurst Exponent on sample size 100 shows significant trend, it means according to the past 100 bars, the market is trending significantly. It doesn't mean the market will continue to trend. It's not forecasting market state in the future.
However, this is also another way to use it. The market is not always random and it is not always inefficient, the state switches around from time to time. But there's one pattern, when the market stays inefficient for too long, the market participants see this and will try to take advantage of it. Therefore, the inefficiency will be traded away. That's why Hurst exponent won't stay in significant trend or mean reversion too long. When it's significant the market participants see that as well and the market adjusts itself back to normal.
The Hurst Exponent can be used as a mean reverting oscillator itself. In a liquid market, the value tends to return back inside the confidence interval after significant moves(In smaller markets, it could stay inefficient for a long time). So when Hurst Exponent shows significant values, the market has just entered significant trend or mean reversion state. However, when it stays outside of confidence interval for too long, it would suggest the market might be closer to the end of trend or mean reversion instead.
Larger sample size makes the Hurst Exponent Statistics more reliable. Therefore, if the user want to know if long term memory exist in general on the selected ticker, they can use a large sample size and maximize the log scale. Eg: 1024 sample size, scale (16,4).
Following Chart is Bitcoin on Daily timeframe with 1024 lookback. It suggests the market for bitcoin tends to have long term memory in general. It generally has significant trend and is more inefficient at it's early stage.
$MTF Fractal Echo DetectorMIL:MTVFR FRACTAL ECHO DETECTOR by Timmy741
The first public multi-timeframe fractal convergence system that actually works.
Market makers don’t move price randomly.
They test the same fractal structure on lower timeframes first → then execute the real move on higher timeframes.
This indicator catches the “echo” — when 3–5 timeframes are printing fractals at almost the exact same price level.
That’s not coincidence. That’s preparation.
FEATURES
• 5 simultaneous timeframes (1min → 4H by default)
• Real Williams Fractal detection (configurable period)
• Dynamic echo tolerance & minimum TF alignment
• Visual S/R zones from every timeframe
• Bullish / Bearish echo convergence signals
• Strength meter (3/5, 4/5, 5/5 TF alignment)
• Zero repainting — uses proper lookahead=off
• Fully Pine v6 typed + optimized
USE CASE
When you see a 4/5 or 5/5 echo:
→ That level is being defended or attacked with intent
→ 80%+ chance the next real move comes from there
→ Trade the breakout or reversal at that exact fractal cluster
Works insane on:
• BTC / ETH (all timeframes)
• Nasdaq / SPX futures
• Forex majors (especially GBP & gold)
• 2025 small-cap rotation setups
100% Open Source • MPL 2.0 • Built by Timmy741 • December 2024
If you know about fractal echoes… you already know.
#fractal #mtf #echo #williamsfractal #multitimeframe #smartmoney #ict #smc #orderflow #convergence #timmy741 #snr #structure
VWAP + Scaled VIX OverlayVWAP-VIX Fusion Overlay helps traders interpret volatility in real time by placing VIX and VWAP where they belong: side-by-side with price action.
It turns the invisible (fear, volatility pressure, momentum shifts) into something clearly visible — making entries, exits, and trend evaluation easier and more accurate.






















