Moving Average Band StrategyOverview
The Moving Average Band Strategy is a fully customizable breakout and trend-continuation system designed for traders who need both simplicity and control.
The strategy creates adaptive bands around a user-selected moving average and executes trades when price breaks out of these bands, with advanced risk-management settings including optional Risk:Reward targets.
This script is suitable for intraday, swing, and positional traders across all markets — equities, futures, crypto, and forex.
Key Features
✔ Six Moving Average Types
Choose the MA that best matches your trading style:
SMA
EMA
WMA
HMA
VWMA
RMA
✔ Dynamic Bands
Upper Band built from MA of highs
Lower Band built from MA of lows
Adjustable band offset (%)
Color-coded band fill indicating price position
✔ Configurable Strategy Preferences
Toggle Long and/or Short trades
Toggle Risk:Reward Take-Profit
Adjustable Risk:Reward Ratio
Default position sizing: % of equity (configurable via strategy settings)
Entry Conditions
Long Entry
A long trade triggers when:
Price crosses above the Upper Band
Long trades are enabled
No existing long position is active
Short Entry
A short trade triggers when:
Price crosses below the Lower Band
Short trades are enabled
No existing short position is active
Clear entry markers and price labels appear on the chart.
Risk Management
This strategy includes a complete set of risk-controls:
Stop-Loss (Fixed at Entry)
Long SL: Lower Band
Short SL: Upper Band
These levels remain constant for the entire trade.
Optional Risk:Reward Take-Profit
Enabled/disabled using a toggle switch.
When enabled:
Long TP = Entry + (Risk × Risk:Reward Ratio)
Short TP = Entry – (Risk × Risk:Reward Ratio)
When disabled:
Exits are handled by reverse crossover signals.
Exit Conditions
Long Exit
Stop-Loss Hit (touch-based)
Take-Profit Hit (if enabled)
Reverse Band Crossover (if TP disabled)
Short Exit
Stop-Loss Hit (touch-based)
Take-Profit Hit (if enabled)
Reverse Band Crossover (if TP disabled)
Exit markers and price labels are plotted automatically.
Visual Tools
To improve clarity:
Upper & Lower Band (blue, adjustable width)
Middle Line
Dynamic band fill (green/red/yellow)
SL & TP line plotting when in position
Entry/Exit markers
Price labels for all executed trades
These are built to help users visually follow the strategy logic.
Alerts Included
Every trading event is covered:
Long Entry
Short Entry
Long SL / TP / Cross Exit
Short SL / TP / Cross Exit
Combined Alert for webhook/automation (JSON-formatted)
Perfect for algo trading, Discord bots, or automation platforms.
Best For
This strategy performs best in:
Trending markets
Breakout environments
High-momentum instruments
Clean intraday swings
Works seamlessly on:
Stocks
Index futures
Commodities
Crypto
Forex
⚠️ Important Disclaimer
This script is for educational purposes only.
Trading involves risk. Backtest results are not indicative of future performance.
Always validate settings and use proper position sizing.
指標和策略
Auto Trend Channel [TCMaster]This indicator automatically identifies key swing highs and lows to draw dynamic trend channels on your chart. It works on the current timeframe or any higher timeframe of your choice. The trend channel is extended into the future to help visualize potential price movement.
Features:
Detects significant pivot highs and pivot lows based on configurable sensitivity.
Automatically plots an upper resistance line and a lower support line to form a trend channel.
Extends the trend channel into the future by a configurable number of bars.
Optionally supports higher timeframe analysis to smooth out price action.
Fills the area between the upper and lower trend lines for better visualization.
Inputs:
Pivot Sensitivity: Number of bars used to detect pivot highs/lows. Higher values filter out minor swings.
Extend Future (bars): How many bars the trend lines should be extended forward.
Timeframe: Choose a higher timeframe to calculate pivots, or leave blank to use the current chart timeframe.
Usage:
Use this indicator to visually identify trending price channels and potential support/resistance zones. It can be helpful for trend trading, breakout strategies, and swing analysis.
Lorentzian Length Adaptive Moving Average [LLAMA] Adaptation of "Machine Learning: Lorentzian Classification" by
Gradient color by base on work by
LLAMA: A regime-aware adaptive moving average that bends with the market.
Start with a problem traders know:
Traditional moving averages are either too slow (EMA200) or too fast (EMA9)
Adaptive MAs exist, but they often hug price too tightly or smooth too much, failing to balance bias and tactics
LLAMA uses a Lorentzian distance function to adapt its length dynamically. Instead of a fixed smoothing window, it stretches or contracts depending on market conditions. This distortion reduces lag while still providing a clear bias line.
The indicator looks back at recent bars and measures how similar they are using a Lorentzian distance (a log‑scaled absolute difference). It keeps track of the “nearest neighbors” — bars that most resemble the current regime. Each neighbor carries a label (long, short, neutral) based on simple price comparisons. By averaging these labels, LLAMA predicts whether the market is leaning bullish or bearish. That prediction is then mapped into a dynamic length between and .
Bullish bias -> length stretches toward max (smoother, more stable).
Bearish bias -> length contracts toward min (snappier, more reactive).
During breakouts, LLAMA tightens and comes into contact with bars, giving actionable signals. During chop, it stretches to avoid false triggers. It covers both ends of the spectrum (bias and tactics) in one line, something static MA's can't do.
Think of LLAMA as a lens that bends with the market:
Wide lens (max length) for big picture bias.
Narrow lens (min length) for tactical precision.
The "Lorentzian Loop" is the math that decides when to widen or narrow.
Volume Spike HighlighterVolume Spike Highlighter is a simple and effective volume-based tool designed to highlight abnormal trading activity.
It detects when the current volume exceeds the average volume by a customizable multiplier and visually emphasizes those bars with bright colors, making unusual buying or selling pressure easy to spot.
Features:
Highlights volume spikes with enhanced green/orange color
Normal volume remains standard red/green
Adjustable lookback period and spike multiplier
Includes a smooth volume moving average for context
Clean and lightweight, ideal for intraday or swing traders
This indicator helps traders quickly identify strong participation, breakouts, absorption zones, trap candles, and areas where institutions may be active.
ATR Risk Display - Multi FuturesWhat This Does
I got tired of manually calculating my ATR stops and risk for different futures contracts, especially when switching between ES, NQ, and their micro versions. This indicator automatically detects what futures symbol you're trading and shows you the exact tick count and dollar risk for your stop loss.
The Problem It Solves
If you trade futures with ATR-based stops, you know the hassle:
Different contracts have different tick values
You need to calculate position risk in dollars
Switching between symbols means redoing all the math
Renko charts make it even more confusing since ATR needs to come from regular candles
This handles all of that automatically.
Key Features
Auto-detects futures symbols - ES, NQ, YM, RTY, GC, CL, and all the micros (MES, MNQ, etc.)
Shows everything you need in one line: ATR(timeframe) × multiplier = X ticks ($XXX)
Works on Renko charts - pulls ATR from regular timeframe charts (super important if you use Renko)
Adjustable position sizing - set your contract count and see total risk instantly
Clean, minimal display - just the info you need, no clutter
How to Use
Add it to any futures chart
Set your preferred ATR timeframe (I use 5-minute)
Set your ATR multiplier (I use 1.5x for my stops)
Set your contract size
That's it - the indicator handles the rest
The display will show something like: "ES ATR(5) × 1.5 = 12 ticks ($150)"
Settings Explained
ATR Timeframe: What timeframe to calculate ATR from (always uses regular candles, even on Renko)
ATR Multiplier: How many ATRs for your stop (1.5 is common, 2.0 for wider stops)
Number of Contracts: Your position size for risk calculation
Auto-Detect Symbol: Leave on unless you want to manually override
Supported Futures
Full size: ES, NQ, YM, RTY, GC, CL, ZB, ZN, 6E, 6J
Micros: MES, MNQ, MYM, M2K, MGC, MCL
Notes
Made this primarily for my own ES trading but figured others might find it useful
The tick values are based on standard CME specs
If you trade other futures, you can modify the code to add them
Works great alongside level indicators for risk management
Why This Exists
I use ATR trailing stops on all my trades and got tired of doing mental math every time I switched between charts or contracts. Especially useful if you trade both full-size and micro contracts - the risk difference is huge and easy to mess up.
Hope this helps your trading! Feel free to suggest improvements.
🎯 Wyckoff Order Block Entry System🎯 Wyckoff Order Block Entry System
📝 INDICATOR DESCRIPTION
🎯 Wyckoff Order Block Entry System Short Description:
Professional institutional zone trading combined with Wyckoff methodology. Identifies high-probability entries where smart money meets classic price action patterns.
Full Description:
Wyckoff Order Block Entry System is a precision trading tool that combines two powerful concepts:
Order Blocks - Institutional zones where large players place their orders
Wyckoff Method - Classic price action patterns revealing smart money behavior
🎯 What Makes This Different?
Unlike traditional indicators that flood your chart with signals, this system only triggers entries when BOTH conditions are met:
Price enters an institutional Order Block zone (current timeframe OR higher timeframe)
A Wyckoff pattern occurs (Spring, SOS, Upthrust, or SOW)
This dual-confirmation approach ensures you're trading with institutional flow at optimal entry points.
📊 Key Features:
✅ Order Block Detection
Automatically identifies institutional buying/selling zones
Current timeframe order blocks (solid lines)
Higher timeframe order blocks (dashed lines) for stronger zones
Customizable strength and extension settings
✅ 4 Wyckoff Entry Patterns
SPRING (Bullish Reversal): Fake breakdown below support → Quick recovery
SOS (Sign of Strength): Strong bullish candle after accumulation
UPTHRUST (Bearish Reversal): Fake breakout above resistance → Quick rejection
SOW (Sign of Weakness): Strong bearish candle after distribution
✅ Clean Visual Design
Minimalist approach - only essential information
Color-coded zones (Green = Bullish, Red = Bearish, Cyan/Magenta = HTF)
Clear entry signals with pattern type labels
No chart clutter - focus on what matters
✅ Multi-Timeframe Analysis
Integrates higher timeframe order blocks
HTF signals marked with "+HTF" tag for extra confidence
Fully customizable HTF selection (H1, H4, Daily, etc.)
✅ Smart Alerts
Entry signal alerts (Long/Short)
Order block formation alerts
HTF order block alerts
Customizable alert messages
💡 How To Use:
Setup: Add indicator to your chart, configure HTF timeframe (default H1)
Wait: Let order blocks form (green/red boxes appear)
Watch: Price returns to order block zone
Entry: Signal appears when Wyckoff pattern confirms
Trade: Enter with the signal, stop below/above order block
📈 Best For:
Forex pairs (all majors and crosses)
Gold (XAUUSD)
Crypto (BTC, ETH, etc.)
Indices (SPX, NAS100, etc.)
Stocks
Commodities
⏱️ Recommended Timeframes:
M15 for scalping
M30 for day trading
H1 for swing trading
H4 for position trading
🎯 Win Rate Expectations:
Current TF signals: 60-70%
HTF signals (+HTF tag): 70-80%
Spring/Upthrust patterns: Highest probability
Works on ALL liquid markets
⚙️ Customizable Settings:
Order block detection parameters
HTF timeframe selection
Wyckoff sensitivity (swing length, volume threshold)
Zone extension duration
Color schemes
📚 Trading Strategy:
This indicator works best when:
Trading in the direction of higher timeframe trend
Using proper risk management (1-2% per trade)
Placing stops just outside order block zones
Taking profits at opposite order blocks
Focusing on HTF signals for higher quality
🔒 Risk Management:
Always use stop losses! Recommended placement:
LONG: 10-20 pips below order block
SHORT: 10-20 pips above order block
Target: Minimum 1:2 risk/reward ratio
💎 Why Traders Love This System:
"Finally, an indicator that doesn't spam my chart with useless signals!" - The quality-over-quantity approach means you only get high-probability setups.
"The HTF order blocks changed my trading!" - Multi-timeframe analysis built-in removes the need for manual higher timeframe checks.
"Wyckoff + Order Blocks = Perfect combination!" - Two proven concepts working together create powerful confluence.
📊 Universal Application:
This system works on ANY liquid market with sufficient volume:
✅ Forex (EUR/USD, GBP/USD, USD/JPY, etc.)
✅ Commodities (Gold, Silver, Oil, etc.)
✅ Indices (S&P 500, NASDAQ, DAX, etc.)
✅ Cryptocurrencies (Bitcoin, Ethereum, etc.)
✅ Stocks (Large cap with good liquidity)
🎓 Educational Value:
Beyond just signals, this indicator teaches you:
How institutional traders think
Where smart money places orders
Classic Wyckoff accumulation/distribution patterns
Multi-timeframe analysis techniques
⚡ Performance:
Lightning-fast calculations
No repainting
Real-time signal generation
Clean code, optimized for speed
🚀 Get Started:
Add to your favorite chart
Adjust HTF timeframe to match your trading style
Wait for high-quality signals
Trade with confidence
Remember: Quality beats quantity. This system prioritizes precision over frequency. You might see 2-5 signals per day on M30 - and that's exactly the point. Each signal is carefully filtered for maximum probability.
Ready to trade like institutions?
👉 Add this indicator to your chart now
👉 Configure your preferred HTF timeframe
👉 Start catching high-probability setups
👉 Trade smarter, not harder
Questions or feedback? Drop a comment below!
Found this useful? Hit that ⭐ button and share with fellow traders!
Happy Trading! 🚀📈
FVG & Market Structure//@version=5
indicator("FVG & Market Structure", overlay=true)
// Inputs
fvg_lookback = input.int(100, "FVG Lookback Period")
fvg_strength = input.int(1, "FVG Minimum Strength")
show_fvg = input.bool(true, "Show FVG")
show_liquidity = input.bool(true, "Show Liquidity Zones")
show_bos = input.bool(true, "Show BOS")
// Calculate swing highs and lows
swing_high = ta.pivothigh(high, 2, 2)
swing_low = ta.pivotlow(low, 2, 2)
// Detect Fair Value Gaps (FVG)
detect_fvg() =>
// Bullish FVG (current low > previous high + threshold)
bullish_fvg = low > high and show_fvg
// Bearish FVG (current high < previous low - threshold)
bearish_fvg = high < low and show_fvg
= detect_fvg()
// Plot FVG areas
bgcolor(bullish_fvg ? color.new(color.green, 95) : na, title="Bullish FVG")
bgcolor(bearish_fvg ? color.new(color.red, 95) : na, title="Bearish FVG")
// Breach of Structure (BOS) detection
detect_bos() =>
var bool bull_bos = false
var bool bear_bos = false
// Bullish BOS - price breaks above previous swing high
if high > ta.valuewhen(swing_high, high, 1) and not na(swing_high)
bull_bos := true
bear_bos := false
// Bearish BOS - price breaks below previous swing low
if low < ta.valuewhen(swing_low, low, 1) and not na(swing_low)
bear_bos := true
bull_bos := false
= detect_bos()
// Plot BOS signals
plotshape(bull_bos and show_bos, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, title="Bullish BOS")
plotshape(bear_bos and show_bos, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, title="Bearish BOS")
// Liquidity Zones (Recent Highs/Lows)
liquidity_range = input.int(20, "Liquidity Lookback")
buy_side_liquidity = ta.highest(high, liquidity_range)
sell_side_liquidity = ta.lowest(low, liquidity_range)
// Plot Liquidity Zones
plot(show_liquidity ? buy_side_liquidity : na, color=color.red, linewidth=1, title="Sell Side Liquidity")
plot(show_liquidity ? sell_side_liquidity : na, color=color.green, linewidth=1, title="Buy Side Liquidity")
// Order Block Detection (Simplified)
detect_order_blocks() =>
// Bullish Order Block - strong bullish candle followed by pullback
bullish_ob = close > open and (close - open) > (high - low) * 0.7 and show_fvg
// Bearish Order Block - strong bearish candle followed by pullback
bearish_ob = close < open and (open - close) > (high - low) * 0.7 and show_fvg
= detect_order_blocks()
// Plot Order Blocks
bgcolor(bullish_ob ? color.new(color.lime, 90) : na, title="Bullish Order Block")
bgcolor(bearish_ob ? color.new(color.maroon, 90) : na, title="Bearish Order Block")
// Alerts for key events
alertcondition(bull_bos, "Bullish BOS Detected", "Bullish Breach of Structure")
alertcondition(bear_bos, "Bearish BOS Detected", "Bearish Breach of Structure")
// Table for current market structure
var table info_table = table.new(position.top_right, 2, 4, bgcolor=color.white, border_width=1)
if barstate.islast
table.cell(info_table, 0, 0, "Market Structure", bgcolor=color.gray)
table.cell(info_table, 1, 0, "Status", bgcolor=color.gray)
table.cell(info_table, 0, 1, "Bullish BOS", bgcolor=bull_bos ? color.green : color.red)
table.cell(info_table, 1, 1, bull_bos ? "ACTIVE" : "INACTIVE")
table.cell(info_table, 0, 2, "Bearish BOS", bgcolor=bear_bos ? color.red : color.green)
table.cell(info_table, 1, 2, bear_bos ? "ACTIVE" : "INACTIVE")
table.cell(info_table, 0, 3, "FVG Count", bgcolor=color.blue)
table.cell(info_table, 1, 3, str.tostring(bar_index))
Event High/Mid/LowEvent High/Mid/Low - Data Release Level Tracker
Automatically track and visualize high, low, and mid levels from major data events like FOMC announcements, CPI releases, NFP reports, and other market-moving data releases.
KEY FEATURES:
- Customizable event input - Add unlimited events using a simple text format
- Flexible time periods - Set custom duration for each event (15min, 30min, 60min, etc.)
- Visual clarity - Color-coded lines and optional background cloud between high/low
- Clean labels - Minimalist text labels without background boxes
- Fully customizable - Toggle lines, labels, and clouds on/off independently
HOW TO USE:
1. Add the indicator to your chart
2. Open settings and edit the "Event Dates" text area
3. Enter one event per line in this format: YYYY-MM-DD HH:MM Minutes Label
Example: 2025-01-29 14:00 30 Jan FOMC
Example: 2025-02-12 08:30 30 Feb CPI
4. The indicator will automatically capture and display the high, low, and mid levels
WHAT IT DISPLAYS:
- High line (teal) - Highest price during the event period
- Low line (pink) - Lowest price during the event period
- Mid line (yellow, dotted) - Midpoint between high and low
- Background cloud (optional) - Shaded area between high and low
- Event window highlighting - Orange background during active events
PERFECT FOR:
- Tracking key support/resistance levels from economic releases
- Planning entries/exits around FOMC, CPI, NFP, and other data
- Analyzing how price reacts to major announcements
- Identifying post-event trading ranges
SUPPORTED EVENTS:
Works with any scheduled economic release - FOMC, CPI, PPI, NFP, Retail Sales, GDP, and more. Simply input the date, time, duration, and a custom label.
IMPORTANT LIMITATIONS:
- Chart timeframe must be EQUAL TO OR SMALLER than event duration
- For 30-minute events: Use 30min, 15min, 5min, 1min charts (NOT 1H, 4H, Daily)
- For 60-minute events: Use 60min, 30min, 15min, 5min, 1min charts
- For 15-minute events: Use 15min, 5min, 1min charts
- If your chart timeframe is larger than the event duration, the indicator may not capture accurate high/low values
- Recommended: Use 5-minute or 1-minute charts for maximum accuracy on all event durations
NOTES:
- All times are in EST/EDT (America/New_York timezone)
- Comments starting with # are ignored, making it easy to organize and annotate your event list
- The indicator processes events only after the specified duration has elapsed
Fractional Candlestick Long Only Experimental V10Fractional Candlestick Long-Only Strategy – Technical Description
This document provides a professional English description of the "Fractional Candlestick Long Only Experimental V6" strategy using pure CF/AB fractional kernels and wavelet-based filtering.
1. Fractional Candlesticks (CF / AB)
The strategy computes two fractional representations of price using Caputo–Fabrizio (CF) and Atangana–Baleanu (AB) kernels. These provide long-memory filtering without EMA approximations. Both CF and AB versions are applied to O/H/L/C, producing fractional candlesticks and fractional Heikin-Ashi variants.
2. Trend Stack Logic
Trend confirmation is based on a 4-component stack:
- CF close > AB close
- HA_CF close > HA_AB close
- HA_CF bullish
- HA_AB bullish
The user selects how many components must align (4, 3, or any 2).
3. Wavelet Filtering
A wavelet transform (Haar, Daubechies-4, Mexican Hat) is applied to a chosen source (e.g., HA_CF close). The wavelet response is used as:
- entry filter (4 modes)
- exit filter (4 modes)
Wavelet modes: off, confirm, wavelet-only, block adverse signals.
4. Trailing System
Trailing stop uses fractional AB low × buffer, providing long-memory dynamic trailing behavior. A fractional trend channel (CF/AB lows vs HA highs) is also plotted.
5. Exit Framework
Exit options include: stack flip, CF
SuperTrend MA Fusion [CNU]SuperTrend MA Fusion is a next-generation upgrade of the classic SuperTrend indicator, engineered with a multi-MA adaptive ATR engine, advanced non-repaint logic, and clean trend-flip signal generation.
This version offers 18+ institutional-grade moving averages to smooth ATR volatility, allowing traders to customize trend sensitivity and signal responsiveness unlike anything possible with the standard SuperTrend.
Key Features
✔ 18+ Moving Average Options (MA Engine)
Customize volatility smoothing using any MA:
SMA, EMA, WMA, RMA
HMA, ZLEMA, LSMA, ALMA
KAMA, VIDYA
TEMA, DEMA
VWMA, WWMA, VAR
TILLSON T3, TSF
TMA
This allows extreme flexibility — from ultra-fast scalping signals to slow and smooth swing-trend filters.
O'Neil Market TimingBill O'Neil Market Timing Indicator - User Guide
Overview
This Pine Script indicator implements William O'Neil's market timing methodology, which assigns one of four distinct states to a market index (such as SPY or QQQ) to help traders identify optimal market conditions for investing. The indicator is designed to work exclusively on Daily timeframe charts.
The Four Market States
The indicator tracks the market through four distinct states, with specific transition rules between them:
1. Confirmed Uptrend (Green)
- Meaning: The market is in a healthy uptrend with institutional support
- Action: Favorable conditions for building positions in leading stocks
- Can transition to: State 2 (Uptrend Under Pressure)
2. Uptrend Under Pressure (Yellow)
- Meaning: The uptrend is showing signs of weakness with increasing distribution
- Action: Be cautious, tighten stops, reduce position sizes
- Can transition to: State 1 (Confirmed Uptrend) or State 3 (Downtrend)
3. Downtrend (Red)
- Meaning: The market is in a confirmed downtrend
- Action: Stay mostly in cash, avoid new purchases
- Can transition to: State 4 (Rally Attempt)
4. Rally Attempt (Pink/Fuchsia)
- Meaning: The market is attempting to bottom and reverse
- Action: Watch for Follow-Through Day to confirm new uptrend
- Can transition to: State 1 (Confirmed Uptrend) or State 3 (Downtrend)
Key Concepts
Distribution Day
A distribution day occurs when:
1. The index closes down by more than the critical percentage (default 0.2%)
2. Volume is higher than the previous day's volume
Distribution days indicate institutional selling and are marked with red triangles on the indicator.
Follow-Through Day
A follow-through day occurs during a Rally Attempt when:
1. The index closes up by more than the critical percentage (default 1.6%)
2. Volume is higher than the previous day's volume
A Follow-Through Day confirms a new uptrend and triggers the transition from Rally Attempt to Confirmed Uptrend.
State Transition Logic
Valid Transitions
The system only allows specific transitions:
- 1 → 2: When distribution days reach the "pressure number" (default 5) within the lookback period (default 25 bars)
- 2 → 1: When distribution days drop below the pressure number
- 2 → 3: When distribution days reach "downtrend number" (default 7) AND price drops by "downtrend criterion" (default 6%) from the lookback high
- 3 → 4: When the market doesn't make a new low for 3 consecutive days
- 4 → 3: When a new low is made, undercutting the downtrend low
- 4 → 1: When a Follow-Through Day occurs during the Rally Attempt
Input Parameters
Distribution Day Parameters
- Distribution Day % Threshold (default 0.2%, range 0.1-2.0%)
- Minimum percentage decline required to qualify as a distribution day. While 0.2% seems to be the canonical number I see in literature about this, I use a much higher threshold (at least 0.5%)
Follow-Through Day Parameters
- Follow-Through Day % Threshold (default 1.6%, range 1.0-2.0%)
- Minimum percentage gain required to qualify as a follow-through day
### State Transition Parameters
- Pressure Number (default 5, range 3-6)
- Number of distribution days needed to transition from Confirmed Uptrend to Uptrend Under Pressure
- Lookback Period (default 25 bars, range 20-30)
- Number of days to count distribution days
- Downtrend Number (default 7, range 4-10)
- Number of distribution days needed (with price drop) to transition to Downtrend
- Downtrend % Drop from High (default 6%, range 5-10%)
- Percentage drop from lookback high required for downtrend confirmation
Visual Settings
- Color customization for each state
- Table position selection (Top Left, Top Right, Bottom Left, Bottom Right)
## How to Use This Indicator
### Installation
1. Open TradingView and navigate to SPY or QQQ (or another major index)
2. **Important**: Switch to the Daily (1D) timeframe
3. Click on "Indicators" at the top of the chart
4. Click "Pine Editor" at the bottom of the screen
5. Copy and paste the Pine Script code
6. Click "Add to Chart"
### Interpretation
**When the indicator shows:**
- **Green (State 1)**: Market is healthy - consider adding quality positions
- **Yellow (State 2)**: Exercise caution - tighten stops, be selective
- **Red (State 3)**: Defensive mode - preserve capital, avoid new buys
- **Pink (State 4)**: Watch closely - prepare for potential Follow-Through Day
### The Information Table
The table displays:
- **Current State**: The current market condition
- **Distribution Days**: Number of distribution days in the lookback period
- **Lookback Period**: Number of bars being analyzed
- **Rally Attempt Day**: (Only in State 4) Days into the current rally attempt
### Visual Elements
1. **State Line**: A stepped line showing the current state (1-4)
2. **Red Triangles**: Mark each distribution day
3. **Horizontal Reference Lines**: Dotted lines marking each state level
4. **Color-Coded Display**: The state line changes color based on the current market condition
## Trading Strategy Guidelines
### In Confirmed Uptrend (State 1)
- Build positions in stocks breaking out of proper bases
- Use normal position sizing
- Focus on stocks showing institutional accumulation
- Hold winners as long as they act properly
### In Uptrend Under Pressure (State 2)
- Take partial profits in extended positions
- Tighten stop losses
- Be more selective with new entries
- Reduce overall exposure
### In Downtrend (State 3)
- Move to cash or maintain very light exposure
- Avoid new purchases
- Focus on preservation of capital
- Use the time for research and watchlist building
### In Rally Attempt (State 4)
- Stay mostly in cash but prepare
- Build a watchlist of strong stocks
- On Day 4+ of the rally attempt, watch for Follow-Through Day
- If FTD occurs, begin cautiously adding positions
## Best Practices
1. **Use with Major Indices**: This indicator works best with SPY, QQQ, or other broad market indices
2. **Daily Timeframe Only**: The indicator is designed for daily bars - do not use on intraday timeframes
3. **Combine with Stock Analysis**: Use the market state as a filter for individual stock decisions
4. **Respect the Signals**: When the market enters Downtrend, reduce exposure regardless of individual stock setups
5. **Monitor Distribution Days**: Pay attention when distribution days accumulate - it's a warning sign
6. **Wait for Follow-Through**: Don't jump back in too early during Rally Attempt - wait for confirmation
## Alert Conditions
The indicator includes built-in alert conditions for:
- State changes (entering any of the four states)
- Distribution Day detection
- Follow-Through Day detection during Rally Attempt
To set up alerts:
1. Click the "Alert" button while the indicator is on your chart
2. Select "O'Neil Market Timing"
3. Choose your desired alert condition
4. Configure notification preferences
## Customization Tips
### For More Sensitive Detection
- Lower the "Pressure Number" to 3-4
- Lower the "Distribution Day % Threshold" to 0.15%
- Reduce the "Downtrend Number" to 5-6
### For More Conservative Detection
- Raise the "Pressure Number" to 6
- Raise the "Distribution Day % Threshold" to 0.3-0.5%
- Increase the "Downtrend Number" to 8-9
### For Different Market Conditions
- **Bull Market**: Consider slightly higher thresholds
- **Bear Market**: Consider slightly lower thresholds
- **Volatile Market**: May need to increase percentage thresholds
## Limitations and Considerations
1. **Not a Crystal Ball**: The indicator identifies conditions but doesn't predict the future
2. **False Signals**: Follow-Through Days can fail - use proper risk management
3. **Whipsaws Possible**: In choppy markets, the indicator may switch states frequently
4. **Confirmation Lag**: By design, there's a lag as the system waits for confirmation
5. **Works Best with Price Action**: Combine with your analysis of individual stocks
## Historical Context
This methodology is based on William J. O'Neil's decades of market research, documented in books like "How to Make Money in Stocks" and through Investor's Business Daily. O'Neil's research showed that:
- Most major market tops are preceded by accumulation of distribution days
- Most successful rallies begin with a Follow-Through Day on Day 4-7 of a rally attempt
- Identifying market state helps prevent buying during unfavorable conditions
## Troubleshooting
**Problem**: Indicator shows "Initializing"
- **Solution**: Let the chart load at least 5 bars to establish the initial state
**Problem**: No distribution day markers appear
- **Solution**: Verify you're on daily timeframe and check if volume data is available
**Problem**: Table not visible
- **Solution**: Check the table position setting and ensure it's not off-screen
**Problem**: State seems to change too frequently
- **Solution**: Increase the lookback period or adjust threshold parameters
## Support and Further Learning
For deeper understanding of this methodology:
- Read "How to Make Money in Stocks" by William J. O'Neil
- Study Investor's Business Daily's "Market Pulse"
- Review historical market tops and bottoms to see the pattern
- Practice identifying distribution days and follow-through days manually
## Version History
**Version 1.0** (November 2025)
- Initial implementation
- Four-state system with proper transitions
- Distribution day detection and marking
- Follow-through day detection
- Customizable parameters
- Information table display
- Alert conditions
---
## Quick Reference Card
| State | Number | Color | Action |
|-------|--------|-------|--------|
| Confirmed Uptrend | 1 | Green | Buy quality setups |
| Uptrend Under Pressure | 2 | Yellow | Tighten stops, be selective |
| Downtrend | 3 | Red | Cash position, no new buys |
| Rally Attempt | 4 | Pink | Watch for Follow-Through Day |
**Distribution Day**: Down > 0.2% on higher volume (red triangle)
**Follow-Through Day**: Up > 1.6% on higher volume during Rally Attempt (triggers State 4→1)
---
*Remember: This indicator is a tool to help identify market conditions. It should be used as part of a comprehensive trading strategy that includes proper risk management, position sizing, and individual stock analysis.*
Also, I created this with the help of an AI coding framework, and I didn't exhaustively test it. I don't actually use this for my own trading, so it's quite possible that it's materially wrong, and that following this will lead to poor investment decisions.. This is "copy left" software, so feel free to alter this to your own tastes, and claim authorship.
XAUUSD Pro Setup Suite manuel_lnt.fx is an advanced Pine Script v6 indicator designed exclusively for XAUUSD, built to automatically detect the 5 highest-probability setups in gold day trading.
It combines institutional price action, volatility patterns, mean reversion logic, and momentum confirmation to generate clean, filtered, and actionable signals.
The indicator automatically detects:
⸻
1️⃣ Break & Retest Premium (BR)
Identifies valid breaks of key levels and signals the retest with rejection wick, EMA20 trend confirmation, and neutral RSI.
→ Excellent for trend continuation.
⸻
2️⃣ Fakeout Liquidity Trap (FO)
Detects liquidity grabs above highs or below lows with an opposite close + engulfing candle confirmation.
→ The strongest setup for fast and explosive reversals on gold.
⸻
3️⃣ MACD Zero-Line Shift (MACD)
Signals when the MACD crosses the zero line while price breaks micro-structure.
→ Perfect for spotting the start of a new trend.
⸻
4️⃣ Bollinger Squeeze → Breakout (BB)
Recognizes volatility compression and signals when a breakout is likely to explode.
→ Ideal for clean breakout trades.
⸻
5️⃣ Mean Reversion on EMA50 (MR)
Highlights price extensions far away from the EMA50 with ATR confirmation and a reversal candle.
→ Great for pullbacks back toward the mean value.
Order FlowSimple Order flow - table with sell volume, buy volume and delta. It requires premium (1second) or higher for getting volume from lower time frame.
hell 1good for finding tops and bottoms in a trend .set to log scale and strech it like it looks in the chart
Trend Following Volatility TrailThe Trend Following Volatility Trail is a dynamic trend-following tool that adapts its stop, bias, and zones to real-time volatility and trend strength. Instead of using static ATR multiples like a normal Supertrend or Chandelier Stop, it continuously adjusts itself based on how stretched the market is and how persistent the trend has been.
This makes the system far more reactive during momentum phases and more conservative during consolidation, helping avoid fake flips and late entries.
How It Works
The indicator builds an adaptive trail around a smoothed price basis:
It starts with a short EMA as the “core trend line.”
It measures volatility expansion versus normal volatility.
It measures trend persistence by reading whether price has been rising or falling consistently.
These two components combine to adjust the ATR multiplier dynamically.
As volatility expands or the trend becomes more persistent, the bands widen. When volatility compresses or the trend weakens, the bands tighten.
These adaptive bands form the foundation of the trailing system.
Bull & Bear State Logic
The tool constantly tracks whether price is above or below the adaptive trail:
Price above the upper trail → Bullish regime
Price below the lower trail → Bearish regime
But instead of flipping immediately, it waits for confirmation bars to avoid noise. This greatly reduces whipsaws and keeps the focus on sustained moves.
Once a new regime is confirmed:
A coloured cloud appears (bull or bear)
A label marks the flip point
Alerts can be triggered automatically
Best Uses
Identifying regime shifts early
Riding sustained trends with confidence
Avoiding choppy markets by requiring confirmation
Using the adaptive cloud as a directional bias layer
Smart Money Flow PRO + MFI📊 Smart Money Flow PRO + MFI Indicator Components
🔍 CORE CALCULATIONS
Volume Delta Analysis - Bullish/Bearish volume tracking
Cumulative Delta - Running total of volume imbalance
Money Flow Index (MFI) - Volume-weighted RSI (14-period default)
Smart Money Power - Proprietary formula combining:
50% Normalized Delta
20% Simulated Open Interest
30% Normalized MFI
📈 VISUAL DISPLAYS
Oscillator Window:
MFI Line (blue)
Cumulative Delta Line (orange)
Smart Money Power Histogram (colored by trend)
Overbought/Oversold zones (80/20 levels)
Price Chart:
Divergence/Convergence labels
Entry signals with arrows
🎯 SIGNAL DETECTION
Bullish/Bearish Divergences (Triangle markers)
Bullish/Bearish Convergences (Arrow markers)
Overbought/Oversold conditions
High Volume alerts
📊 DATA TABLE (Top-Right Corner)
Market State (STRONG BULLISH/BEARISH, MIXED)
Delta Trend (Rising/Falling)
MFI Status (Overbought/Oversold/Neutral)
Power Trend (Rising/Falling)
Divergence/Convergence status
Entry Signals
⚡ ALERT CONDITIONS
Bullish/Bearish Divergence alerts
Bullish/Bearish Convergence alerts
MFI Overbought/Oversold zone alerts
STRONG BUY/SELL signals (combined conditions)
⚙️ CUSTOMIZATION OPTIONS
Toggle displays (table, chart signals, oscillator signals)
Adjust MFI parameters (length, OB/OS levels)
Volume settings (alert multiplier, lookback)
Divergence settings (lookback, smoothing)
Color schemes for all elements
🎨 VISUAL FEATURES
Professional color-coded displays
Real-time status updates
Multi-timeframe compatible
Clean, organized layout
This indicator provides comprehensive smart money tracking with multiple confirmation layers for high-probability trade setups.
Slope Rank ReversalThis tool is designed to solve the fundamental problem of "buying low and selling high" by providing objective entry/exit signals based on momentum extremes and inflection points.
The System employs three core components:
Trend Detection (PSAR): The Parabolic SAR is used as a filter to confirm that a trend reversal or transition is currently underway, isolating actionable trade setups.
Dynamic Momentum Ranking: The indicator continuously measures the slope of the price action. This slope is then ranked against historical data to objectively identify when an asset is in an extreme state (overbought or oversold).
Signal Generation (Inflection Points):
Oversold/Buy: A 🟢 Green X is generated only when the slope ranking indicates the market is steeply negative (oversold), and the slope value begins to tick upwards (the inflection point), signaling potential mean reversion.
Overbought/Sell: A 🔴 Red X is generated only when the slope ranking indicates the market is steeply positive (overbought), and the slope value begins to tick downwards, signaling momentum exhaustion.
The core philosophy is simple: Enter only when the market is exhausted and has started to turn.
Moving Aaverage (EMA) & VWAP by Vish
Multi-Timeframe Moving Averages with VWAP
This indicator combines essential moving averages with VWAP to provide comprehensive trend analysis on a single chart. Designed for traders who need quick visual reference of multiple timeframes and volume-weighted price levels.
Features:
• Six customizable moving averages: 8, 13, 21, 50, 100, and 200 periods
• Toggle between Simple Moving Average (SMA) and Exponential Moving Average (EMA) for all lines
• Individual on/off controls for each moving average
• Volume Weighted Average Price (VWAP) with customizable settings
• VWAP anchor options: Session, Week, Month, Quarter, and Year
• Clean, color-coded visualization for easy identification
• Fully customizable through settings panel
Use Cases:
• Identify trend direction across multiple timeframes
• Find dynamic support and resistance levels
• Spot potential entry and exit points
• Analyze price action relative to volume-weighted average
• Confirm trend strength with multiple MA convergence/divergence
Settings:
All parameters are adjustable including MA type (SMA/EMA), individual MA visibility, VWAP source, and VWAP anchor period.
Suitable for all markets and timeframes. Works on stocks, forex, crypto, commodities, and indices.
#moving average #MA #EMA #SMA #VWAP #trend #support #resistance #multi-timeframe
Ultimate Adaptive Trend & Volume SystemUltimate Adaptive Trend & Volume System (UT Bot + VIDYA + Kalman)
A complete adaptive trend engine with volume overlays, Kalman precision, and multi filter confirmations.
Description: This multi filter trading system integrates UT Bot, Waddah Attar Explosion (WAE), ADX, Trendillo, VIDYA blended T3, and Kalman SuperTrend logic. It generates BUY, SELL, and TP signals only when multiple adaptive trend, volume, and volatility conditions align.
🔑 Core Features
• UT Bot Sensitivity + ATR Distance for base entries
• Hybrid T3 + VIDYA trendline (adaptive slope by @davidtech)
• Kalman Exponential SuperTrend (KEST | MisinkoMaster) for band slope, expansion, and compression filters
• Trendillo ALMA smoothing for trend strength validation
• Waddah Attar Explosion V2 by LazyBear for momentum confirmation
• TDFI (@davidtech) and Uptrick Volume Weightbands as optional overlays for volume weighted trend context
• 150 EMA anchor for long term directional bias
• Multi timeframe hybrid slope (15m) for higher timeframe confirmation
📊 Filters & Overrides
• Candle body strength, breakout candle confirmation, and directional breaks
• Volume filters: average, collapse, spike, and time of day bias
• Directional volume delta confirmation
• ROC burst persistence and slope acceleration filters
• ADX + WAE dynamic gating for strong momentum
• Volatility compression/expansion breakout detection
• Pre session momentum scan for London open
• Chop zone filter (RSI + MACD flat)
• Override logic: Kalman flip + volume spike, slope + ROC burst combo, volatility breakout override, and 3m breakout exception
• Gating Table Overlay: chart native table showing condition status (trend, volume, slope, overrides) in real time, with collapsible toggles and clear ticks/crosses for transparency
🖼️ Visual Overlays
• Hybrid T3 + VIDYA line with slope coloring
• Kalman SuperTrend bands
• WAE histogram overlay
• TDFI and Uptrick Volume Weightbands for volume weighted context
• 150 EMA reference line
• Pivot based support/resistance channels
• BUY, SELL, TP labels plotted on the prior bar for accuracy
• Session shading for no trade hours
🛠️ Alerts
• BUY, SELL, and TP alerts tied directly to signal flags
• Signals persist until bar close, then reset cleanly
Consolidation Tracker🧭 Consolidation Tracker — Visualize Market Reversals in Real Time
The Consolidation Tracker is a minimalist yet powerful tool designed to map the anatomy of market reversals and trend transitions. It highlights the structural evolution of price through four key phases, helping traders anticipate shifts with clarity and confidence.
🔄 The Four Stages of a Market Reversal:
Failure to Displace — Price fails to break beyond recent highs or lows, signaling potential exhaustion of the current trend.
Consolidation (CAMP) — A range-bound phase where price compresses between a dynamic high and low. These zones are shaded gray, representing indecision and balance.
Engulfing (ENGULF) — A decisive candle closes beyond the CAMP high or low, suggesting a directional shift. These are highlighted in orange.
Fair Value Gap (FVG) — A three-candle pattern forms a price imbalance. If this FVG also engulfs the CAMP range, it confirms the reversal and resets the CAMP. Bullish FVGs are shaded green, bearish FVGs in red.
🔁 From Reversal to Trend:
Once a reversal is confirmed via an FVG, the market often transitions into a trend cycle characterized by:
Displacement — Strong directional movement away from the prior range.
Fair Value Gaps — Continuation imbalances that offer high-probability entries on retracements.
🧠 How It Works:
The indicator dynamically tracks CAMP highs and lows, updating only when a candle engulfs the range or a valid FVG forms.
FVGs are detected when a three-candle sequence creates a gap between candle 2 and 0, and the middle candle (candle 1) breaks the CAMP boundary.
CAMP levels are plotted as horizontal lines, while background colors narrate the evolving structure in real time.
This tool is ideal for traders who value market structure, price efficiency, and narrative clarity. Whether you're anticipating reversals or riding trends, the Consolidation Tracker offers a clean, actionable lens into price behavior.
BTC Marty IndicatorsThis custom Pine Script indicator is designed specifically for Bitcoin (BTC) trading analysis on TradingView. It combines multiple technical tools into a single, easy-to-use overlay indicator to help traders identify trends, momentum shifts, and overall market sentiment. Ideal for swing traders, long-term holders, or anyone monitoring BTC's price action across various timeframes.
Key Features:
Timeframe-Independent SMAs (110 and 350d)
MACD Histogram Signals
Absorption DetectorAbsorption Detector is a clean and effective tool designed to identify institutional absorption at key turning points of the market.
It highlights candles where volume surges but the real body remains small, indicating potential absorption of liquidity before a reversal move.
Key Features
Volume Spike Detection – identifies abnormal increases in traded volume
Small Body Recognition – pinpoints candles with low real-body percentage
Delta Simulation (Fake Delta) – uses close–open behavior to approximate bullish/bearish delta
Bullish Absorption – highlights potential low-side absorption (green dots + green candles)
Bearish Absorption – highlights potential high-side absorption (red dots + red candles)
Background Highlighting – visual emphasis on absorption zones
Clean, lightweight and non-repainter
How It Helps
Absorption often occurs before strong moves:
Large players fill opposite orders
Stops are triggered and absorbed
Liquidity on one side dries up
Reversal or continuation moves follow
This indicator makes it easy to spot these moments in real time.






















