Nour AI Strategy: ZigZag Market Structure Trading Guide 2026
Master the Nour AI algorithmic strategy with ZigZag-based market structure detection, angle-validated patterns, and three-tiered entry system for crypto and forex trading.
Profabighi Capital Research Team
January 29, 2026
Trading Risk Warning
Trading Risk Warning: Trading involves substantial risk of loss and is not suitable for all investors. Past performance does not guarantee future results. You should carefully consider your financial situation and consult with financial advisors before making any investment decisions.
TradingView Scripts
Table of Contents
- What is the Nour AI Strategy?
- Market Structure Detection
- Angle Validation System
- Three-Tiered Entry System
- Stop Loss and Risk Management
- Trading Strategies
- Configuration Guide
- Common Mistakes
- FAQ
What is the Nour AI Strategy?
The Nour AI Strategy is an algorithmic trading system that uses ZigZag-based market structure analysis to identify high-probability reversal opportunities. Unlike traditional pivot strategies, Nour AI requires specific Lower High to Higher Low (LH→HL) sequences with geometric angle confirmation before executing trades.
Core Components
- ZigZag Market Structure Detection: Automated pivot identification using deviation-based reversal recognition
- Pivot Classification System: Real-time labeling of HH, HL, LH, LL patterns
- Angle Validation Engine: Geometric filtering that rejects steep patterns based on degree measurements
- Three-Tiered Entry Framework: Direct breakout, reversal breakout, and reverse-on-loss modes
Key Features
- Automated Pattern Recognition: ZigZag library with configurable parameters
- Geometric Filtering: Angle calculation prevents steep consolidations producing false breakouts
- Flexible Entry Modes: Three execution systems for varying market conditions
- Professional Metrics: Profabighi Capital integration for Sharpe, Sortino, Jensen's Alpha
- Visual Confirmation: HH/HL/LH/LL labels with directional background highlighting
Why Use Nour AI Strategy?
- Eliminates Premature Entries: Requires specific LH→HL sequence, not just any consolidation
- Filters Noise: Angle validation rejects patterns with historically poor success rates
- Adapts to Conditions: Three-tiered system handles momentum, reversal, and recovery scenarios
- Risk-Optimized: Configurable SL placement with percentage buffer adjustment
- Multi-Asset Application: Works across crypto, forex, futures with parameter optimization
Market Structure Detection
Market structure forms the foundation of institutional trading analysis. The Nour AI Strategy automates this through ZigZag-based pivot detection and classification.
ZigZag Detection Parameters
Price Deviation (%): Minimum price movement to confirm a new pivot
- Lower values (0.1-0.3%): More pivots, suitable for 5m-15m timeframes
- Medium values (0.4-0.7%): Balanced detection for 1H-4H timeframes
- Higher values (0.8-2.0%): Major structure for Daily-Weekly timeframes
Pivot Legs: Bars to lookback for pivot confirmation
- Lower (1-2): Faster confirmation with potential repainting
- Medium (3-5): Balanced confirmation with reduced repainting
- Higher (6-10): Delayed but highly reliable detection
Market Structure Classifications
Higher High (HH)
- Current high > Previous high
- Signals bullish continuation
- Green labels above price
Higher Low (HL)
- Current low > Previous low
- Confirms bullish support
- Green labels below price
Lower High (LH)
- Current high < Previous high
- Signals bearish development
- Red labels above price
Lower Low (LL)
- Current low < Previous low
- Confirms bearish trend
- Red labels below price
Directional Background
- Bullish (Green): After HL formation
- Bearish (Red): After LH formation
- Adjustable transparency: Default 80% to prevent clutter
Angle Validation System
Angle validation is the core innovation, filtering consolidation patterns based on geometric properties correlating with breakout reliability.
The Problem with Steep Patterns
Traditional strategies trigger on any LH→HL sequence without considering time. This fails when:
- Rapid consolidation creates whipsaw structure labels
- News spikes generate sharp moves with quick reversals
- Low volume wicks create false pivots
Research shows patterns with angles exceeding 70-80° have failure rates above 65%.
Angle Calculation
When an HL pivot forms after LH, the strategy calculates:
Price Change = Absolute(LH Price - HL Price)
Bar Change = HL Bar Index - LH Bar Index
Angle (Degrees) = arctan(Price Change / Bar Change) × (180 / π)Example:
- LH at 50,000 on bar 100
- HL at 48,000 on bar 110
- Angle = arctan(2,000 / 10) ≈ 89.7° (rejected as too steep)
Maximum Angle Threshold
Conservative (30-50°): Very shallow consolidations, higher reliability, fewer signals
Moderate (50-70°): Balanced geometry, good reliability, adequate signals
Aggressive (70-90°): Steeper patterns, more signals, lower reliability
Wait Period Validation
After initial calculation:
- Pattern enters pending queue
- Each bar increments wait counter
- Angle rechecked during wait period
- After threshold reached, box creation confirms
Wait Bars setting (default: 4):
- Ensures angle stability
- Prevents premature creation from repainting
- Provides time for market confirmation
Three-Tiered Entry System
The flexibility of Nour AI comes from three distinct entry modes handling different market conditions.
Tier 1: Direct Breakout Entry
Activation: First candle after box creation closes outside box
Philosophy: Capture strong momentum without retest
Process:
- Box validates on bar N
- Bar N+1 closes outside box
- Entry triggers at close
- SL calculated from box dimensions
- TP set using R/R ratio
Advantages: Captures explosive moves, no waiting
Disadvantages: Higher false breakout risk
Best For: Lower timeframes (5m-1H), trending markets, crypto volatility
Tier 2: Reversal Breakout Entry
Activation: After breakout → reversal → re-breakout sequence
Philosophy: Require proof of commitment through retest
Process:
- Initial Breakout: Close outside box (doesn't trigger entry)
- Reversal Detection: Price returns into box (close OR wick)
- Candle Counting: Track bars touching box, invalidate if exceeds max
- Re-Breakout Entry: Close outside box again triggers entry
Advantages: Filters false breakouts, confirms institutional interest
Disadvantages: Misses moves without retest
Best For: All timeframes, range-bound markets, confirmation priority
Max Candles in Box setting:
- Prevents entries after extended consolidation
- 2-3 for conservative, 3-5 for aggressive
Tier 3: Reverse on Loss Entry
Activation: Original trade hits SL before TP
Philosophy: Transform losing trades into recovery opportunities
Process:
- Original trade reaches SL (not TP)
- New trade opens OPPOSITE direction
- Reverse Entry = Original SL
- Reverse SL = Original Entry
- Reverse TP = Entry ± (Entry - SL) × R/R
Example - Long Reverses:
- Original: Long 50,000 | SL 49,000 | TP 52,000
- Reverse: Short 49,000 | SL 50,000 | TP 47,000
Advantages: Captures momentum from failed direction
Disadvantages: Adds to losses if whipsaw continues
Protection: Maximum 3 reverse iterations (default)
Enable Reverse on Loss (default: false):
- Advanced feature requiring backtesting
- Disable if reverse win rate < 40%
Stop Loss and Risk Management
Professional risk management distinguishes profitable strategies from account-destroying systems.
Stop Loss Placement Options
SL at Box Middle (Default)
- Long: SL = (Top + Bottom) / 2 - Buffer
- Short: SL = (Top + Bottom) / 2 + Buffer
- Advantages: Smaller SL, larger positions, better R/R
- Disadvantages: Higher stop-out from wicks
SL at Box Edge
- Long: SL = Bottom - Buffer
- Short: SL = Top + Buffer
- Advantages: Lower stop-out rate, more room
- Disadvantages: Larger SL, worse R/R
SL Buffer Adjustment
Positive Buffer (+10% to +25%): Moves SL away from entry (more room)
Zero Buffer (0%): No adjustment
Negative Buffer (-10% to -25%): Moves SL closer (tighter)
Example - Long Trade:
- Box Top: 51,000 | Bottom: 49,000 | Middle: 50,000
- +10% Buffer: SL moves to 49,900 (100 points further from entry)
Take Profit Calculation
Risk/Reward Ratio (default: 2.0):
Long: TP = Entry + (Entry - SL) × R/R
Short: TP = Entry - (SL - Entry) × R/R
Optimal R/R by Mode:
- Direct Breakout: 2:1 to 3:1
- Reversal Breakout: 1.5:1 to 2:1
- Reverse on Loss: 2:1 minimum
Position Sizing
Strategy uses 100% of equity by default (assumes leverage):
- For spot trading: Manually adjust to 10-25%
- For conservative: Use 1-5% risk per trade
- Pyramiding = 1: Maximum 1 active position
Trading Strategies
The Nour AI Strategy adapts to various styles through parameter optimization.
Strategy 1: Swing Trading (Daily/4H)
Configuration:
- Price Deviation: 0.7-1.0%
- Pivot Legs: 3-5
- Max Angle: 60-70°
- Wait Bars: 4-6
- Direct Breakout: False
- SL at Box Edge: True
- R/R Ratio: 2:1
Best For: Bitcoin/Ethereum majors, Forex majors, large-cap stocks
Strategy 2: Day Trading (1H/15m)
Configuration:
- Price Deviation: 0.3-0.5%
- Pivot Legs: 2-3
- Max Angle: 70-90°
- Wait Bars: 2-3
- Direct Breakout: True
- SL at Box Edge: False
- R/R Ratio: 2:1 to 3:1
Best For: High-volume crypto pairs, Forex during active sessions, Index futures
Strategy 3: Crypto Volatility Trading
Configuration:
- Price Deviation: 0.5-0.8%
- Pivot Legs: 2-4
- Max Angle: 75-85°
- Wait Bars: 3-4
- Direct Breakout: True
- Reverse on Loss: True (Max 2)
- SL Buffer: +15% to +20%
- R/R Ratio: 2:1 to 2.5:1
Best For: Altcoin majors (SOL, BNB, XRP), mid-cap coins with volume
Configuration Guide
Parameter Optimization by Timeframe
| Timeframe | Deviation | Pivot Legs | Max Angle | Wait Bars |
|---|---|---|---|---|
| 5m-15m | 0.2-0.4% | 2-3 | 75-90° | 2-3 |
| 1H-4H | 0.4-0.7% | 3-4 | 60-75° | 3-5 |
| Daily | 0.7-1.2% | 4-5 | 50-65° | 4-6 |
| Weekly | 1.5-3.0% | 5-7 | 40-55° | 5-8 |
Entry Mode Selection
Test Period: 12 months minimum
Metrics to Compare: Win Rate, Avg R/R, Max Drawdown, Sharpe Ratio
Decision Matrix:
- If Win Rate > 55% with Reversal → Disable Direct Breakout
- If Direct Breakout Sharpe > Reversal Sharpe → Enable Direct
- If Reverse-on-Loss Win Rate < 40% → Disable feature
Backtesting Best Practices
Data Requirements:
- Minimum: 6 months historical data
- Recommended: 12-24 months
- Include multiple market conditions
Key Metrics from Profabighi Capital:
- Sharpe Ratio > 1.5: Excellent risk-adjusted returns
- Sortino Ratio > 2.0: Strong downside protection
- Jensen's Alpha > 0: Outperformance vs benchmark
- Win Rate: 45-60% target
- Maximum Drawdown: < 25%
Common Mistakes
Mistake 1: Ignoring Angle Validation
Error: Setting Max Angle too high (>85°) or disabling validation
Impact: Steep patterns have 65%+ failure rates
Fix: Set Max Angle between 60-75° for most markets
Mistake 2: Mismatching Timeframes
Error: Using 5-minute with 1.5% deviation and 5 pivot legs
Impact: Almost no pivots detected, massive delays
Fix: Use parameter table - lower timeframes need lower deviation (0.2-0.4%)
Mistake 3: Enabling All Entry Modes
Error: Direct Breakout + Reverse on Loss without testing
Impact: Whipsaw cascade through correlated losses
Fix: Test each mode independently, combine only after validation
Mistake 4: Neglecting SL Buffer in Crypto
Error: Using 0% buffer on volatile altcoins
Impact: 2-20% wicks stop out positions before reversal
Fix: Crypto pairs need +15% to +25% buffer
Mistake 5: Ignoring Max Candles in Box
Error: Setting too high (8-10) or too low (1-2)
Impact: Late entries or premature invalidations
Fix: Trending markets 2-3, ranging markets 3-5
Mistake 6: Over-Optimization
Error: Testing 50+ combinations, selecting best historical
Impact: Curve fitting - great backtest, terrible live results
Fix: Test sensible ranges only, verify on out-of-sample data
Frequently Asked Questions
What is the Nour AI Strategy?
The Nour AI Strategy is an algorithmic system using ZigZag-based market structure analysis to identify reversals through angle-validated pattern recognition. It automates HH/HL/LH/LL classification, creating trades when specific LH→HL sequences form with geometric confirmation.
How does angle validation work?
Angle validation calculates the angle between LH and HL pivots using arctangent. Steep patterns (>70-80°) historically produce false breakouts 65%+ of the time. By rejecting patterns exceeding the maximum threshold, win rate improves by 10-15%.
What's the difference between the three entry modes?
Direct Breakout: Immediate entry on first candle closing outside box (momentum)
Reversal Breakout: Requires breakout → reversal → re-breakout (confirmation)
Reverse on Loss: Opens opposite direction when SL hits (recovery)
Should I enable reverse-on-loss?
Only after backtesting shows reverse trades have 40%+ win rates and Sharpe > 1.0. Conservative traders should keep disabled. If enabling, set Max Reverse Count to 2-3.
What stop loss placement is better?
Box Edge: Larger stops, lower stop-out rate - best for volatile crypto
Box Middle: Smaller stops, higher stop-out rate - best for liquid forex/BTC
Test both on your market. Higher win rate with middle suggests clean structure.
What's the optimal risk/reward ratio?
Depends on entry mode:
- Direct Breakout: 2:1 to 3:1
- Reversal Breakout: 1.5:1 to 2:1
- Reverse on Loss: 2:1 minimum
Test from 1.5:1 to 3:1, choose ratio with maximum expectancy.
Can this strategy work for cryptocurrency?
Yes, particularly effective due to clear structure and volatility. Adjustments:
- Max Angle: 75-85° (crypto forms steeper patterns)
- SL Buffer: +15% to +25% (account for wicks)
- Direct Breakout: True (capture momentum)
- R/R: 2:1 to 2.5:1
What are optimal ZigZag settings?
Depends on timeframe (see parameter table in Configuration section). General guidelines:
- Lower timeframes: 0.2-0.4% deviation, 2-3 pivot legs
- Higher timeframes: 0.7-1.2% deviation, 4-5 pivot legs
Test settings to ensure 20-40 pivots per 100 bars.
How do I optimize parameters?
- Select baseline from timeframe table
- Run 12-month backtest
- Test variations one at a time (±10° angle, ±1 candles, ±0.25 R/R)
- Compare Sharpe ratios
- Verify with 3-month forward test
Avoid testing all combinations (curve fitting risk).
What Profabighi Capital metrics matter most?
Critical Metrics:
- Sharpe Ratio > 1.5
- Maximum Drawdown < 25%
- Jensen's Alpha > 0
- Win Rate: 45-60%
Monitor equity curve shape - smooth upward trajectory preferred.
Conclusion
The Nour AI Strategy provides a sophisticated approach to algorithmic market structure trading. By requiring specific LH→HL sequences with angle confirmation, it filters false signals plaguing traditional approaches. The three-tiered entry system adapts across conditions, while professional risk management maintains capital preservation.
Success requires systematic optimization for your market, timeframe, and risk tolerance. Use the backtesting framework and parameter tables to discover optimal settings. Monitor Profabighi Capital metrics continuously, adjusting as conditions evolve.
Start conservatively (reversal breakout only, box edge stops), master the mechanics, then explore advanced features after establishing consistent profitability.
Last Updated: January 2026