S&D Light+ Enhanced# S&D Light+ Enhanced - Supply & Demand Zone Trading Strategy
## 📊 Overview
**S&D Light+ Enhanced** is an advanced Supply and Demand zone identification and trading strategy that combines institutional order flow concepts with smart money techniques. This strategy automatically identifies high-probability reversal zones based on Break of Structure (BOS), momentum analysis, and first retest principles.
## 🎯 Key Features
### Smart Zone Detection
- **Automatic Supply & Demand Zone Identification** - Detects institutional zones where price is likely to react
- **Multi-Candle Momentum Analysis** - Validates zones with configurable momentum requirements
- **Break of Structure (BOS) Confirmation** - Ensures zones are created only after significant structure breaks
- **Quality Filters** - Minimum zone size and ATR-based filtering to eliminate weak zones
### Advanced Zone Management
- **Customizable Zone Display** - Choose between Geometric or Volume-Weighted midlines
- **First Retest Logic** - Option to trade only the first touch of each zone for higher probability setups
- **Zone Capacity Control** - Maintains a clean chart by limiting stored zones per type
- **Visual Zone Status** - Automatically marks consumed zones with faded midlines
### Risk Management
- **Dynamic Stop Loss** - Positioned beyond zone boundaries with adjustable buffer
- **Risk-Reward Ratio Control** - Customizable R:R for consistent risk management
- **Entry Spacing** - Minimum bars between signals prevents overtrading
- **Position Sizing** - Built-in percentage of equity allocation
## 🔧 How It Works
### Zone Creation Logic
**Supply Zones (Selling Pressure):**
1. Strong momentum downward movement (configurable body-to-range ratio)
2. Identified bullish base candle (where institutions accumulated shorts)
3. Break of Structure downward (price breaks below recent swing low)
4. Zone created at the base candle's high/low range
**Demand Zones (Buying Pressure):**
1. Strong momentum upward movement
2. Identified bearish base candle (where institutions accumulated longs)
3. Break of Structure upward (price breaks above recent swing high)
4. Zone created at the base candle's high/low range
### Entry Conditions
**Long Entry:**
- Price retests a demand zone (touches top of zone)
- Rejection confirmed (close above zone)
- Zone hasn't been used (if "first retest only" enabled)
- Minimum bars since last entry respected
**Short Entry:**
- Price retests a supply zone (touches bottom of zone)
- Rejection confirmed (close below zone)
- Zone hasn't been used (if "first retest only" enabled)
- Minimum bars since last entry respected
## ⚙️ Customizable Parameters
### Display Settings
- **Show Zones** - Toggle zone visualization on/off
- **Max Stored Zones** - Control number of active zones (1-50 per type)
- **Color Customization** - Adjust supply/demand colors and transparency
### Zone Quality Filters
- **Momentum Body Fraction** - Minimum body size for momentum candles (0.1-0.9)
- **Min Momentum Candles** - Number of consecutive momentum candles required (1-5)
- **Big Candle Body Fraction** - Alternative single-candle momentum threshold (0.5-0.95)
- **Min Zone Size %** - Minimum zone height as percentage of price (0.01-5.0%)
### BOS Configuration
- **Swing Length** - Lookback period for structure identification (3-20)
- **ATR Length** - Period for volatility measurement (1-50)
- **BOS Required Break** - ATR multiplier for valid structure break (0.1-3.0)
### Midline Options
- **None** - No midline displayed
- **Geometric** - Simple average of zone top/bottom
- **CenterVolume** - Volume-weighted center based on highest volume bar in window
### Risk Management
- **SL Buffer %** - Additional space beyond zone boundary (0-5%)
- **Take Profit RR** - Risk-reward ratio for target placement (0.5-10x)
### Entry Rules
- **Only 1st Retest per Zone** - Trade zones only once for higher quality
- **Min Bars Between Entries** - Prevent overtrading (1-20 bars)
## 📈 Recommended Settings
### Conservative (Lower Frequency, Higher Quality)
```
Momentum Body Fraction: 0.30
Min Momentum Candles: 2-3
BOS Required Break: 0.8-1.0
Min Zone Size: 0.15-0.20%
Only 1st Retest: Enabled
```
### Balanced (Default)
```
Momentum Body Fraction: 0.28
Min Momentum Candles: 2
BOS Required Break: 0.7
Min Zone Size: 0.12%
Only 1st Retest: Enabled
```
### Aggressive (Higher Frequency, More Signals)
```
Momentum Body Fraction: 0.20-0.25
Min Momentum Candles: 1-2
BOS Required Break: 0.4-0.5
Min Zone Size: 0.08-0.10%
Only 1st Retest: Disabled
```
## 🎨 Visual Elements
- **Red Boxes** - Supply zones (potential selling areas)
- **Green Boxes** - Demand zones (potential buying areas)
- **Dotted Midlines** - Center of each zone (fades when zone is used)
- **Debug Triangles** - Shows when zone creation conditions are met
- Red triangle down = Supply zone created
- Green triangle up = Demand zone created
## 📊 Best Practices
1. **Use on Higher Timeframes** - 1H, 4H, and Daily charts work best for institutional zones
2. **Combine with Trend** - Trade zones in direction of overall market structure
3. **Wait for Confirmation** - Don't enter immediately at zone touch; wait for rejection
4. **Adjust for Market Volatility** - Increase BOS multiplier in choppy markets
5. **Monitor Zone Quality** - Fresh zones typically have higher success rates
6. **Backtest Your Settings** - Optimize parameters for your specific market and timeframe
## ⚠️ Risk Disclaimer
This strategy is for educational and informational purposes only. Past performance does not guarantee future results. Always:
- Use proper position sizing
- Set appropriate stop losses
- Test thoroughly before live trading
- Consider market conditions and overall trend
- Never risk more than you can afford to lose
## 🔍 Data Window Information
The strategy provides real-time metrics visible in the data window:
- Supply Zones Count
- Demand Zones Count
- ATR Value
- Momentum Signals (Up/Down)
- BOS Signals (Up/Down)
## 📝 Version History
**v1.0 - Enhanced Edition**
- Improved BOS detection logic
- Extended base candle search range
- Added comprehensive input validation
- Enhanced visual feedback system
- Robust array bounds checking
- Debug signals for troubleshooting
## 💡 Tips for Optimization
- **Trending Markets**: Lower momentum requirements, tighter BOS filters
- **Ranging Markets**: Increase zone size minimum, enable first retest only
- **Volatile Assets**: Increase ATR multiplier and SL buffer
- **Lower Timeframes**: Reduce swing length, increase min bars between entries
- **Higher Timeframes**: Increase swing length, relax momentum requirements
---
**Created with focus on institutional order flow, smart money concepts, and practical risk management.**
*Happy Trading! 📈*
트렌드 어낼리시스
XAUUSD 1m SMC Zones (BOS + Flexible TP Modes + Trailing Runner)//@version=6
strategy("XAUUSD 1m SMC Zones (BOS + Flexible TP Modes + Trailing Runner)",
overlay = true,
initial_capital = 10000,
pyramiding = 10,
process_orders_on_close = true)
//━━━━━━━━━━━━━━━━━━━
// 1. INPUTS
//━━━━━━━━━━━━━━━━━━━
// TP / SL
tp1Pips = input.int(10, "TP1 (pips)", minval = 1)
fixedSLpips = input.int(50, "Fixed SL (pips)", minval = 5)
runnerRR = input.float(3.0, "Runner RR (TP2 = SL * RR)", step = 0.1, minval = 1.0)
// Daily risk
maxDailyLossPct = input.float(5.0, "Max daily loss % (stop trading)", step = 0.5)
maxDailyProfitPct = input.float(20.0, "Max daily profit % (stop trading)", step = 1.0)
// HTF S/R (1H)
htfTF = input.string("60", "HTF timeframe (minutes) for S/R block")
// Profit strategy (Option C)
profitStrategy = input.string("Minimal Risk | Full BE after TP1", "Profit Strategy", options = )
// Runner stop mode (your option 4)
runnerStopMode = input.string( "BE only", "Runner Stop Mode", options = )
// ATR trail settings (only used if ATR mode selected)
atrTrailLen = input.int(14, "ATR Length (trail)", minval = 1)
atrTrailMult = input.float(1.0, "ATR Multiplier (trail)", step = 0.1, minval = 0.1)
// Pip size (for XAUUSD: 1 pip = 0.10 if tick = 0.01)
pipSize = syminfo.mintick * 10.0
tp1Points = tp1Pips * pipSize
slPoints = fixedSLpips * pipSize
baseQty = input.float (1.0, "Base order size" , step = 0.01, minval = 0.01)
//━━━━━━━━━━━━━━━━━━━
// 2. DAILY RISK MANAGEMENT
//━━━━━━━━━━━━━━━━━━━
isNewDay = ta.change(time("D")) != 0
var float dayStartEquity = na
var bool dailyStopped = false
equityNow = strategy.initial_capital + strategy.netprofit
if isNewDay or na(dayStartEquity)
dayStartEquity := equityNow
dailyStopped := false
dailyPnL = equityNow - dayStartEquity
dailyPnLPct = dayStartEquity != 0 ? (dailyPnL / dayStartEquity) * 100.0 : 0.0
if not dailyStopped
if dailyPnLPct <= -maxDailyLossPct
dailyStopped := true
if dailyPnLPct >= maxDailyProfitPct
dailyStopped := true
canTradeToday = not dailyStopped
//━━━━━━━━━━━━━━━━━━━
// 3. 1H S/R ZONES (for direction block)
//━━━━━━━━━━━━━━━━━━━
htOpen = request.security(syminfo.tickerid, htfTF, open)
htHigh = request.security(syminfo.tickerid, htfTF, high)
htLow = request.security(syminfo.tickerid, htfTF, low)
htClose = request.security(syminfo.tickerid, htfTF, close)
// Engulf logic on HTF
htBullPrev = htClose > htOpen
htBearPrev = htClose < htOpen
htBearEngulf = htClose < htOpen and htBullPrev and htOpen >= htClose and htClose <= htOpen
htBullEngulf = htClose > htOpen and htBearPrev and htOpen <= htClose and htClose >= htOpen
// Liquidity sweep on HTF previous candle
htSweepHigh = htHigh > ta.highest(htHigh, 5)
htSweepLow = htLow < ta.lowest(htLow, 5)
// Store last HTF zones
var float htResHigh = na
var float htResLow = na
var float htSupHigh = na
var float htSupLow = na
if htBearEngulf and htSweepHigh
htResHigh := htHigh
htResLow := htLow
if htBullEngulf and htSweepLow
htSupHigh := htHigh
htSupLow := htLow
// Are we inside HTF zones?
inHtfRes = not na(htResHigh) and close <= htResHigh and close >= htResLow
inHtfSup = not na(htSupLow) and close >= htSupLow and close <= htSupHigh
// Block direction against HTF zones
longBlockedByZone = inHtfRes // no buys in HTF resistance
shortBlockedByZone = inHtfSup // no sells in HTF support
//━━━━━━━━━━━━━━━━━━━
// 4. 1m LOCAL ZONES (LIQUIDITY SWEEP + ENGULF + QUALITY SCORE)
//━━━━━━━━━━━━━━━━━━━
// 1m engulf patterns
bullPrev1 = close > open
bearPrev1 = close < open
bearEngulfNow = close < open and bullPrev1 and open >= close and close <= open
bullEngulfNow = close > open and bearPrev1 and open <= close and close >= open
// Liquidity sweep by previous candle on 1m
sweepHighPrev = high > ta.highest(high, 5)
sweepLowPrev = low < ta.lowest(low, 5)
// Local zone storage (one active support + one active resistance)
// Quality score: 1 = engulf only, 2 = engulf + sweep (we only trade ≥2)
var float supLow = na
var float supHigh = na
var int supQ = 0
var bool supUsed = false
var float resLow = na
var float resHigh = na
var int resQ = 0
var bool resUsed = false
// New resistance zone: previous bullish candle -> bear engulf
if bearEngulfNow
resLow := low
resHigh := high
resQ := sweepHighPrev ? 2 : 1
resUsed := false
// New support zone: previous bearish candle -> bull engulf
if bullEngulfNow
supLow := low
supHigh := high
supQ := sweepLowPrev ? 2 : 1
supUsed := false
// Raw "inside zone" detection
inSupRaw = not na(supLow) and close >= supLow and close <= supHigh
inResRaw = not na(resHigh) and close <= resHigh and close >= resLow
// QUALITY FILTER: only trade zones with quality ≥ 2 (engulf + sweep)
highQualitySup = supQ >= 2
highQualityRes = resQ >= 2
inSupZone = inSupRaw and highQualitySup and not supUsed
inResZone = inResRaw and highQualityRes and not resUsed
// Plot zones
plot(supLow, "Sup Low", color = color.new(color.lime, 60), style = plot.style_linebr)
plot(supHigh, "Sup High", color = color.new(color.lime, 60), style = plot.style_linebr)
plot(resLow, "Res Low", color = color.new(color.red, 60), style = plot.style_linebr)
plot(resHigh, "Res High", color = color.new(color.red, 60), style = plot.style_linebr)
//━━━━━━━━━━━━━━━━━━━
// 5. MODERATE BOS (3-BAR FRACTAL STRUCTURE)
//━━━━━━━━━━━━━━━━━━━
// 3-bar swing highs/lows
swHigh = high > high and high > high
swLow = low < low and low < low
var float lastSwingHigh = na
var float lastSwingLow = na
if swHigh
lastSwingHigh := high
if swLow
lastSwingLow := low
// BOS conditions
bosUp = not na(lastSwingHigh) and close > lastSwingHigh
bosDown = not na(lastSwingLow) and close < lastSwingLow
// Zone “arming” and BOS validation
var bool supArmed = false
var bool resArmed = false
var bool supBosOK = false
var bool resBosOK = false
// Arm zones when first touched
if inSupZone
supArmed := true
if inResZone
resArmed := true
// BOS after arming → zone becomes valid for entries
if supArmed and bosUp
supBosOK := true
if resArmed and bosDown
resBosOK := true
// Reset BOS flags when new zones are created
if bullEngulfNow
supArmed := false
supBosOK := false
if bearEngulfNow
resArmed := false
resBosOK := false
//━━━━━━━━━━━━━━━━━━━
// 6. ENTRY CONDITIONS (ZONE + BOS + RISK STATE)
//━━━━━━━━━━━━━━━━━━━
flatOrShort = strategy.position_size <= 0
flatOrLong = strategy.position_size >= 0
longSignal = canTradeToday and not longBlockedByZone and inSupZone and supBosOK and flatOrShort
shortSignal = canTradeToday and not shortBlockedByZone and inResZone and resBosOK and flatOrLong
//━━━━━━━━━━━━━━━━━━━
// 7. ORDER LOGIC – TWO PROFIT STRATEGIES
//━━━━━━━━━━━━━━━━━━━
// Common metrics
atrTrail = ta.atr(atrTrailLen)
// MINIMAL MODE: single trade, BE after TP1, optional trailing
// HYBRID MODE: two trades (Scalp @ TP1, Runner @ TP2)
// Persistent tracking
var float longEntry = na
var float longTP1 = na
var float longTP2 = na
var float longSL = na
var bool longBE = false
var float longRunEntry = na
var float longRunTP1 = na
var float longRunTP2 = na
var float longRunSL = na
var bool longRunBE = false
var float shortEntry = na
var float shortTP1 = na
var float shortTP2 = na
var float shortSL = na
var bool shortBE = false
var float shortRunEntry = na
var float shortRunTP1 = na
var float shortRunTP2 = na
var float shortRunSL = na
var bool shortRunBE = false
isMinimal = profitStrategy == "Minimal Risk | Full BE after TP1"
isHybrid = profitStrategy == "Hybrid | Scalp TP + Runner TP"
//━━━━━━━━━━ LONG ENTRIES ━━━━━━━━━━
if longSignal
if isMinimal
longEntry := close
longSL := longEntry - slPoints
longTP1 := longEntry + tp1Points
longTP2 := longEntry + slPoints * runnerRR
longBE := false
strategy.entry("Long", strategy.long)
supUsed := true
supArmed := false
supBosOK := false
else if isHybrid
longRunEntry := close
longRunSL := longRunEntry - slPoints
longRunTP1 := longRunEntry + tp1Points
longRunTP2 := longRunEntry + slPoints * runnerRR
longRunBE := false
// Two separate entries, each 50% of baseQty (for backtest)
strategy.entry("LongScalp", strategy.long, qty = baseQty * 0.5)
strategy.entry("LongRun", strategy.long, qty = baseQty * 0.5)
supUsed := true
supArmed := false
supBosOK := false
//━━━━━━━━━━ SHORT ENTRIES ━━━━━━━━━━
if shortSignal
if isMinimal
shortEntry := close
shortSL := shortEntry + slPoints
shortTP1 := shortEntry - tp1Points
shortTP2 := shortEntry - slPoints * runnerRR
shortBE := false
strategy.entry("Short", strategy.short)
resUsed := true
resArmed := false
resBosOK := false
else if isHybrid
shortRunEntry := close
shortRunSL := shortRunEntry + slPoints
shortRunTP1 := shortRunEntry - tp1Points
shortRunTP2 := shortRunEntry - slPoints * runnerRR
shortRunBE := false
strategy.entry("ShortScalp", strategy.short, qty = baseQty * 50)
strategy.entry("ShortRun", strategy.short, qty = baseQty * 50)
resUsed := true
resArmed := false
resBosOK := false
//━━━━━━━━━━━━━━━━━━━
// 8. EXIT LOGIC – MINIMAL MODE
//━━━━━━━━━━━━━━━━━━━
// LONG – Minimal Risk: 1 trade, BE after TP1, runner to TP2
if isMinimal and strategy.position_size > 0 and not na(longEntry)
// Move to BE once TP1 is touched
if not longBE and high >= longTP1
longBE := true
// Base SL: BE or initial SL
float dynLongSL = longBE ? longEntry : longSL
// Optional trailing after BE
if longBE
if runnerStopMode == "Structure trail" and not na(lastSwingLow) and lastSwingLow > longEntry
dynLongSL := math.max(dynLongSL, lastSwingLow)
if runnerStopMode == "ATR trail"
trailSL = close - atrTrailMult * atrTrail
dynLongSL := math.max(dynLongSL, trailSL)
strategy.exit("Long Exit", "Long", stop = dynLongSL, limit = longTP2)
// SHORT – Minimal Risk: 1 trade, BE after TP1, runner to TP2
if isMinimal and strategy.position_size < 0 and not na(shortEntry)
if not shortBE and low <= shortTP1
shortBE := true
float dynShortSL = shortBE ? shortEntry : shortSL
if shortBE
if runnerStopMode == "Structure trail" and not na(lastSwingHigh) and lastSwingHigh < shortEntry
dynShortSL := math.min(dynShortSL, lastSwingHigh)
if runnerStopMode == "ATR trail"
trailSLs = close + atrTrailMult * atrTrail
dynShortSL := math.min(dynShortSL, trailSLs)
strategy.exit("Short Exit", "Short", stop = dynShortSL, limit = shortTP2)
//━━━━━━━━━━━━━━━━━━━
// 9. EXIT LOGIC – HYBRID MODE
//━━━━━━━━━━━━━━━━━━━
// LONG – Hybrid: Scalp + Runner
if isHybrid
// Scalp leg: full TP at TP1
if strategy.opentrades > 0
strategy.exit("LScalp TP", "LongScalp", stop = longRunSL, limit = longRunTP1)
// Runner leg
if strategy.position_size > 0 and not na(longRunEntry)
if not longRunBE and high >= longRunTP1
longRunBE := true
float dynLongRunSL = longRunBE ? longRunEntry : longRunSL
if longRunBE
if runnerStopMode == "Structure trail" and not na(lastSwingLow) and lastSwingLow > longRunEntry
dynLongRunSL := math.max(dynLongRunSL, lastSwingLow)
if runnerStopMode == "ATR trail"
trailRunSL = close - atrTrailMult * atrTrail
dynLongRunSL := math.max(dynLongRunSL, trailRunSL)
strategy.exit("LRun TP", "LongRun", stop = dynLongRunSL, limit = longRunTP2)
// SHORT – Hybrid: Scalp + Runner
if isHybrid
if strategy.opentrades > 0
strategy.exit("SScalp TP", "ShortScalp", stop = shortRunSL, limit = shortRunTP1)
if strategy.position_size < 0 and not na(shortRunEntry)
if not shortRunBE and low <= shortRunTP1
shortRunBE := true
float dynShortRunSL = shortRunBE ? shortRunEntry : shortRunSL
if shortRunBE
if runnerStopMode == "Structure trail" and not na(lastSwingHigh) and lastSwingHigh < shortRunEntry
dynShortRunSL := math.min(dynShortRunSL, lastSwingHigh)
if runnerStopMode == "ATR trail"
trailRunSLs = close + atrTrailMult * atrTrail
dynShortRunSL := math.min(dynShortRunSL, trailRunSLs)
strategy.exit("SRun TP", "ShortRun", stop = dynShortRunSL, limit = shortRunTP2)
//━━━━━━━━━━━━━━━━━━━
// 10. RESET STATE WHEN FLAT
//━━━━━━━━━━━━━━━━━━━
if strategy.position_size == 0
longEntry := na
shortEntry := na
longBE := false
shortBE := false
longRunEntry := na
shortRunEntry := na
longRunBE := false
shortRunBE := false
//━━━━━━━━━━━━━━━━━━━
// 11. VISUAL ENTRY MARKERS
//━━━━━━━━━━━━━━━━━━━
plotshape(longSignal, title = "Long Signal", style = shape.triangleup,
location = location.belowbar, color = color.lime, size = size.tiny, text = "L")
plotshape(shortSignal, title = "Short Signal", style = shape.triangledown,
location = location.abovebar, color = color.red, size = size.tiny, text = "S")
AI ALGO [Ganesh]Core Strategy Components\
1. EMA (Exponential Moving Average) SystemThe strategy uses three EMAs to identify trend direction:
EMA 48 (longer-term trend)
EMA 2 (short-term momentum)
EMA 21 (medium-term trend)
How it works:
Bullish trend: When price is above EMA 21 (green cloud)
Bearish trend: When price is below EMA 21 (red cloud)
EMA Cloud: The area between EMA 2 and EMA 48/21 provides visual trend confirmation
Optional higher timeframe (HTF) analysis for multi-timeframe confirmation
2. DEMA ATR (Double EMA + Average True Range)
This is a dynamic support/resistance indicator that adapts to volatility:Components:
DEMA (Double Exponential Moving Average): Smooths price action with less lag
ATR Bands: Creates upper and lower bands based on volatility (ATR × 1.7 factor)
Signal Generation:
Green line: Uptrend (DEMA ATR rising)
Red line: Downtrend (DEMA ATR falling)
Acts as a trailing stop-loss level that adjusts with market volatility
3. Smart Trail System (Fibonacci-Based)
An advanced trailing stop system using modified true range calculations:Key Features:
Calculates true range using Wilder's smoothing method
Creates Fibonacci retracement levels (61.8%, 78.6%, 88.6%) from the trail line
Adaptive stop-loss: Adjusts based on ATR factor (4.2) and smoothing (4)
Trend Detection:
Bullish: Price > Trailing line (blue zones)
Bearish: Price < Trailing line (red zones)
The Fibonacci zones show potential support/resistance areas
4. ZigZag Indicator Identifies significant swing highs and lows:
Length parameter: 13 (sensitivity control)
Labels: Higher Highs (HH), Lower Lows (LL), etc.
Helps identify trend reversals and key pivot points
5. Support & Resistance Levels
Strength-based S/R: Identifies horizontal support/resistance zones
Zone width: Adjustable percentage-based zones
High/Low zones: Marks significant price levels
Trading LogicEntry Conditions (Implied)The strategy likely enters trades when:Long Entry:
Price crosses above DEMA ATR (green)
Price is above EMA 21 (bullish EMA cloud)
Smart Trail confirms uptrend
Price bounces from Fibonacci support levels
Short Entry:
Price crosses below DEMA ATR (red)
Price is below EMA 21 (bearish EMA cloud)
Smart Trail confirms downtrend
Price rejects from Fibonacci resistance levels
Exit/Stop-Loss Strategy
Trailing stops: Using Smart Trail Fibonacci levels
Dynamic stops: DEMA ATR line acts as a moving stop-loss
Risk management: Position sizing at 50% of equity per trade
Dashboard Features1. Weekly Performance Table
Tracks trades per day of the week
Shows win/loss statistics
Calculates win rate percentage
2. Monthly Performance Table
Monthly P&L breakdown
Yearly performance summary
Color-coded returns (green = profit, red = loss)
Strategy Parameters
Initial Capital: $5,000
Commission: 0.02% per trade
Position Size: 50% of equity
Pyramiding: Disabled (no adding to positions)
Calculation: On bar close (not tick-by-tick)
Visual Elements
EMA clouds: Green (bullish) / Red (bearish)
DEMA ATR line: Dynamic support/resistance
Smart Trail zones: Fibonacci-based colored bands
ZigZag lines: Swing high/low connections
S/R zones: Horizontal support/resistance areas
Strategy Philosophy
This is a trend-following strategy with dynamic risk management that:
Uses multiple timeframes for confirmation
Adapts to volatility through ATR-based indicators
Provides clear visual cues for trend direction
Includes comprehensive performance tracking
Combines momentum (EMAs) with volatility (ATR) for robust signals
The strategy works best in trending markets and uses the Fibonacci trail system to maximize profits while protecting against reversals with adaptive stop-losses.
Market Solver Pro [Eˣ]Market Solver Pro is a multi-layer trend-and-structure based strategy designed to help traders study how price behaves around higher-timeframe support, resistance, and momentum shifts. It combines three core concepts into a single framework:
1. Multi-Timeframe Structure Zones (Support/Resistance Gradient)
The script identifies swing-based higher-timeframe pivot highs (PH) and pivot lows (PL).
These levels form dynamic zones where price frequently reacts. A gradient is displayed between the PH and PL to help traders visually understand where price sits within the broader structure.
This zone system is built using:
A structure timeframe (W/D/60 depending on chart TF)
Multi-step pivot validation
Real-time plot adjustments for consistency
The purpose of this component is to highlight context—whether the market is pressing into resistance, approaching support, or moving through the middle of the structure range.
2. Adaptive Ichimoku-Based Trend Model (Three-Layer Confirmation)
The strategy uses an expanded Ichimoku-style calculation applied across three timeframe multipliers.
Each layer evaluates:
Tenkan-sen slope
Kijun-sen slope
Cloud alignment
Momentum confirmation relative to recent highs/lows
Based on the user’s Risk Appetite (Low/Moderate/High), the strategy selects which layer to prioritize:
Low → Long-term trend consistency
Moderate → Mid-term sensitivity
High → Short-term responsiveness
The result is a trend-state signal (Up or Down) derived from structural and directional agreement across multiple layers.
3. Market Structure Filter (Directional Bias Control)
A price-action-based structure engine classifies swing highs/lows into:
HH (Higher High)
LH (Lower High)
HL (Higher Low)
LL (Lower Low)
The Market Structure Filter uses this information to determine whether higher-timeframe price action supports trend continuation or is compressing into a squeeze condition.
Filters include:
None
Standard
Strict
This prevents trades from triggering during conflicting structural environments unless intentionally allowed.
4. Entry Logic (Long / Short Conditions)
A signal appears only when all active components agree:
Valid chart timeframe
Date-range filter permitting backtest inclusion
HTF structure filter aligned
Trend-state confirmation
Price breaking beyond the current structure zone
Exclusion of opposite pin-bar signatures
When these conditions align, the strategy issues a long or short entry.
5. Stop-Loss Engine (S1/R1 Dynamic Management)
Stop-loss placement is derived from the pivot-timeframe’s S1/R1 levels and the bar of entry.
Two modes are available:
Standard trail: Stop updates with improving S1/R1 levels
2R → Break-Even: Moves stop to break-even on a 2R move, then trails using the stricter of BE or S1/R1
This helps users study how momentum-based trailing behaviour affects risk exposure under different market conditions.
6. Performance Table (Optional Display)
The script can display a performance summary including:
Win/Loss count
Profit factor
Average win/loss
Compounded result
Largest win/loss
Current risk percentage
These statistics reflect the parameters chosen inside the script and can assist in evaluating how different configurations behave when backtesting historical data.
They are not predictive and do not imply future results.
7. Auto vs Manual Settings
Auto Mode: Automatically selects trend multipliers, structure timeframe, and risk mode according to the chart’s timeframe.
Manual Mode: Gives users full control over all parameters and is used by alert conditions.
This allows flexible experimentation across intraday and swing environments.
8. Intended Use
This strategy is designed for educational and analytical purposes—specifically to help traders explore how multi-timeframe trend alignment, market structure, and dynamic support/resistance interact.
It does not guarantee performance and should be used alongside independent analysis, risk management, and market awareness.
Profitable Pair Correlation Divergence Scanner v6This strategy identifies divergence opportunities between two correlated assets using a combination of Z-Score spread analysis, trend confirmation, RSI & MACD momentum checks, correlation filters, and ATR-based stop-loss/take-profit management. It’s optimized for positive P&L and realistic trade execution.
Key Features:
Pair Divergence Detection:
Measures deviation between returns of two assets and identifies overbought/oversold spread conditions using Z-Score.
Trend Alignment:
Trades only in the direction of the primary asset’s trend using a fast EMA vs slow EMA filter.
Momentum Confirmation:
Confirms trades with RSI and MACD to reduce false signals.
Correlation Filter:
Ensures the pair is strongly correlated before taking trades, avoiding noisy signals.
Risk Management:
Dynamic ATR-based stop-loss and take-profit ensures proper reward-to-risk ratio.
Exit Conditions:
Automatically closes positions when Z-Score normalizes, or ATR-based exits are hit.
How It Works:
Calculate Returns:
Computes returns for both assets over the selected timeframe.
Z-Score Spread:
Calculates the spread between returns and normalizes it using moving average and standard deviation.
Trend Filter:
Only takes long trades if the fast EMA is above the slow EMA, and short trades if the fast EMA is below the slow EMA.
Momentum Confirmation:
Confirms trade direction with RSI (>50 for longs, <50 for shorts) and MACD alignment.
Correlation Check:
Ensures the pair’s recent correlation is strong enough to validate divergence signals.
Trade Execution:
Opens positions when Z-Score crosses thresholds and all conditions align. Positions close when Z-Score normalizes or ATR-based SL/TP is hit.
Plot Explanation:
Z-Score: Blue line shows divergence magnitude.
Entry Levels: Red/Green lines mark long/short thresholds.
Exit Zone: Gray lines show normalization zone.
EMA Trend Lines: Purple (fast), Orange (slow) for trend alignment.
Correlation: Teal overlay shows current correlation strength.
Usage Tips:
Use highly correlated pairs for best results (e.g., EURUSD/GBPUSD).
Run on higher timeframe charts (1h or 4h) to reduce noise.
Adjust ATR multiplier based on volatility to avoid premature stops.
Combine with alerts for automated notifications or webhook execution.
Conclusion:
The Profitable Pair Correlation Divergence Scanner v6 is designed for traders who want systematic, low-risk, positive P&L trading opportunities with minimal manual monitoring. By combining trend alignment, momentum confirmation, correlation filters, and dynamic exits, it reduces false signals and improves execution reliability.
Run it on TradingView and watch how it captures divergence opportunities while maintaining positive P&L across trades.
BTC Dynamic Volatility Trend Backtested from 2017 to present, this strategy has delivered a staggering 7100%+ cumulative return. It doesn't just track the market; it dominates it. By capturing major trends and strictly limiting drawdowns, it has significantly outperformed the standard 'Buy & Hold' BTC strategy, proving its ability to generate massive alpha across multiple bull and bear cycles.
自 2017 年至今,本策略实现了惊人的 7100%+ 累计收益率。它不仅仅是跟随市场,更是超越了市场。通过精准捕捉主升浪并严格控制回撤,该策略在穿越多轮牛熊周期后,大幅度跑赢了比特币‘买入持有’(Buy & Hold)的基准收益,展现了极致的阿尔法(Alpha)捕捉能力。"
Introduction :Simplicity is the ultimate sophistication. This strategy is designed specifically for Bitcoin (BTC), capturing its unique characteristics: high volatility, frequent fakeouts, and massive trend persistence. It abandons complex indicators in favor of a robust logic: "Follow the Trend, Filter the Noise, Let Profits Run."
Core Logic
Trend Filter (Fibonacci EMA 144): We use the 144-period Exponential Moving Average as the baseline. Longs are only taken above this line, and shorts only below. This keeps you on the right side of the major trend.
Volatility Breakout (Donchian Channel 20): Entries are triggered only when price breaks the 20-day high (for longs) or low (for shorts). This confirms momentum and avoids trading in chop.
Dynamic Risk Management (ATR Chandelier Exit):
Instead of fixed % stops, we use Average True Range (ATR) to calculate stop losses.
The Ratchet Mechanism: The stop loss moves up with the price but never moves down (for longs). This locks in profits automatically as the trend develops and exits immediately when volatility turns against you.
Why Use This Strategy?
Zero Repainting: All signals are confirmed.
No Curve Fitting: Uses classic parameters (144, 20) that have worked for decades.
Mental Peace: The strategy handles the exit. You don't need to guess where to sell. It holds through minor corrections and exits only when the trend truly reverses.
Settings
Leverage %: Adjust your position size based on equity (default 100% = 1x).
Timeframe: Recommended for 4H charts.
中文版 (Chinese Version)
简介 :大道至简。本策略专为 比特币 (BTC) 设计,针对其高波动、假突破多但趋势爆发力强的特点,摒弃了复杂的过度拟合指标,回归交易本质:“顺大势,滤噪音,截断亏损,让利润奔跑”。
核心逻辑
趋势过滤器 (斐波那契 EMA 144): 使用 144 周期指数移动平均线作为多空分水岭。价格在均线之上只做多,之下只做空。这能有效过滤掉大部分震荡市的噪音。
波动率突破 (唐奇安通道 20): 只有当价格突破过去 20 根 K 线的最高价(做多)或最低价(做空)时才进场。这确保了我们只在趋势确立的瞬间入场。
动态风控 (ATR 吊灯止损):
拒绝固定点数止损,使用 ATR(平均真实波幅)根据市场热度动态计算安全距离。
棘轮机制: 止损线会跟随价格上涨而上移,但绝不会下移(做多时)。这实现了自动化的“利润锁定”,既能扛住正常的波动回调,又能在大势反转时果断离场。
策略优势
绝不重绘: 所有信号均为收盘确认或实时触价。
拒绝拟合: 使用经过数十年市场验证的经典参数组合。
心态管理: 策略全自动管理出场。你不需要纠结何时止盈,它会帮你吃到完整的鱼身,直到趋势结束。
使用建议
资金管理: 可通过参数调整仓位占比(默认 100% = 1倍杠杆)。
推荐周期: 建议在4小时 图表上运行效果最佳。
US Market Long Horizon Momentum Summary in one paragraph
US Market Long Horizon Momentum is a trend following strategy for US index ETFs and futures built around a single eighteen month time series momentum measure. It helps you stay long during persistent bull regimes and step aside or flip short when long term momentum turns negative.
Scope and intent
• Markets. Large cap US equity indices, liquid US index ETFs, index futures
• Timeframes. 4h/ Daily charts
• Default demo used in the publication. SPY on 4h timeframe chart
• Purpose. Provide a minimal long bias index timing model that can reduce deep drawdowns and capture major cycles without parameter mining
• Limits. This is a strategy. Orders are simulated on standard candles only
Originality and usefulness
• Unique concept or fusion. One unscaled multiple month log return of an external benchmark symbol drives all entries and exits, with optional volatility targeting as a single risk control switch.
• Failure mode addressed. Fully passive buy and hold ignores the sign of long horizon momentum and can sit through multi year drawdowns. This script offers a way to step down risk in prolonged negative momentum without chasing short term noise.
• Testability. All parameters are visible in Inputs and the momentum series is plotted so users can verify every regime change in the Tester and on price history.
• Portable yardstick. The log return over a fixed window is a unit that can be applied to any liquid symbol with daily data.
Method overview in plain language
The method looks at how far the benchmark symbol has moved in log return terms over an eighteen month window in our example. If that long horizon return is positive the strategy allows a long stance on the traded symbol. If it is negative and shorts are enabled the strategy can flip short, otherwise it goes flat. There is an optional realised volatility estimate on the traded symbol that can scale position size toward a target annual volatility, but in the default configuration the model uses unit leverage and only the sign of momentum matters.
Base measures
Return basis. The core yardstick is the natural log of close divided by the close eighteen months ago on the benchmark symbol. Daily log returns of the traded symbol feed the realised volatility estimate when volatility targeting is enabled.
Components
• Component one Momentum eighteen months. Log of benchmark close divided by its close mom_lookback bars ago. Its sign defines the trend regime. No extra smoothing is applied beyond the long window itself.
• Component two Realised volatility optional. Standard deviation of daily log returns on the traded symbol over sixty three days. Annualised by the square root of 252. Used only when volatility targeting is enabled.
• Optional component Volatility targeting. Converts target annual volatility and realised volatility into a leverage factor clipped by a maximum leverage setting.
Fusion rule
The model uses a simple gate. First compute the sign of eighteen month log momentum on the benchmark symbol. Optionally compute leverage from volatility. The sign decides whether the strategy wants to be long, short, or flat. Leverage only rescales position size when enabled and does not change direction.
Signal rule
• Long suggestion. When eighteen month log momentum on the benchmark symbol is greater than zero, the strategy wants to be long.
• Short suggestion. When that log momentum is less than zero and shorts are allowed, the strategy wants to be short. If shorts are disabled it stays flat instead.
• Wait state. When the log momentum is exactly zero or history is not long enough the strategy stays flat.
• In position. In practice the strategy sits IN LONG while the sign stays positive and flips to IN SHORT or flat only when the sign changes.
Inputs with guidance
Setup
• Momentum Lookback (months). Controls the horizon of the log return on the benchmark symbol. Typical range 6 to 24 months. Raising it makes the model slower and more selective. Lowering it makes it more reactive and sensitive to medium term noise.
• Symbol. External symbol used for the momentum calculation, SPY by default. Changing it lets you time other indices or run signals from a benchmark while trading a correlated instrument.
Logic
• Allow Shorts. When true the strategy will open short positions during negative momentum regimes. When false it will stay flat whenever momentum is negative. Practical setting is tied to whether you use a margin account or an ETF that supports shorting.
Internal risk parameters (not exposed as inputs in this version) are:
• Target Vol (annual). Target annual volatility for volatility targeting, default 0.2.
• Vol Lookback (days). Window for realised volatility, default 63 trading days.
• Max Leverage. Cap on leverage when volatility targeting is enabled, default 2.
Usage recipes
Swing continuation
• Signal timeframe. Use the daily chart.
• Benchmark symbol. Leave at SPY for US equity index exposure.
• Momentum lookback. Eighteen months as a default, with twelve months as an alternative preset for a faster swing bias.
Properties visible in this publication
• Initial capital. 100000
• Base currency. USD
• Default order size method. 5% of the total capital in this example
• Pyramiding. 0
• Commission. 0.03 percent
• Slippage. 3 ticks
• Process orders on close. On
• Bar magnifier. Off
• Recalculate after order is filled. Off
• Calc on every tick. Off
• All request.security calls use lookahead = barmerge.lookahead_off
Realism and responsible publication
The strategy is for education and research only. It does not claim any guaranteed edge or future performance. All results in Strategy Tester are hypothetical and depend on the data vendor, costs, and slippage assumptions. Intrabar motion is not modeled inside daily bars so extreme moves and gaps can lead to fills that differ from live trading. The logic is built for standard candles and should not be used on synthetic chart types for execution decisions.
Performance is sensitive to regime structure in the US equity market, which may change over time. The strategy does not protect against single day crash risk inside bars and does not model gap risk explicitly. Past behavior of SPY and the momentum effect does not guarantee future persistence.
Honest limitations and failure modes
• Long sideways regimes with small net change over eighteen months can lead to whipsaw around the zero line.
• Very sharp V shaped reversals after deep declines will often be missed because the model waits for momentum to turn positive again.
• The sample size in a full SPY history is small because regime changes are infrequent, so any test must be interpreted as indicative rather than statistically precise.
• The model is highly dependent on the chosen lookback. Users should test nearby values and validate that behavior is qualitatively stable.
Legal
Education and research only. Not investment advice. You are responsible for your own decisions. Always test on historical data and in simulation with realistic costs before any live use.
Sniper PRO: The "Buffett Mode" VFI System"The stock market is a device for transferring money from the impatient to the patient." — Warren Buffett
Most traders lose money because they try to catch every small move. Sniper PRO is designed for the opposite: It identifies the massive, multi-week and multi-month trends driven by Institutional "Smart Money", and keeps you in the trade until the real move is over.
This is not a scalping tool. This is a Wealth Compounding Engine.
🚀 Why is this the "Secret Weapon"?
We combined the most searched and respected indicators into a single, high-probability algorithm:
VFI (Smart Money Flow): Tracks what the "Whales" are doing, not the retail traders.
Fibonacci Golden Ratio: Uses math to secure profits, not guesswork.
Trend Protocol: Filters out 90% of market noise.
🔥 The "Diamond Hands" Logic (VFI Shield)
The biggest problem in long-term trading is getting shaken out by a temporary dip. Sniper PRO solves this with the VFI Shield:
Even if price drops below your Stop Loss, the algorithm checks the Institutional Volume.
If Big Money is still holding? The Shield holds. You stay in the trade.
This feature alone allows you to ride trends for Weeks and Months (like NVDA, TSLA, BTC runs) without exiting prematurely.
⚙️ How It Works
1. The "Buffett" Entry We only enter when the odds are stacked in our favor:
Trend: Price must be above the EMA 50 (Bull Market).
Volume: VFI must be Positive (Accumulation Phase).
Volatility: The market must be active, not chopping sideways.
2. The Compounding Exit (Fibonacci Ladder) Instead of selling too early, the system builds a Fibonacci Ladder behind the price.
As the asset grows, your Stop Loss climbs automatically to the next Fibonacci level (0.382 -> 0.5 -> 0.618).
This locks in profits step-by-step while giving the asset room to breathe and grow.
3. Asymmetric Safety Shorting is risky in a long-term bull market. The system automatically reduces the size of Short trades to protect your capital, while maximizing exposure to Long rallies.
📊 Visual Guide
🔵 Blue Line: The Trend Baseline.
🔴 Red Steps: Your "Locked" Profit Level (Trailing Stop).
🟣 Purple 'X': Where the trade finally closed (Transparency).
Background Color:
Green: Bull Market (Safe to hold).
Orange: Choppy/Dangerous (Cash is King).
Best For:
Swing Traders & Investors (1D, 4H Timeframes).
People who want to catch the Big Moves and ignore the noise.
Disclaimer: This tool is designed for trend following. Past performance is not indicative of future results. Always manage your risk.
Momentum FlowThis is a rule-based, fully automated trading strategy** developed **exclusively for BANKNIFTY** and optimized strictly for the **2-Hour (2H) timeframe**. The system is designed to identify **high-quality directional opportunities** while filtering out low-probability market noise.
The strategy is built for traders who prefer:
* Clean positional trading
* Limited, high-quality signals
* Fully mechanical execution
* No discretionary decision-making
This system is **locked by design** and will **only operate on BANKNIFTY – 2H timeframe** to preserve performance integrity. Usage on any other symbol or timeframe is intentionally restricted.
---
### ✅ SUITABLE FOR:
* Positional traders
* Swing traders
* Working professionals
* Traders seeking structured, disciplined systems
---
### ❌ NOT SUITABLE FOR:
* Scalping
* Low-timeframe trading
* High-frequency setups
* Traders seeking daily signals
---
### ⚠️ IMPORTANT DISCLAIMER:
This strategy is provided strictly for **educational and research purposes only**. Trading in financial markets involves significant risk, and losses are possible. Past performance does not guarantee future results. The creator is not responsible for any financial losses incurred by the use of this strategy. Always trade with proper risk management.
---
Crypto Scalping Strategy by SAIFOverview
An optimized scalping strategy designed for cryptocurrency markets, focusing on breakout opportunities with strict risk controls and optional safe compounding features. This strategy combines price action, volume analysis, and multi-timeframe trend confirmation.
Key Features
Breakout Detection System
Identifies significant price breakouts using dynamic channel analysis
Confirms breakouts with volume surge validation
Filters trades based on multi-timeframe trend alignment
Multi-Timeframe Trend Confirmation
Analyzes 1-hour and 4-hour timeframes for trend direction
Only takes trades aligned with higher timeframe trends
Uses long-term moving averages for trend validation
Advanced Risk Management
Conservative default risk: 1% per trade
ATR-based stop-loss placement (2x ATR)
Trailing stop mechanism to protect profits
Minimum profit target before trailing activates
Built-in position sizing based on account equity
Safe Capital Management Options
Fixed Capital Mode: Trade with consistent position sizes
Safe Compounding Mode: Gradually scales position size based on realized profits only
Drawdown Protection: 80% equity floor prevents excessive capital erosion
Leverage Control: 10x leverage factored into position calculations
Technical Filters
Momentum confirmation via oscillator conditions
Directional movement analysis
Volume threshold requirements
Trend strength validation
Position Sizing
The strategy automatically calculates position sizes based on:
Your specified risk percentage
Current ATR volatility
Available leverage
Account equity (with optional compounding)
Trade Management
Entry: Executes on confirmed breakouts with volume and trend alignment
Stop Loss: Placed at 2x ATR from entry
Take Profit: Uses trailing stops that activate after minimum profit threshold
Exit: Automatically managed through strategy exits
Customization Options
Adjustable channel length for breakout detection
Configurable volume multiplier for surge detection
Customizable oscillator thresholds
Flexible ATR period for volatility measurement
Optional compounding vs. fixed capital modes
Adjustable trailing stop parameters
Visual Features
Channel boundaries plotted on chart
Entry signals marked with arrows
Background coloring indicates trend direction
Real-time info table shows:
Current risk level
Compounding status
Capital values
Drawdown protection status
Alert Capabilities
Built-in alert conditions for:
Buy signals (breakout opportunities)
Sell signals (breakdown opportunities)
Important Disclaimers
⚠️ Educational Purpose Only: This strategy is provided for educational and research purposes. It is not investment advice.
⚠️ High-Risk Trading: Scalping and leverage trading carry substantial risk of loss. Cryptocurrency markets are highly volatile.
⚠️ Not Financial Advice: This tool does not constitute financial, investment, or trading advice. Always conduct your own research and consult qualified professionals.
⚠️ Leverage Warning: This strategy uses 10x leverage, which can amplify both gains and losses significantly.
⚠️ Backtesting Limitations: Past performance does not guarantee future results. Real trading involves slippage, execution delays, and emotional factors not present in backtesting.
⚠️ Capital at Risk: Only trade with capital you can afford to lose completely. Never trade with borrowed money or funds needed for living expenses.
Commission & Fees
Commission: 0.13% per trade
Initial capital: $100 (default)
Commission costs are factored into backtest results
Best Practices
Start Small: Begin with minimum capital and conservative risk settings
Test Thoroughly: Backtest across different market conditions and timeframes
Monitor Performance: Track win rate, profit factor, and maximum drawdown
Adjust Parameters: Optimize settings for your specific trading pairs
Use Alerts: Set up notifications to avoid missing opportunities
Manage Emotions: Follow the strategy rules consistently without override
Recommended Markets
High liquidity cryptocurrency pairs (BTC, ETH major pairs)
Assets with clear trending behavior
Markets with sufficient volume for scalping
Timeframes: 1H to 4H charts recommended
Risk Reminder
Scalping requires:
Quick decision-making
Tight risk management
Consistent discipline
Understanding of market microstructure
Proper capitalization
Always practice proper risk management. The strategy includes safety features, but no system can eliminate trading risk entirely. Trade responsibly.
OLPF - Octavio Low-Pass Filter StrategyOCTAVIO LOW-PASS FILTER (OLPF) v1.0
---
DESCRIPTION
The Octavio Low-Pass Filter (OLPF) is an advanced Finite Impulse Response (FIR) low-pass filter designed for financial time series analysis. It builds upon the foundational work of the New Low-Pass Filter (NLF) by Alex Pierrefeu, introducing three key enhancements that significantly improve signal quality and reduce common filtering artifacts.
---
KEY INNOVATIONS
1. HERMITE SMOOTHING POLYNOMIAL
Replaces the simple quadratic base (x²) with the cubic Hermite interpolation polynomial . This mathematical refinement provides C¹ continuity at kernel boundaries, ensuring smoother transitions and eliminating edge discontinuities that can introduce artificial noise into the filtered signal.
2. LANCZOS SIGMA FACTOR WINDOWING
Applies a Lanczos-type attenuation factor to each harmonic component in the sine series. This windowing technique dramatically reduces the Gibbs phenomenon - the characteristic overshooting and ringing that occurs near sharp price transitions. The result is a cleaner signal with minimized false crossover signals.
3. ADAPTIVE WEIGHT NORMALIZATION
Implements dynamic normalization of kernel weights, guaranteeing that the sum of all filter coefficients equals unity. This ensures proper amplitude preservation across all market conditions and prevents signal drift or scaling artifacts.
---
MATHEMATICAL FOUNDATION
The OLPF kernel function is defined as:
K(x, N) = x²(3-2x) + Σ (1/i) × σ(i) × sin(πxi)
Where:
- x ∈ is the normalized position within the filter window
- N is the filter order (degree of the sine series)
- σ(i) = sin(πi/(N+1)) / (πi/(N+1)) is the Lanczos sigma factor
The filter output is computed via discrete convolution:
F(M, N) = Σ src × / W
Where W is the sum of all weights for normalization.
---
APPLICATIONS
- Trend identification with reduced lag compared to traditional MAs
- Noise reduction in volatile market conditions
- Generation of trading signals via fast/slow filter crossovers
- Foundation for more complex indicator development
---
STRATEGY IMPLEMENTATION
This script implements a dual-filter crossover strategy with:
- Fast OLPF for responsive signal generation
- Slow OLPF for trend confirmation
- EMA filter for additional trend validation
- ATR-based dynamic stop-loss positioning
- Risk-based position sizing (percentage of equity)
---
AUTHOR
Name: Hector Octavio Piccone Pacheco
Filter: Octavio Low-Pass Filter (OLPF)
Version: 1.0
Based on: New Low-Pass Filter (NLF) by Alex Pierrefeu
Date: 2025
Original Contributions:
- Hermite smoothing polynomial kernel base
- Lanczos sigma factor windowing for Gibbs reduction
- Adaptive weight normalization system
- Integrated risk management framework
---
LICENSE
This work is licensed under the Mozilla Public License 2.0. You are free to use, modify, and distribute this code with attribution.
---
DISCLAIMER
Trading involves substantial risk of loss. This indicator is provided for educational and research purposes only. Past performance does not guarantee future results. Always conduct your own analysis and risk assessment.
VWAP Pullback + BOS + OBV v2 (Crypto Futures 15m)This strategy combines VWAP pullbacks, break-of-structure entries, and OBV confirmation to catch high-quality trend continuation moves on crypto futures. It waits for price to trend above or below the 200 EMA, then pulls back into the VWAP band, signaling a potential reload zone. A trade only triggers when price breaks recent structure in the direction of the trend and OBV shows supportive volume flow. An ATR volatility filter blocks entries during choppy, low-energy periods, and all trades use an ATR stop-loss with fixed reward-to-risk targeting. The result is a cleaner, more disciplined trend-following system designed for 15m–30m BTC/ETH scalping.
CPR + EMA(20/50/200) Strategy (5m) - NIFTY styleindicator best suited for nifty for 5 minute time frame.
Inyerneck Quiet Bottom Hunter v36 — Last Sorta-Working VersionQuiet Bottom Hunter v36 — Accurate Description (the sorta-working version that fires signals)
Overview
A mean-reversion bottom-hunting strategy for small-cap stocks (<$2B market cap). Designed to catch slow-bleed stocks that quietly bottom out and rebound 20–60%+. Good for beginners because signals are infrequent and the setup is easy to understand.
Timeframe
Daily (D) — best results on 1-day charts. Works on weekly too, but signals are rarer.
Triggers / Conditions (all must be true at bar close)
Drop from high ≥ 25% from the highest high in the last 100 bars (previous bars only — no repainting)
Volume ≤ 80% of the 50-day average (quiet accumulation, no panic selling left)
RSI(14) ≤ 38 (oversold territory)
Green/flat streak ≥ 2 consecutive days where close ≥ open (shows sellers are exhausted)
When all four line up → tiny green “QB” triangle below the bar
Firing Frequency
1–4 signals per month on an average small-cap stock (depends on market conditions). Some months zero, some months a handful. Not spammy, but not ultra-rare either.
Usage Parameters
Position size: 10% of equity per trade (default — change to 5–20% depending on risk tolerance)
Profit target: 40%
Stop loss: 12%
Hold time: usually 2–8 weeks
Best on low-float, high-volatility small caps (TLRY, SNDL, MVIS, SOUN, INHD, etc.)
Expected Performance (backtested on 2025 small caps)
Win rate: ~80–85%
Average rebound on winners: +30–40%
Some losers when the bottom isn't "quiet" enough
How to use
Add to daily charts of your small-cap watchlist
When “QB” arrow appears, buy at next open or market
Set 40% target / 12% stop or trail it
Wait for the rebound — no day-trading needed
Adaptive Alligator - Asymmetric MH (Entry Only)
Adaptive Alligator – Asymmetric Mexican Hat (Entry Only)
This strategy combines adaptive cycle detection (wavelet + autocorrelation), directional entropy, and a Mexican Hat filter to generate highly selective LONG entry signals. Exits are based solely on the Alligator structure. The system is designed to detect asymmetric, strong, and accelerating bullish phases while filtering out market noise.
1. Adaptive Cycle Detection: The strategy analyzes the median price using wavelet decomposition (Haar, Daubechies D4/D6, Symlet 4), wavelet detail energy, and autocorrelation. It also incorporates the ratio of short-term to long-term ATR volatility. Based on these components, it computes a dominant_cycle value, which dynamically controls the lengths of the Alligator lines (Jaw, Teeth, Lips). This adaptive behavior allows the Alligator to speed up during trending phases and slow down during noise or consolidation.
2. Directional Entropy: Entropy is measured separately for upward and downward movements within the selected lookback window. The entropy difference: e_diff = entropy_down - entropy_up represents the directional bias of the market. When e_diff > 0, the market shows an organized bullish pressure; when < 0, bearish dominance.
3. Mexican Hat Filter: The Mexican Hat (Ricker Wavelet) acts as a second-derivative filter, detecting local maxima in the acceleration of directional entropy. The filtered output (mh_out) is compared against an adaptive noise level computed as SMA(|mh_out|). A signal is considered strong only when: – mh_out exceeds the adaptive noise level, – mh_out is rising relative to the previous bar. This step is critical for eliminating false signals produced by random fluctuations.
4. Entry Logic: A LONG entry requires all three layers: (1) Alligator structure: Lips > Teeth > Jaw. (2) Directional entropy bias: e_diff > 0. (3) A strong, accelerating Mexican Hat signal confirmed by a user-defined number of bars. Once all conditions are satisfied, a buy_final entry is triggered.
5. Exit Logic: Exits are intentionally simple and rely solely on the Alligator: crossunder(lips, teeth) This clean separation ensures precise, adaptive entries and stable, consistent exits.
6. Visual Components: – Alligator lines: Jaw (blue), Teeth (red), Lips (green), plotted with their characteristic offsets. – Background coloring reflects signal strength: dark green (STRONG BUY), lime (acceleration), yellow (weak bias), transparent otherwise. – A dedicated panel displays e_diff (entropy difference), mh_out (Mexican Hat output), and the adaptive noise band.
7. Diagnostic Table: A compact diagnostic dashboard shows: – MH Value, – Noise Level, – MH Acceleration (YES/NO), – Signal Status (STRONG BUY / ACCELERATING / WEAK / BEARISH). It updates on the last bar, making it suitable for live monitoring.
8. Use Case: This strategy is highly selective and ideal as an entry module within trend-following systems. By combining wavelets, entropy, and adaptive noise modeling, it effectively filters out consolidation periods and focuses only on statistically significant bullish transitions. It can be integrated with various exit frameworks such as ATR stops, channel-based exits, range boxes, or trailing logic.
Sniper Perfect: Institutional Flow & Adaptive Risk ProtocolOverview Sniper Perfect is an advanced trend-following system designed to filter out "fakeouts" and institutional traps using a multi-layered verification protocol. It combines Volume Flow (VFI), Volatility (CHOP), and Momentum (RSI) to ensure entry only occurs in high-probability setups.
Key Features
🛡️ The Triple Filter Protocol
Strict Choppiness Filter: Uses a strict CHOP threshold (40). If the market is moving sideways, the algorithm locks all new entries to prevent whipsaws.
RSI Extremes Protection: Prevents FOMO buying at tops (Overbought > 70) and panic selling at bottoms (Oversold < 30).
Conflict Zone Detection: Identifies divergence between Price action and Money Flow. If price rises but institutional money exits, the background turns Gray and trading is disabled.
🔒 Adaptive Risk Management
Heat-Breathing Stop Loss: The SL distance adjusts dynamically based on market Volume and Volatility ("Heat").
Ratchet Mechanism: A mechanical lock ensures the Stop Loss can ONLY move in the direction of profit. It never loosens, guaranteeing that paper profits are protected.
📊 Live Dashboard A real-time panel in the bottom-right corner displays:
VFI Flow: Positive/Negative money flow.
Market Status: Active vs. Locked (Choppy).
RSI Status: Neutral, Overbought, or Oversold.
Visual Guide
🟢 Lime Zone: Clean Bullish Trend.
🔴 Red Zone: Clean Bearish Trend.
🟠 Orange Zone: High Choppiness (Stay Out).
🟣 'X' Marker: Exact price where the Stop Loss was triggered.
Disclaimer: For educational and research purposes only. Always manage your risk.
Sniper PerfectOverview Sniper Perfect is an advanced trend-following system designed to filter out "fakeouts" and institutional traps using a multi-layered verification protocol. It combines Volume Flow (VFI), Volatility (CHOP), and Momentum (RSI) to ensure entry only occurs in high-probability setups.
Key Features
🛡️ The Triple Filter Protocol
Strict Choppiness Filter: Uses a strict CHOP threshold (40). If the market is moving sideways, the algorithm locks all new entries to prevent whipsaws.
RSI Extremes Protection: Prevents FOMO buying at tops (Overbought > 70) and panic selling at bottoms (Oversold < 30).
Conflict Zone Detection: Identifies divergence between Price action and Money Flow. If price rises but institutional money exits, the background turns Gray and trading is disabled.
🔒 Adaptive Risk Management
Heat-Breathing Stop Loss: The SL distance adjusts dynamically based on market Volume and Volatility ("Heat").
Ratchet Mechanism: A mechanical lock ensures the Stop Loss can ONLY move in the direction of profit. It never loosens, guaranteeing that paper profits are protected.
📊 Live Dashboard A real-time panel in the bottom-right corner displays:
VFI Flow: Positive/Negative money flow.
Market Status: Active vs. Locked (Choppy).
RSI Status: Neutral, Overbought, or Oversold.
Visual Guide
🟢 Lime Zone: Clean Bullish Trend.
🔴 Red Zone: Clean Bearish Trend.
🟠 Orange Zone: High Choppiness (Stay Out).
🟣 'X' Marker: Exact price where the Stop Loss was triggered.
Disclaimer: For educational and research purposes only. Always manage your risk.
The Truth Sniper: Breathing Edition**Overview**
This is a highly advanced trend-following strategy designed to filter out market noise ("Fakeouts") and manage risk using a dynamic "Breathing Ratchet" mechanism. It combines traditional trend analysis with institutional money flow logic to identify the true market direction.
**Key Features**
**1. The Conflict Zone (Gray Zone Filter)**
Most strategies fail during low-volume accumulation or distribution phases. This algorithm introduces a "Conflict Zone" logic:
* **True Rally (Green):** Price is above EMA50 AND Money Flow (VFI) is positive.
* **True Drop (Red):** Price is below EMA50 AND Money Flow (VFI) is negative.
* **Conflict (Gray Background):** When Price and Money Flow disagree (e.g., Price rising on negative volume), the background turns Gray. **Trading is disabled** in these zones to avoid bull/bear traps.
**2. Breathing Stop-Loss Mechanism (Volatility Adjusted)**
The Stop Loss isn't static. It "breathes" based on market heat (Volume/RSI):
* **High Heat (High Volatility):** The SL loosens its grip, moving towards the bottom of the Fibonacci zone to allow price fluctuation without premature exits.
* **Low Heat (Low Volatility):** The SL tightens aggressively towards the price to lock in profits during slow momentum.
**3. The Ratchet Lock (Slippage Prevention)**
To ensure maximum profit retention, the "Breathing" mechanism is governed by a **Ratchet Logic**:
* **For Longs:** The Stop Loss can ONLY move UP. If the "Breathing" calculation suggests lowering the stop (due to increased volatility), the Ratchet blocks it, keeping the SL at the highest historical level.
* **For Shorts:** The Stop Loss can ONLY move DOWN.
**4. Fibonacci Exit Zones**
Exits are calculated based on a 60-day dynamic High/Low lookback, creating "Zones" (0-23.6%, 23.6-38.2%, etc.) that the price must conquer. The SL trails these zones mechanically.
**Visual Guide**
* **Lime/Red Background:** Active Trade Zone (Confirmed Trend).
* **Gray Background:** Conflict Zone (Stay Out / Hold).
* **Purple 'X':** The exact price level where the Stop Loss was hit (Fixed marker).
* **Stepline:** The active Stop Loss level (Visible only during open trades).
**Disclaimer**
This script is for educational and research purposes only. Always manage your risk.
12M Return Strategy This strategy is based on the original Dual Momentum concept presented by Gary Antonacci in his book “Dual Momentum Investing.”
It implements the absolute momentum portion of the framework using a 12-month rate of change, combined with a moving-average filter for trend confirmation.
The script automatically adapts the lookback period depending on chart timeframe, ensuring the return calculation always represents approximately one year, whether you are on daily, weekly, or monthly charts.
How the Strategy Works
1. 12-Month Return Calculation
The core signal is the 12-month price return, computed as:
(Current Price ÷ Price from ~1 year ago) − 1
This return:
Plots as a histogram
Turns green when positive
Turns red when negative
The lookback adjusts automatically:
1D chart → 252 bars
1W chart → 52 bars
1M chart → 12 bars
Other timeframes → estimated to approximate 1 calendar year
2. Trend Filter (Moving Average of Return)
To smooth volatility and avoid noise, the strategy applies a moving average to the 12M return:
Default length: 12 periods
Plotted as a white line on the indicator panel
This becomes the benchmark used for crossovers.
3. Trade Signals (Long / Short / Cash)
Trades are generated using a simple crossover mechanism:
Bullish Signal (Go Long)
When:
12M Return crosses ABOVE its MA
Action:
Close short (if any)
Enter long
Bearish Signal (Go Short or Go Flat)
When:
12M Return crosses BELOW its MA
Action:
If shorting is enabled → Enter short
If shorting is disabled → Exit position and go to cash
Shorting can be enabled or disabled with a single input switch.
4. Position Sizing
The strategy uses:
Percent of Equity position sizing
You can specify the percentage of your portfolio to allocate (default 100%).
No leverage is required, but the strategy supports it if your account settings allow.
5. Visual Signals
To improve clarity, the strategy marks signals directly on the indicator panel:
Green Up Arrows: return > MA
Red Down Arrows: return < MA
A status label shows the current mode:
LONG
SHORT
CASH
6. Backtest-Ready
This script is built as a full TradingView strategy, not just an indicator.
This means you can:
Run complete backtests
View performance metrics
Compare long-only vs long/short behavior
Adjust inputs to tune the system
It provides a clean, rule-driven interpretation of the classic absolute momentum approach.
Inspired By: Gary Antonacci – Dual Momentum Investing
This script reflects the absolute momentum side of Antonacci’s original research:
Uses 12-month momentum (the most statistically validated lookback)
Applies a trend-following overlay to control downside risk
Recreates the classic signal structure used in academic studies
It is a simplified, transparent version intended for practical use and educational clarity.
Disclaimer
This script is for educational and research purposes only.
Historical performance does not guarantee future results.
Always use proper risk management.
Robrechtian Long-Medium Breakout Trend SystemRobrechtian Long–Medium-Term Breakout Trend System
A professional, rule-based trend-following strategy designed to capture large, sustained price movements using pure price action and breakouts.
This system follows long-established trend-following philosophy: no prediction, no volatility targeting, and no profit targets. Only disciplined entries, position additions, and exits driven entirely by trend structure.
Core Principles
Breakout-driven entries: Initial positions are taken only when price breaks above/below the 80-day Donchian channel, confirming a long–medium-term trend shift.
Short-term confirmation: Breakouts must also exceed the 20-day channel, reducing false positives.
Trend-direction filter: A 50-day moving average slope filter ensures alignment with the broader trend.
Explosive bar filter: Entries avoid excessively large, single-candle expansions (>2.5× ATR(20)) to prevent chasing exhaustion spikes.
Pyramiding into strength: Additional units are added only when price makes fresh 20-day breakouts in the direction of the trend. No scaling out. No adding on dips.
Exit only on trend violation: Positions are closed exclusively when price breaks the opposite 80-day channel. This preserves unlimited upside while enforcing disciplined exits.
Pure trend philosophy: No volatility targeting, no smoothing, no discretionary overrides, no optimization for short-term performance.
Intended Use
This system is designed primarily for diversified futures portfolios, where diversification across dozens of globally liquid markets creates robustness and stability. However, it may also be used on individual assets for educational and analytical purposes.
The system embraces the core trend-following logic:
Small losses, big winners, and unlimited upside when trends persist.
⚠️ WARNINGS / DISCLAIMERS
⚠️ Warning 1 — This strategy is not optimized for single stocks
The Robrechtian Trend System is designed for multi-asset futures portfolios, not single equities.
Performance on individual tickers may vary greatly due to lack of diversification.
⚠️ Warning 2 — Trend following includes substantial drawdowns
Deep drawdowns are a normal and expected feature of all long-term trend-following systems.
The strategy does not attempt to smooth returns or manage volatility.
If you seek steady, low-volatility equity curves, this system is not suitable.
⚠️ Warning 3 — No volatility targeting or risk smoothing
This system intentionally avoids volatility-based position sizing.
Trades may experience larger fluctuations than systems using risk parity or vol targeting.
⚠️ Warning 4 — Not financial advice
This script is for educational and research purposes only.
Past performance does not guarantee future results.
Use at your own risk.
⚠️ Warning 5 — TradingView backtests have known limitations
TradingView does not simulate:
futures contract roll logic
slippage
real bid/ask spreads
liquidity conditions
limit-up/limit-down behavior
Results may vary from live market execution.
Triple EMA + RSI + ATRThis comprehensive trading system combines triple EMA alignment, RSI momentum filtering, and dynamic ATR-based risk management. The strategy enters positions only when fast, medium, and slow EMAs align in proper order (bullish or bearish), confirmed by RSI remaining within defined thresholds (not overbought/oversold) and a volume spike above its moving average. Exits are managed intelligently using a multi-tier approach: a fixed stop-loss based on ATR, a first profit target at a predefined risk-reward ratio, and a trailing stop that activates after reaching a second, higher profit tier. Designed for trend-following with built-in momentum and volume confirmation, it features professional order execution with configurable commission and slippage for realistic backtesting. Visual cues including colored backgrounds and signal shapes enhance chart clarity.
BS 1.1This is a simple price action break out strategy.. MT5 bot alerts enabled..
Lot of Filters like ATR/ADX/Volume/Break even etc are added in toggle..
Test with the filters which suits your style of trading..
Works in 5m TF for Gold and BTC with just 3 ATR - TG and TP- 3 ATR rest all the filters are off..
Profit Factor - 1.362






















