RSI Moving Average with Signal LineDefault values:
RSI = white
RSI Prime ( RSI of RSI ) = yellow
EMA 34 = blue
EMA 55 = red
They are listed in order of reactiveness to price changes. Think of them like the Williams Alligator...
White and yellow work the fastest, with WHITE being signal and YELLOW being trigger. Great for LTF
Blue and red work the slowest, with BLUE being frequently testing RED as support/resistance. Great for HTF
Long Entry:
RSIs both > SMAS (signal)
RSI > RSI Prime (confirmation)
Long Exit:
RSI < RSI Prime (signal)
RSIs both < SMAs (confirmation)
Short Entry:
RSIs both < SMAS (signal)
RSI < RSI Prime (confirmation)
Short Exit:
RSI > RSI Prime (signal)
RSIs both > SMAS (confirmation)
Pesquisar nos scripts por "美国夏威夷+prime公司"
Fib and Slope Trend Detector [EWT] + MTF Dashboard🚀 Overview
The Momentum Structure Trend Detector is a sophisticated trend-following tool that combines Price Velocity (Slope) with Market Structure (Fibonacci) to identify high-probability trend reversals and continuations.
Unlike traditional indicators that rely heavily on lagging moving averages, this script analyzes the speed of price action in real-time. It operates on the core principle of market structure: Impulse moves are fast and steep, while corrections are slow and shallow.
🧠 The Logic: Physics Meets Market Structure
This indicator determines the trend direction by calculating the Slope (Velocity) of price swings.
ZigZag Calculation: It first identifies market swings (Highs and Lows) using a standard pivot detection algorithm.
Slope Calculation: It calculates the velocity of every completed leg using the formula: $Slope = \frac{|Price Change|}{|Time Duration|}$.
Trend Definition:
Uptrend : If the previous Up-move was fast (Impulse) and the subsequent Down-move is slower (Correction), the market is primed for an uptrend.
Downtrend : If the previous Down-move was fast (Impulse) and the subsequent Up-move is slower (Correction), the market is primed for a downtrend.
🔥 Key Features
1. Aggressive Real-Time Detection (No Lag)
Most structure indicators wait for a "Higher High" to confirm a trend, which often leads to late entries. This script uses an Aggressive Live Slope calculation:
It compares the current developing slope of the live price action against the slope of the previous completed leg.
Result: As soon as the current move becomes "steeper" (faster) than the previous correction, the trend flips immediately. This allows you to catch the "meat" of the move before a new pivot is even confirmed.
2. Fibonacci Validity Filter
Momentum alone isn't enough; we need structural integrity.
The script calculates the 78.6% Retracement level of the impulse leg.
If a correction moves deeper than this Fibonacci limit (on a closing basis), the trend structure is considered "broken" or "invalid," and the indicator switches to a Neutral state. This filters out choppy/ranging markets.
3. Multi-Timeframe (MTF) Dashboard
A customizable dashboard on the chart allows for fractal analysis. You can view the trend state (UP/DOWN/NEUTRAL) across 9 different timeframes (1m to 1M) simultaneously.
Green Row : Uptrend
Red Row : Downtrend
Gray : Neutral/Indeterminate
4. Smart Visuals
Background Colo r: Changes dynamically (Teal for Bullish, Red for Bearish, Gray for Neutral) to give you an instant read of the market state.
Slope Labels : Displays the calculated numeric slope on the chart, helping you visualize the momentum difference between impulse and corrective waves.
Invalidation Levels : Automatically plots the invalidation line (Stop Loss level) based on the market structure.
🛠️ Settings & Inputs
Strategy Settings
Pivot Deviation Length : Sensitivity of the ZigZag calculation (Default: 5). Lower numbers = more sensitive to small swings.
Max Retracement % : The Fibonacci limit for a valid correction (Default: 78.6%).
Min Bars for Live Calc : To prevent noise, the script waits for this many bars after a pivot before calculating the "Live Slope" (Default: 3).
Dashboard Settings
Show Dashboard : Toggle the table on/off.
Timeframe Toggles : Enable/Disable specific timeframes (1m, 5m, 15m, 30m, 1H, 4H, 1D, 1W, 1M) to suit your trading style.
🎯 How to Use
Wait for Background Change : When the background turns Teal, it indicates that a corrective pullback has ended and a new impulse with high velocity has begun.
Check Invalidation : Look at the plotted Stop Loss Level. If price closes below this line, the trade idea is invalid.
Confirm with Dashboard : Use the table to ensure the higher timeframes (e.g., 1H, 4H) align with your current chart's direction for higher probability setups.
Disclaimer : This tool is designed for trend analysis and educational purposes. Past performance (momentum) is not indicative of future results. Always manage your risk.
Langlands-Operadic Möbius Vortex (LOMV)Langlands-Operadic Möbius Vortex (LOMV)
Where Pure Mathematics Meets Market Reality
A Revolutionary Synthesis of Number Theory, Category Theory, and Market Dynamics
🎓 THEORETICAL FOUNDATION
The Langlands-Operadic Möbius Vortex represents a groundbreaking fusion of three profound mathematical frameworks that have never before been combined for market analysis:
The Langlands Program: Harmonic Analysis in Markets
Developed by Robert Langlands (Fields Medal recipient), the Langlands Program creates bridges between number theory, algebraic geometry, and harmonic analysis. In our indicator:
L-Function Implementation:
- Utilizes the Möbius function μ(n) for weighted price analysis
- Applies Riemann zeta function convergence principles
- Calculates quantum harmonic resonance between -2 and +2
- Measures deep mathematical patterns invisible to traditional analysis
The L-Function core calculation employs:
L_sum = Σ(return_val × μ(n) × n^(-s))
Where s is the critical strip parameter (0.5-2.5), controlling mathematical precision and signal smoothness.
Operadic Composition Theory: Multi-Strategy Democracy
Category theory and operads provide the mathematical framework for composing multiple trading strategies into a unified signal. This isn't simple averaging - it's mathematical composition using:
Strategy Composition Arity (2-5 strategies):
- Momentum analysis via RSI transformation
- Mean reversion through Bollinger Band mathematics
- Order Flow Polarity Index (revolutionary T3-smoothed volume analysis)
- Trend detection using Directional Movement
- Higher timeframe momentum confirmation
Agreement Threshold System: Democratic voting where strategies must reach consensus before signal generation. This prevents false signals during market uncertainty.
Möbius Function: Number Theory in Action
The Möbius function μ(n) forms the mathematical backbone:
- μ(n) = 1 if n is a square-free positive integer with even number of prime factors
- μ(n) = -1 if n is a square-free positive integer with odd number of prime factors
- μ(n) = 0 if n has a squared prime factor
This creates oscillating weights that reveal hidden market periodicities and harmonic structures.
🔧 COMPREHENSIVE INPUT SYSTEM
Langlands Program Parameters
Modular Level N (5-50, default 30):
Primary lookback for quantum harmonic analysis. Optimized by timeframe:
- Scalping (1-5min): 15-25
- Day Trading (15min-1H): 25-35
- Swing Trading (4H-1D): 35-50
- Asset-specific: Crypto 15-25, Stocks 30-40, Forex 35-45
L-Function Critical Strip (0.5-2.5, default 1.5):
Controls Riemann zeta convergence precision:
- Higher values: More stable, smoother signals
- Lower values: More reactive, catches quick moves
- High frequency: 0.8-1.2, Medium: 1.3-1.7, Low: 1.8-2.3
Frobenius Trace Period (5-50, default 21):
Galois representation lookback for price-volume correlation:
- Measures harmonic relationships in market flows
- Scalping: 8-15, Day Trading: 18-25, Swing: 25-40
HTF Multi-Scale Analysis:
Higher timeframe context prevents trading against major trends:
- Provides market bias and filters signals
- Improves win rates by 15-25% through trend alignment
Operadic Composition Parameters
Strategy Composition Arity (2-5, default 4):
Number of algorithms composed for final signal:
- Conservative: 4-5 strategies (higher confidence)
- Moderate: 3-4 strategies (balanced approach)
- Aggressive: 2-3 strategies (more frequent signals)
Category Agreement Threshold (2-5, default 3):
Democratic voting minimum for signal generation:
- Higher agreement: Fewer but higher quality signals
- Lower agreement: More signals, potential false positives
Swiss-Cheese Mixing (0.1-0.5, default 0.382):
Golden ratio φ⁻¹ based blending of trend factors:
- 0.382 is φ⁻¹, optimal for natural market fractals
- Higher values: Stronger trend following
- Lower values: More contrarian signals
OFPI Configuration:
- OFPI Length (5-30, default 14): Order Flow calculation period
- T3 Smoothing (3-10, default 5): Advanced exponential smoothing
- T3 Volume Factor (0.5-1.0, default 0.7): Smoothing aggressiveness control
Unified Scoring System
Component Weights (sum ≈ 1.0):
- L-Function Weight (0.1-0.5, default 0.3): Mathematical harmony emphasis
- Galois Rank Weight (0.1-0.5, default 0.2): Market structure complexity
- Operadic Weight (0.1-0.5, default 0.3): Multi-strategy consensus
- Correspondence Weight (0.1-0.5, default 0.2): Theory-practice alignment
Signal Threshold (0.5-10.0, default 5.0):
Quality filter producing:
- 8.0+: EXCEPTIONAL signals only
- 6.0-7.9: STRONG signals
- 4.0-5.9: MODERATE signals
- 2.0-3.9: WEAK signals
🎨 ADVANCED VISUAL SYSTEM
Multi-Dimensional Quantum Aura Bands
Five-layer resonance field showing market energy:
- Colors: Theme-matched gradients (Quantum purple, Holographic cyan, etc.)
- Expansion: Dynamic based on score intensity and volatility
- Function: Multi-timeframe support/resistance zones
Morphism Flow Portals
Category theory visualization showing market topology:
- Green/Cyan Portals: Bullish mathematical flow
- Red/Orange Portals: Bearish mathematical flow
- Size/Intensity: Proportional to signal strength
- Recursion Depth (1-8): Nested patterns for flow evolution
Fractal Grid System
Dynamic support/resistance with projected L-Scores:
- Multiple Timeframes: 10, 20, 30, 40, 50-period highs/lows
- Smart Spacing: Prevents level overlap using ATR-based minimum distance
- Projections: Estimated signal scores when price reaches levels
- Usage: Precise entry/exit timing with mathematical confirmation
Wick Pressure Analysis
Rejection level prediction using candle mathematics:
- Upper Wicks: Selling pressure zones (purple/red lines)
- Lower Wicks: Buying pressure zones (purple/green lines)
- Glow Intensity (1-8): Visual emphasis and line reach
- Application: Confluence with fractal grid creates high-probability zones
Regime Intensity Heatmap
Background coloring showing market energy:
- Black/Dark: Low activity, range-bound markets
- Purple Glow: Building momentum and trend development
- Bright Purple: High activity, strong directional moves
- Calculation: Combines trend, momentum, volatility, and score intensity
Six Professional Themes
- Quantum: Purple/violet for general trading and mathematical focus
- Holographic: Cyan/magenta optimized for cryptocurrency markets
- Crystalline: Blue/turquoise for conservative, stability-focused trading
- Plasma: Gold/magenta for high-energy volatility trading
- Cosmic Neon: Bright neon colors for maximum visibility and aggressive trading
📊 INSTITUTIONAL-GRADE DASHBOARD
Unified AI Score Section
- Total Score (-10 to +10): Primary decision metric
- >5: Strong bullish signals
- <-5: Strong bearish signals
- Quality ratings: EXCEPTIONAL > STRONG > MODERATE > WEAK
- Component Analysis: Individual L-Function, Galois, Operadic, and Correspondence contributions
Order Flow Analysis
Revolutionary OFPI integration:
- OFPI Value (-100% to +100%): Real buying vs selling pressure
- Visual Gauge: Horizontal bar chart showing flow intensity
- Momentum Status: SHIFTING, ACCELERATING, STRONG, MODERATE, or WEAK
- Trading Application: Flow shifts often precede major moves
Signal Performance Tracking
- Win Rate Monitoring: Real-time success percentage with emoji indicators
- Signal Count: Total signals generated for frequency analysis
- Current Position: LONG, SHORT, or NONE with P&L tracking
- Volatility Regime: HIGH, MEDIUM, or LOW classification
Market Structure Analysis
- Möbius Field Strength: Mathematical field oscillation intensity
- CHAOTIC: High complexity, use wider stops
- STRONG: Active field, normal position sizing
- MODERATE: Balanced conditions
- WEAK: Low activity, consider smaller positions
- HTF Trend: Higher timeframe bias (BULL/BEAR/NEUTRAL)
- Strategy Agreement: Multi-algorithm consensus level
Position Management
When in trades, displays:
- Entry Price: Original signal price
- Current P&L: Real-time percentage with risk level assessment
- Duration: Bars in trade for timing analysis
- Risk Level: HIGH/MEDIUM/LOW based on current exposure
🚀 SIGNAL GENERATION LOGIC
Balanced Long/Short Architecture
The indicator generates signals through multiple convergent pathways:
Long Entry Conditions:
- Score threshold breach with algorithmic agreement
- Strong bullish order flow (OFPI > 0.15) with positive composite signal
- Bullish pattern recognition with mathematical confirmation
- HTF trend alignment with momentum shifting
- Extreme bullish OFPI (>0.3) with any positive score
Short Entry Conditions:
- Score threshold breach with bearish agreement
- Strong bearish order flow (OFPI < -0.15) with negative composite signal
- Bearish pattern recognition with mathematical confirmation
- HTF trend alignment with momentum shifting
- Extreme bearish OFPI (<-0.3) with any negative score
Exit Logic:
- Score deterioration below continuation threshold
- Signal quality degradation
- Opposing order flow acceleration
- 10-bar minimum between signals prevents overtrading
⚙️ OPTIMIZATION GUIDELINES
Asset-Specific Settings
Cryptocurrency Trading:
- Modular Level: 15-25 (capture volatility)
- L-Function Precision: 0.8-1.3 (reactive to price swings)
- OFPI Length: 10-20 (fast correlation shifts)
- Cascade Levels: 5-7, Theme: Holographic
Stock Index Trading:
- Modular Level: 25-35 (balanced trending)
- L-Function Precision: 1.5-1.8 (stable patterns)
- OFPI Length: 14-20 (standard correlation)
- Cascade Levels: 4-5, Theme: Quantum
Forex Trading:
- Modular Level: 35-45 (smooth trends)
- L-Function Precision: 1.6-2.1 (high smoothing)
- OFPI Length: 18-25 (disable volume amplification)
- Cascade Levels: 3-4, Theme: Crystalline
Timeframe Optimization
Scalping (1-5 minute charts):
- Reduce all lookback parameters by 30-40%
- Increase L-Function precision for noise reduction
- Enable all visual elements for maximum information
- Use Small dashboard to save screen space
Day Trading (15 minute - 1 hour):
- Use default parameters as starting point
- Adjust based on market volatility
- Normal dashboard provides optimal information density
- Focus on OFPI momentum shifts for entries
Swing Trading (4 hour - Daily):
- Increase lookback parameters by 30-50%
- Higher L-Function precision for stability
- Large dashboard for comprehensive analysis
- Emphasize HTF trend alignment
🏆 ADVANCED TRADING STRATEGIES
The Mathematical Confluence Method
1. Wait for Fractal Grid level approach
2. Confirm with projected L-Score > threshold
3. Verify OFPI alignment with direction
4. Enter on portal signal with quality ≥ STRONG
5. Exit on score deterioration or opposing flow
The Regime Trading System
1. Monitor Aether Flow background intensity
2. Trade aggressively during bright purple periods
3. Reduce position size during dark periods
4. Use Möbius Field strength for stop placement
5. Align with HTF trend for maximum probability
The OFPI Momentum Strategy
1. Watch for momentum shifting detection
2. Confirm with accelerating flow in direction
3. Enter on immediate portal signal
4. Scale out at Fibonacci levels
5. Exit on flow deceleration or reversal
⚠️ RISK MANAGEMENT INTEGRATION
Mathematical Position Sizing
- Use Galois Rank for volatility-adjusted sizing
- Möbius Field strength determines stop width
- Fractal Dimension guides maximum exposure
- OFPI momentum affects entry timing
Signal Quality Filtering
- Trade only STRONG or EXCEPTIONAL quality signals
- Increase position size with higher agreement levels
- Reduce risk during CHAOTIC Möbius field periods
- Respect HTF trend alignment for directional bias
🔬 DEVELOPMENT JOURNEY
Creating the LOMV was an extraordinary mathematical undertaking that pushed the boundaries of what's possible in technical analysis. This indicator almost didn't happen. The theoretical complexity nearly proved insurmountable.
The Mathematical Challenge
Implementing the Langlands Program required deep research into:
- Number theory and the Möbius function
- Riemann zeta function convergence properties
- L-function analytical continuation
- Galois representations in finite fields
The mathematical literature spans decades of pure mathematics research, requiring translation from abstract theory to practical market application.
The Computational Complexity
Operadic composition theory demanded:
- Category theory implementation in Pine Script
- Multi-dimensional array management for strategy composition
- Real-time democratic voting algorithms
- Performance optimization for complex calculations
The Integration Breakthrough
Bringing together three disparate mathematical frameworks required:
- Novel approaches to signal weighting and combination
- Revolutionary Order Flow Polarity Index development
- Advanced T3 smoothing implementation
- Balanced signal generation preventing directional bias
Months of intensive research culminated in breakthrough moments when the mathematics finally aligned with market reality. The result is an indicator that reveals market structure invisible to conventional analysis while maintaining practical trading utility.
🎯 PRACTICAL IMPLEMENTATION
Getting Started
1. Apply indicator with default settings
2. Select appropriate theme for your markets
3. Observe dashboard metrics during different market conditions
4. Practice signal identification without trading
5. Gradually adjust parameters based on observations
Signal Confirmation Process
- Never trade on score alone - verify quality rating
- Confirm OFPI alignment with intended direction
- Check fractal grid level proximity for timing
- Ensure Möbius field strength supports position size
- Validate against HTF trend for bias confirmation
Performance Monitoring
- Track win rate in dashboard for strategy assessment
- Monitor component contributions for optimization
- Adjust threshold based on desired signal frequency
- Document performance across different market regimes
🌟 UNIQUE INNOVATIONS
1. First Integration of Langlands Program mathematics with practical trading
2. Revolutionary OFPI with T3 smoothing and momentum detection
3. Operadic Composition using category theory for signal democracy
4. Dynamic Fractal Grid with projected L-Score calculations
5. Multi-Dimensional Visualization through morphism flow portals
6. Regime-Adaptive Background showing market energy intensity
7. Balanced Signal Generation preventing directional bias
8. Professional Dashboard with institutional-grade metrics
📚 EDUCATIONAL VALUE
The LOMV serves as both a practical trading tool and an educational gateway to advanced mathematics. Traders gain exposure to:
- Pure mathematics applications in markets
- Category theory and operadic composition
- Number theory through Möbius function implementation
- Harmonic analysis via L-function calculations
- Advanced signal processing through T3 smoothing
⚖️ RESPONSIBLE USAGE
This indicator represents advanced mathematical research applied to market analysis. While the underlying mathematics are rigorously implemented, markets remain inherently unpredictable.
Key Principles:
- Use as part of comprehensive trading strategy
- Implement proper risk management at all times
- Backtest thoroughly before live implementation
- Understand that past performance does not guarantee future results
- Never risk more than you can afford to lose
The mathematics reveal deep market structure, but successful trading requires discipline, patience, and sound risk management beyond any indicator.
🔮 CONCLUSION
The Langlands-Operadic Möbius Vortex represents a quantum leap forward in technical analysis, bringing PhD-level pure mathematics to practical trading while maintaining visual elegance and usability.
From the harmonic analysis of the Langlands Program to the democratic composition of operadic theory, from the number-theoretic precision of the Möbius function to the revolutionary Order Flow Polarity Index, every component works in mathematical harmony to reveal the hidden order within market chaos.
This is more than an indicator - it's a mathematical lens that transforms how you see and understand market structure.
Trade with mathematical precision. Trade with the LOMV.
*"Mathematics is the language with which God has written the universe." - Galileo Galilei*
*In markets, as in nature, profound mathematical beauty underlies apparent chaos. The LOMV reveals this hidden order.*
— Dskyz, Trade with insight. Trade with anticipation.
Pullback Entry Zone FinderPullback Entry Zone Finder
Overview:
This indicator is designed to help traders identify potential buying opportunities during short-term pullbacks, particularly when faster-moving averages show signs of converging back towards slower ones. It visually flags potential zones where price might find support and resume its upward movement, based on moving average dynamics and price proximity.
How It Works:
The indicator utilizes four customizable moving averages (Trigger, Short-term, Intermediate, and Long-term) and Average True Range (ATR) to pinpoint specific conditions:
Pullback Detection: It identifies when the fast 'Trigger MA' is below the 'Short-term MA', indicating a potential short-term pullback or consolidation phase.
MA Convergence: Crucially, it looks for signs that the pullback might be weakening by detecting when the gap between the Short-term MA and the Trigger MA is narrowing (maConverging). This suggests the faster average is starting to catch up, potentially preceding a move back up.
Base Buy Zone (Orange Diamond): This signal appears when both the Pullback and Convergence conditions are met simultaneously. It indicates the general area where conditions are becoming favourable for a potential entry.
Refined Entry Zones:
Prime Entry Zone (Green Diamond): This appears within a Base Buy Zone if the bar's low comes within a specified percentage (Max Distance %) of the Short-term MA. It suggests price has pulled back close to the dynamic support of the Short MA.
ATR Entry Zone (Purple Diamond): This appears within a Base Buy Zone if the bar's low comes within the specified percentage (Max Distance %) of an ATR-based target level. This target level (Buy ATR Target Level, plotted as a purple line when active) is calculated by adding a multiple (ATR Multiplier %) of the ATR to the Short-term MA, providing a volatility-adjusted potential entry area.
Visual Elements:
Moving Averages: Four lines representing the Trigger, Short-term, Intermediate, and Long-term MAs (colors and opacity are customizable). Use the Intermediate and Long-term MAs to gauge the broader market trend.
Orange Diamond (Below Bar): Indicates a 'Base Buy Zone' where a pullback and MA convergence are detected.
Green Diamond (Below Bar): Indicates a 'Prime Entry Zone' where price is close to the Short-term MA during a Base Buy Zone.
Purple Diamond (Below Bar): Indicates an 'ATR Entry Zone' where price is close to the ATR-based target level during a Base Buy Zone.
Purple Line: Plots the calculated 'Buy ATR Target Level' only when the Base Buy Zone condition is active.
Input Parameters:
Moving Averages: Customize the Length and Type (EMA, SMA, WMA, VWMA) for all four moving averages.
ATR Settings: Adjust the ATR Length, the ATR Multiplier % (for calculating the target level), and the Max Distance % (for triggering the Prime and ATR Entry Zones).
Visualization: Set the colors for the four Moving Average lines.
How to Use:
Look for the Orange Diamond as the initial signal that pullback/convergence conditions are met.
The Green and Purple Diamonds suggest price has reached potentially more optimal entry levels within that zone, based on proximity to the Short MA or the ATR target, respectively.
Always consider the signals within the context of the broader trend, indicated by the Intermediate and Long-term MAs. This indicator is generally more effective when used to find entries during pullbacks within an established uptrend (e.g., Intermediate MA > Long MA).
Combine these signals with other forms of analysis, such as chart patterns, support/resistance levels, volume analysis, or other indicators for confirmation.
Disclaimer:
You should always use proper risk management techniques and conduct your own analysis before making any trading decisions. This indicator, or any other, will be of no use if you don't have good risk management.
29&71 Goldbach levelsThe indicator automatically plots horizontal lines at the 29 and 71 price levels on your chart. These levels serve as psychological barriers in the market, where price action may react or consolidate, just as prime numbers are fundamental in the theory of numbers.
---
Features:
- 29 Level: Identifies significant areas where market participants may encounter support or resistance, similar to the importance of prime numbers in Goldbach's conjecture.
- 71 Level: Marks another key zone that might indicate possible price breakouts or reversals, offering traders a reference point for decision-making.
- Customizable: You can adjust the colors, line styles, or alerts associated with these levels to fit your trading preferences.
How to Use:
- Use the 29 and 71 levels to spot potential areas of support or resistance on the chart.
- Watch for price reactions at these levels for possible breakout or reversal setups.
- Combine the levels with other technical indicators for added confirmation.
---
This indicator blends the theory of prime numbers with market analysis, offering traders a novel approach to identifying key levels that might influence price movements.
Z-Score Support & Resistance [SS}Hello everyone,
This is the Z-Score Support and Resistance (S/R) indicator.
How it works:
The trouble with most indicators and strategies that rely on distributions is that they are constantly moving targets.
To combat this, what I have done is anchored the assessment of the normal distribution to the period open price and dropped the data from the current day.
This provides us with a static assessment of the current distribution and static target levels.
It then plots out an assessment of what would be neutral (0 Standard Deviations) all the way up to +3 Standard Deviations and all the way down to -3 Standard Deviations.
It can plot out this assessment on any timeframe, from the minutes to the months to the years, simply select which desired timeframe you want in the settings menu (default is 9 which seems to work well for most generic tickers and indicies).
The indicator will also count the number of times a ticker has closed within each designated period. To do this, please make sure that you have the assessment timeframe opened on the chart. So if you want to look at the instances on the daily timeframe, ensure you have the daily timeframe opened. If you want to look on the monthly, ensure you have the monthly opened, etc. (See below):
How to Use:
To use the indicator, its pretty simple.
Simply select the desired timeframe you want to use as S/R and use it!
You can adjust the period lookback from the defaulted 9 period based on:
a) The degree of normality in the dataset (you can use a kurtosis indicator to help you ascertain this); or
b) The back-test results of closes within a desired range.
For the later, you can see an example below:
This is TSLA with a 9 period lookback:
We can see that 50% of closes are happening within 0.5 and -0.5 standard deviations. If we extend this to a 15 period lookback:
Now over 60% of closes are happening in this area.
Why does this matter? Well, because now we know our prime short and long entries (see below):
The green arrows represent prime long setups and the red prime short setups.
This is because we know, 61% of the time the ticker will close between 0.5 and -0.5 standard deviations, so we can trade the ticker back to this area.
Further instructions:
Because it is somewhat of a complex indicator, I have done a tutorial video that I will link below here:
And that is the indicator my friends! Hopefully you enjoy :-).
As always, leave your comments and suggestions / Questions below!
Safe trades!
MACD PRO by LDZ1LANDZZ1 MACD Pro was developed to show the first signs of reversal, direction, and also trend strength.
Unlike normal MACD, this indicator has 3 lines as information. A white line (short EMA), a purple line (sign), and a yellow line (long EMA).
The Purple Line "Signal" is a 17-period Exponential Moving Average.
The White Line "Short EMA" is a 34-period Exponential Moving Average.
The Yellow Line "Long EMA" is a 72-Period Exponential Moving Average.
When the background color turns green it indicates that we are above 0 (positive trend) and above the Signal line (positive trend)
When the background color turns Yellow it indicates that we are above 0 (positive trend) but below the Signal line (Indicating Attention to a possible trend reversal or price correction)
When the background color turns Red it indicates that we are below 0 (negative trend) and below the Signal line (negative trend)
When the background color turns Orange it indicates that we are below 0 (negative trend) and above the signal line (Indicating attention to a possible trend reversal or price correction)
The Yellow line is like a watershed, when the White Line "Short EMA" crosses above or below it, it indicates that a stronger price movement may occur.
Tip:
Only enter Long Positions when the background color turns green and the Short EMA (White line) is above the yellow line and/or the white dotted horizontal line.
Only enter Short Positions when the background color turns red and the Long EMA (Yellow line) is below the white dotted horizontal line.
Note the difference of MACD Pro by LANDZZ1 as the traditional MACD.
----------------------------------------------------------
Description in Portuguese-BR
MACD Pro by LANDZZ1 foi desenvolvido para mostrar os primeiros sinais de reversão, direção e também força da tendência.
Diferente do MACD normal, este indicador tem como informação 3 linhas. Uma linha branca (short EMA), uma linha roxa(signal) e uma linha amarela (long EMA).
A Linha Roxa "Signal" é uma Média Móvel Exponencial de 17 períodos.
A Linha branca "Short EMA" é uma Média Móvel Exponencial de 34 períodos.
A Linha Amarela "Long EMA" é uma Média Móvel Exponencial de 72 Períodos.
Quando a cor de fundo ficar verde indica que estamos acima de 0 (tendência positiva) e acima da linha de Sinal (tendência positiva)
Quando a cor de fundo ficar Amarelo indica que estamos acima de 0 (tendência positiva) porém abaixo da linha de Sinal (Indicando Atenção a uma possível reversão de tendência ou correção de preço)
Quando a cor de fundo ficar vermelho indica que estamos abaixo de 0 (tendência negativa) e abaixo da linha de Sinal (tendência negativa)
Quando a cor de fundo ficar laranja indica que estamos abaixo de 0 (tendência negativa) e acima da linha de sinal (Indicando atenção a uma possível reversão de tendência ou correção do preço)
A linha amarela é como um divisor de águas, quando a linha branca (Short EMA) cruza para cima ou para baixo dela, indica que um movimento mais forte forte de preço poderá ocorrer.
Dica:
Apenas entre em Long Positions quando a cor de fundo ficar verde e se a Short EMA (linha Branca) estiver acima da linha amarela e/ou da linha horizontal pontilhada branca.
Apenas entre em Short Positions quando a cor de fundo ficar Vermelha e se a Long EMA (linha Amarela) estiver abaixo da linha horizontal pontilhada branca.
Repare a diferença do MACD Pro by LANDZZ1 como o MACD tradicional.
Climatic Volume indicator Buy/Sell ENGLISH
this indicator is contrarian and it's use in my strategy
Strategy: when price falls the graph show as two moments with panic during the downtrend: two candlesticks of panic
Both candlesticks are associating with two Volume climatic bars (when volumen double the average volume of last 10 bars). In that moment the institutions buy (remember, the institutions only buy during panic and sell in the euphoria moment because they generate a new trend in the market)
Buy Signal: Bear candlestick with climatic volume in downtrend (first institutions buying) + a few candlesticks more with low volume (lower than average volume of last 10 bars) + second candlestick climatic volume in downtrend (last institutions buying before the new trend)
Moving Stop Loss to break even or first sell of us: bull candlestick with climatic volume associated in uptrend (first take profit of institutions)
Sell Signal: Second bull candlestick with climatic volume associated in uptrend (in this moment the institutions take profit in the timeframe where we are operating and wait for a future new swing)
ESPAÑOL
El indicador es un indicador contratendencial
Estrategia: Cuando el precio cae el grafico nos muestra dos momentos de pánico durante la tendencia bajista: dos velas japonesas de panic
ambas velas japonesas están asociadas a dos barras de volumen climático (un volumen que supera en un 100% el volumen promedio de las ultimas 10 barras). En ese momento las instituciones compran (recuerden que las instituciones compran durante el pánico y venden durante la euforia porque ellos generan una nueva tendencia en el mercado)
Señal de compra: vela japonesa bajista con un volumen climático asociado en una tendencia bajista (primera compra de instituciones) + algunas velas japonesas con bajo volumen + una segunda vela japonesa con volumen climático en una tendencia bajista (la ultima compra de institucionales antes de la nueva tendencia)
Mover stop loss a precio de entrada o hacer nuestra primera venta: vela japonesa alcista con volumen climático asociado en una tendencia alcista (primera toma de ganancias de institucionales)
Señal de venta: Segunda vela japonesa con volumen climático asociado en una alcista (en ese momento las instituciones toman ganancias en el timeframe donde estamos operando y esperan un nuevo swing futuro)
Bull Call Spread Entry StrategyThis strategy script uses the "Spread Entry Strength" overlay indicator script I designed to show entry timing optimized for an Option Bull
Call Spread.
As for this strategy...
The defaults for the strategy itself are as follows:
Period for strategy: 1/1/18 to 12/1/2021. This can be changed to a different period using the settings.
Condition for entry:
Bull Spread Entry Strength >= "Overlay Signal Strength Level"
Limit entry is used, price must be <= close when signaled
Entry occurs by next day or the order is cancelled
Condition for exit (uses a timed exit):
Bars passed since order entry >= 30 (6 weeks..~42 calendar days)
Thursday (day before "option" expiration date... assuming weekly options exist)
All of the user settings from the overlay are pulled into this for customization purposes. Details of the actual Spread Entry Strength overlay are as follows (copied from my shared indicator):
2 background shadings will occur:
The background will shade blue if the ticker is prime for a Bullish Call spread.
The background will shade purple if the the ticker is prime for a Bearish Put spread.
In theory, if the SE Strength is at one of the extremes of the Bear or Bull side, then a spread is prime for entry.
To calculate this, 8 conditions receive a 1 or zero dependent on whether the condition is true (1) or false (0), and then all of those are summed. The primary gist of the strength comes from Nishant's book, or my interpretation thereof, with some additives that limits what I need to review (such as condition 8 below.)
The 8 Bull Conditions are:
1) Bollinger Bands are outside of the Keltner Channels
2) ADX is trending up
3) RSI is trending up
4) -DI is trending down
5) RSI is under 30
6) Price is below the lower Keltner Channel
7) Price is between the lower Bollinger Band and the Bollinger basis.
8) Price at one point within the last 5 bars was below the lower Bollinger Band
The 8 Bear Conditions are the inverse conditions (except the first):
1) Bollinger Bands are outside of the Keltner Channels
2) ADX is trending down
3) RSI is trending down
4) +DI is trending up
5) RSI is over 70
6) Price is above the upper Keltner Channel
7) Price is between the upper Bollinger Band and the Bollinger basis.
8) Price at one point within the last 5 bars was above the upper Bollinger Band
There is a "market noise" filter that will filter out shading when another market move is considered, i.e. if you don't want to see the potential trade when QQQ moves more than 1% then do the following in the settings:
Check "Market Filter"
Enter QQQ in the "Market Ticker To Use"
Enter 1 in the "Market Too Hot Level"
Press Ok
Obviously, the same holds true for the "Market Too Cool Filter."
Second release notes:
Overlay Signal Strength Level - You can set your own "level" for the overlay in the settings, instead of having to change the script code itself. I have the default set to 6. A lower number shows more overlays, a higher number shows fewer (i.e. more conditions have been met.).
Provide Narrative (Troubleshooting) - Narrative label created with several outputs that will show after the last bar. This narrative needs to be turned on in the settings, as the default is "off" ... unchecked.
Remove Strength Indicator When Squeezed - when checked no overlays will be produced regardless of "scoring." Default is off.
Show Squeezes (Will Override Indicator When Concurrent) - overlays an orange background when the ticker is in a squeeze. I am still working on the accuracy here, but it's usable. This will override the strength indicator as well. This needs to be turned on, if you want it.
Short SMA Period - period used to calculate the short SMA, used in the narrative only, at this point in time.
Medium SMA Period - period used to calculate the medium SMA, used in the narrative only, at this point in time.
Long SMA Period - period used to calculate the medium SMA, used in the narrative only, at this point in time.
Outside of the settings... a few calculation adjustments here and there have occurred and some color shading adjustments to allow for the adjustable level setting.
Spread Entry StrengthThis is an overlay indicator showing a strong potential for entry into an option spread trade.
2 background shadings will occur:
The background will shade blue if the ticker is prime for a Bullish Call spread.
The background will shade purple if the the ticker is prime for a Bearish Put spread.
In theory, if the SE Strength is at one of the extremes of the Bear or Bull side, then a spread is prime for entry.
To calculate this, 8 conditions receive a 1 or zero dependent on whether the condition is true (1) or false (0), and then all of those are summed. The primary gist of the strength comes from Nishant's book, or my interpretation thereof, with some additives that limits what I need to review (such as condition 8 below.)
The 8 Bull Conditions are:
1) Bollinger Bands are outside of the Keltner Channels
2) ADX is trending up
3) RSI is trending up
4) -DI is trending down
5) RSI is under 30
6) Price is below the lower Keltner Channel
7) Price is between the lower Bollinger Band and the Bollinger basis.
8) Price at one point within the last 5 bars was below the lower Bollinger Band
The 8 Bear Conditions are the inverse conditions (except the first):
1) Bollinger Bands are outside of the Keltner Channels
2) ADX is trending down
3) RSI is trending down
4) +DI is trending up
5) RSI is over 70
6) Price is above the upper Keltner Channel
7) Price is between the upper Bollinger Band and the Bollinger basis.
8) Price at one point within the last 5 bars was above the upper Bollinger Band
There is a "market noise" filter that will filter out shading when another market move is considered, i.e. if you don't want to see the potential trade when QQQ moves more than 1% then do the following in the settings:
Check "Market Filter"
Enter QQQ in the "Market Ticker To Use"
Enter 1 in the "Market Too Hot Level"
Press Ok
Obviously, the same holds true for the "Market Too Cool Filter."
EMA21 Speed & AccelThe script calculates an plots first and second derivatives of a EMA of "length" periods, with a default value of 21 periods.
- Blue curve is the first derivative of the EMA, which can be interpreted as the "speed" , "slope", or percentage of gains (or loses) walking over the EMA, measured in % per period. If timeframe is Days, it will show a %/day on the scale @ the right of graphic.
- Fuchsia curve is the second derivative of the EMA, and can be assumed to be the "acceleration" or driving force that could augment or diminish the EMA Speed.
When Speed & Acceleration ar both >=0, EMA is in positive rally, and becoming stepper, so the bacground is colored green.
First and second derivatoves are performed using "basis functions", as are applied in FEM implementation.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
El Script calcula y plotea la primera y segunga derivada de una EMA de "length" períodos, con un valor por defecto de 21.
- La curva azul es la primera derivada de la EMA; que puede ser interpretada conmo su "velocidad", "pendiente" o % de ganancia o pérdida que se tendría sobre la EMA. Cuando la unidad de tiempo del gráfico es Días, permite visualizar en la escala de la derecha el % de ganancia o pérdida por día.
- La curva Fucsia muestra la segunda derivada, o "Aceleración", que se puede interpretar como la fuerza que puede aumentar o dismu¿inuir la pendiente de la EMA.
Cuando la Velocidad y Aceleración son mayores que cero, las ganancias aumentan cada período, y el findo de colorea de verde.
Las derivadas primera y segunda se calculan usando técnicas de funciones de forma, como las aplicadas en el MEF.
Backtest Larry Williams 9.1 ( exemplo) - JBBacktest simples para compra no rompimento do topo do primeiro candle que abre abaixo e fecha acima da ema de 9 periodos e venda no rompimento do fundo do primeiro candle que fecha abaixo da ema de 9
Average True Range (ATR %) Stop Loss CalculatorThis indicator takes the average of a series of ATR to calculate what I would consider an optimum stop loss placement represented in percentage (read below for full overview).
While the data is plotted what is most helpful are the actual numbers presented and for my charts I remove most of the plotting.
This indicator is most helpful on the daily timeframe but can be used for all timeframes such as the 4HR, 1HR or even 15M.
This indicator should not be used alone. It should be used in conjunction with proper price action analysis. It’s also a great indicator if you chart using Value Channels. Ideally you want your stop placement to be below at least one core Value Channel boundary range. In addition to standard support and resistance and some key moving averages the market respects. This also works best when trading with the prevailing BIAS of the instrument (bull or bear).
Cryptos: Generally, that means you’re buying on retracements that fit the end of a structured move. The other option is using this in a clear up trending market where the pull backs are clearly being supported with buying.
FOREX: I built another indicator for FOREX search: ATRPIPS with SL
WTI: Helpful but I have different rules for when I trade WTI. I rely upon VCs and diagnal VCs much more when trading this.
Equities: Helpful but with the increase of volatility as well as uncertainty of Bias of the market-- this should be used as more of a guide than
What is most important is the actual percentage numbers but I've found graphing 1-3 of the actual ATRs is helpful. The rest just uncheck the checkbox in the options.
Indicator Overview:
Value 1 - 3 Period ATR (maroon)
Value 2 - 7 Period ATR (green)
Value 3 - 30 Period ATR (blue)
Value 4 - 90 Period ATR (blue, bold)
Value 5 - 1 Period ATR (green)
Value 6 - 1 Period ATR (red)
Value 6 – Prime Stop Loss Placement (maroon). This is the average of all above ATRs multiplied by 1.5
Value 7 - Move Left (red). Experimental value. This is the difference between (prime stop loss) and 1 day period move. Two ways to use this value. Use as a tighter stop loss placement. The other option is to use as a retrace target for purchase and using the Prime Stop Placement value as you’re stop loss.
All ATRs use the LOW price of the period. After testing both the low and close I’ve settled on the low to capture the most volatility you will typically experience.
Once again, this indicator should be used in conjunction with your proven trade system.
Also, by knowing what the values are within the indicator you could just eye ball what would be the best stop placement depending on the ATR or 1 or 2 ATRs you find most represent the volatility of what you are trading.
I will be expanding on this indicator by bringing in average measured moves as well as volume analysis and most likely with color changes and modifications.
Background:
While using and refining my trade system I've noticed that most moves happen in 3 periods. So we start there. The 7 period is good for a 24 hour market such as crypto (although weekend trading can be a hit or miss) and to some extent FOREX. The longer periods of 30 & 90 are to smooth out the data set. The final value of the 1 period is to bring a little more recency to the calculation.
Why multiply the average by 1.5? I've found in my own trading and system I built to be the best placement (in conjunction with VCs) to ensure you're stop isn't to close and is within the instrument you are trading volatility .
I'm looking at making this more intelligent as well as take into account volume and structured moves.
Ichimoku Clouds - Basic StrategyEstratégia básica com Ichimoku Clouds. Mais para fins de estudos. Foi um dos primeiros Pine Scripts que escrevi, então a há muito o que melhorar no código.
Basic Strategy using Ichimoku Clouds, developed for studying purpose. It was one one my first Pine Scripts codes, so yet there is a lot to improve on it.
Adaptive Genesis Engine [AGE]ADAPTIVE GENESIS ENGINE (AGE)
Pure Signal Evolution Through Genetic Algorithms
Where Darwin Meets Technical Analysis
🧬 WHAT YOU'RE GETTING - THE PURE INDICATOR
This is a technical analysis indicator - it generates signals, visualizes probability, and shows you the evolutionary process in real-time. This is NOT a strategy with automatic execution - it's a sophisticated signal generation system that you control .
What This Indicator Does:
Generates Long/Short entry signals with probability scores (35-88% range)
Evolves a population of up to 12 competing strategies using genetic algorithms
Validates strategies through walk-forward optimization (train/test cycles)
Visualizes signal quality through premium gradient clouds and confidence halos
Displays comprehensive metrics via enhanced dashboard
Provides alerts for entries and exits
Works on any timeframe, any instrument, any broker
What This Indicator Does NOT Do:
Execute trades automatically
Manage positions or calculate position sizes
Place orders on your behalf
Make trading decisions for you
This is pure signal intelligence. AGE tells you when and how confident it is. You decide whether and how much to trade.
🔬 THE SCIENCE: GENETIC ALGORITHMS MEET TECHNICAL ANALYSIS
What Makes This Different - The Evolutionary Foundation
Most indicators are static - they use the same parameters forever, regardless of market conditions. AGE is alive . It maintains a population of competing strategies that evolve, adapt, and improve through natural selection principles:
Birth: New strategies spawn through crossover breeding (combining DNA from fit parents) plus random mutation for exploration
Life: Each strategy trades virtually via shadow portfolios, accumulating wins/losses, tracking drawdown, and building performance history
Selection: Strategies are ranked by comprehensive fitness scoring (win rate, expectancy, drawdown control, signal efficiency)
Death: Weak strategies are culled periodically, with elite performers (top 2 by default) protected from removal
Evolution: The gene pool continuously improves as successful traits propagate and unsuccessful ones die out
This is not curve-fitting. Each new strategy must prove itself on out-of-sample data through walk-forward validation before being trusted for live signals.
🧪 THE DNA: WHAT EVOLVES
Every strategy carries a 10-gene chromosome controlling how it interprets market data:
Signal Sensitivity Genes
Entropy Sensitivity (0.5-2.0): Weight given to market order/disorder calculations. Low values = conservative, require strong directional clarity. High values = aggressive, act on weaker order signals.
Momentum Sensitivity (0.5-2.0): Weight given to RSI/ROC/MACD composite. Controls responsiveness to momentum shifts vs. mean-reversion setups.
Structure Sensitivity (0.5-2.0): Weight given to support/resistance positioning. Determines how much price location within swing range matters.
Probability Adjustment Genes
Probability Boost (-0.10 to +0.10): Inherent bias toward aggressive (+) or conservative (-) entries. Acts as personality trait - some strategies naturally optimistic, others pessimistic.
Trend Strength Requirement (0.3-0.8): Minimum trend conviction needed before signaling. Higher values = only trades strong trends, lower values = acts in weak/sideways markets.
Volume Filter (0.5-1.5): Strictness of volume confirmation. Higher values = requires strong volume, lower values = volume less important.
Risk Management Genes
ATR Multiplier (1.5-4.0): Base volatility scaling for all price levels. Controls whether strategy uses tight or wide stops/targets relative to ATR.
Stop Multiplier (1.0-2.5): Stop loss tightness. Lower values = aggressive profit protection, higher values = more breathing room.
Target Multiplier (1.5-4.0): Profit target ambition. Lower values = quick scalping exits, higher values = swing trading holds.
Adaptation Gene
Regime Adaptation (0.0-1.0): How much strategy adjusts behavior based on detected market regime (trending/volatile/choppy). Higher values = more reactive to regime changes.
The Magic: AGE doesn't just try random combinations. Through tournament selection and fitness-weighted crossover, successful gene combinations spread through the population while unsuccessful ones fade away. Over 50-100 bars, you'll see the population converge toward genes that work for YOUR instrument and timeframe.
📊 THE SIGNAL ENGINE: THREE-LAYER SYNTHESIS
Before any strategy generates a signal, AGE calculates probability through multi-indicator confluence:
Layer 1 - Market Entropy (Information Theory)
Measures whether price movements exhibit directional order or random walk characteristics:
The Math:
Shannon Entropy = -Σ(p × log(p))
Market Order = 1 - (Entropy / 0.693)
What It Means:
High entropy = choppy, random market → low confidence signals
Low entropy = directional market → high confidence signals
Direction determined by up-move vs down-move dominance over lookback period (default: 20 bars)
Signal Output: -1.0 to +1.0 (bearish order to bullish order)
Layer 2 - Momentum Synthesis
Combines three momentum indicators into single composite score:
Components:
RSI (40% weight): Normalized to -1/+1 scale using (RSI-50)/50
Rate of Change (30% weight): Percentage change over lookback (default: 14 bars), clamped to ±1
MACD Histogram (30% weight): Fast(12) - Slow(26), normalized by ATR
Why This Matters: RSI catches mean-reversion opportunities, ROC catches raw momentum, MACD catches momentum divergence. Weighting favors RSI for reliability while keeping other perspectives.
Signal Output: -1.0 to +1.0 (strong bearish to strong bullish)
Layer 3 - Structure Analysis
Evaluates price position within swing range (default: 50-bar lookback):
Position Classification:
Bottom 20% of range = Support Zone → bullish bounce potential
Top 20% of range = Resistance Zone → bearish rejection potential
Middle 60% = Neutral Zone → breakout/breakdown monitoring
Signal Logic:
At support + bullish candle = +0.7 (strong buy setup)
At resistance + bearish candle = -0.7 (strong sell setup)
Breaking above range highs = +0.5 (breakout confirmation)
Breaking below range lows = -0.5 (breakdown confirmation)
Consolidation within range = ±0.3 (weak directional bias)
Signal Output: -1.0 to +1.0 (bearish structure to bullish structure)
Confluence Voting System
Each layer casts a vote (Long/Short/Neutral). The system requires minimum 2-of-3 agreement (configurable 1-3) before generating a signal:
Examples:
Entropy: Bullish, Momentum: Bullish, Structure: Neutral → Signal generated (2 long votes)
Entropy: Bearish, Momentum: Neutral, Structure: Neutral → No signal (only 1 short vote)
All three bullish → Signal generated with +5% probability bonus
This is the key to quality. Single indicators give too many false signals. Triple confirmation dramatically improves accuracy.
📈 PROBABILITY CALCULATION: HOW CONFIDENCE IS MEASURED
Base Probability:
Raw_Prob = 50% + (Average_Signal_Strength × 25%)
Then AGE applies strategic adjustments:
Trend Alignment:
Signal with trend: +4%
Signal against strong trend: -8%
Weak/no trend: no adjustment
Regime Adaptation:
Trending market (efficiency >50%, moderate vol): +3%
Volatile market (vol ratio >1.5x): -5%
Choppy market (low efficiency): -2%
Volume Confirmation:
Volume > 70% of 20-bar SMA: no change
Volume below threshold: -3%
Volatility State (DVS Ratio):
High vol (>1.8x baseline): -4% (reduce confidence in chaos)
Low vol (<0.7x baseline): -2% (markets can whipsaw in compression)
Moderate elevated vol (1.0-1.3x): +2% (trending conditions emerging)
Confluence Bonus:
All 3 indicators agree: +5%
2 of 3 agree: +2%
Strategy Gene Adjustment:
Probability Boost gene: -10% to +10%
Regime Adaptation gene: scales regime adjustments by 0-100%
Final Probability: Clamped between 35% (minimum) and 88% (maximum)
Why These Ranges?
Below 35% = too uncertain, better not to signal
Above 88% = unrealistic, creates overconfidence
Sweet spot: 65-80% for quality entries
🔄 THE SHADOW PORTFOLIO SYSTEM: HOW STRATEGIES COMPETE
Each active strategy maintains a virtual trading account that executes in parallel with real-time data:
Shadow Trading Mechanics
Entry Logic:
Calculate signal direction, probability, and confluence using strategy's unique DNA
Check if signal meets quality gate:
Probability ≥ configured minimum threshold (default: 65%)
Confluence ≥ configured minimum (default: 2 of 3)
Direction is not zero (must be long or short, not neutral)
Verify signal persistence:
Base requirement: 2 bars (configurable 1-5)
Adapts based on probability: high-prob signals (75%+) enter 1 bar faster, low-prob signals need 1 bar more
Adjusts for regime: trending markets reduce persistence by 1, volatile markets add 1
Apply additional filters:
Trend strength must exceed strategy's requirement gene
Regime filter: if volatile market detected, probability must be 72%+ to override
Volume confirmation required (volume > 70% of average)
If all conditions met for required persistence bars, enter shadow position at current close price
Position Management:
Entry Price: Recorded at close of entry bar
Stop Loss: ATR-based distance = ATR × ATR_Mult (gene) × Stop_Mult (gene) × DVS_Ratio
Take Profit: ATR-based distance = ATR × ATR_Mult (gene) × Target_Mult (gene) × DVS_Ratio
Position: +1 (long) or -1 (short), only one at a time per strategy
Exit Logic:
Check if price hit stop (on low) or target (on high) on current bar
Record trade outcome in R-multiples (profit/loss normalized by ATR)
Update performance metrics:
Total trades counter incremented
Wins counter (if profit > 0)
Cumulative P&L updated
Peak equity tracked (for drawdown calculation)
Maximum drawdown from peak recorded
Enter cooldown period (default: 8 bars, configurable 3-20) before next entry allowed
Reset signal age counter to zero
Walk-Forward Tracking:
During position lifecycle, trades are categorized:
Training Phase (first 250 bars): Trade counted toward training metrics
Testing Phase (next 75 bars): Trade counted toward testing metrics (out-of-sample)
Live Phase (after WFO period): Trade counted toward overall metrics
Why Shadow Portfolios?
No lookahead bias (uses only data available at the bar)
Realistic execution simulation (entry on close, stop/target checks on high/low)
Independent performance tracking for true fitness comparison
Allows safe experimentation without risking capital
Each strategy learns from its own experience
🏆 FITNESS SCORING: HOW STRATEGIES ARE RANKED
Fitness is not just win rate. AGE uses a comprehensive multi-factor scoring system:
Core Metrics (Minimum 3 trades required)
Win Rate (30% of fitness):
WinRate = Wins / TotalTrades
Normalized directly (0.0-1.0 scale)
Total P&L (30% of fitness):
Normalized_PnL = (PnL + 300) / 600
Clamped 0.0-1.0. Assumes P&L range of -300R to +300R for normalization scale.
Expectancy (25% of fitness):
Expectancy = Total_PnL / Total_Trades
Normalized_Expectancy = (Expectancy + 30) / 60
Clamped 0.0-1.0. Rewards consistency of profit per trade.
Drawdown Control (15% of fitness):
Normalized_DD = 1 - (Max_Drawdown / 15)
Clamped 0.0-1.0. Penalizes strategies that suffer large equity retracements from peak.
Sample Size Adjustment
Quality Factor:
<50 trades: 1.0 (full weight, small sample)
50-100 trades: 0.95 (slight penalty for medium sample)
100 trades: 0.85 (larger penalty for large sample)
Why penalize more trades? Prevents strategies from gaming the system by taking hundreds of tiny trades to inflate statistics. Favors quality over quantity.
Bonus Adjustments
Walk-Forward Validation Bonus:
if (WFO_Validated):
Fitness += (WFO_Efficiency - 0.5) × 0.1
Strategies proven on out-of-sample data receive up to +10% fitness boost based on test/train efficiency ratio.
Signal Efficiency Bonus (if diagnostics enabled):
if (Signals_Evaluated > 10):
Pass_Rate = Signals_Passed / Signals_Evaluated
Fitness += (Pass_Rate - 0.1) × 0.05
Rewards strategies that generate high-quality signals passing the quality gate, not just profitable trades.
Final Fitness: Clamped at 0.0 minimum (prevents negative fitness values)
Result: Elite strategies typically achieve 0.50-0.75 fitness. Anything above 0.60 is excellent. Below 0.30 is prime candidate for culling.
🔬 WALK-FORWARD OPTIMIZATION: ANTI-OVERFITTING PROTECTION
This is what separates AGE from curve-fitted garbage indicators.
The Three-Phase Process
Every new strategy undergoes a rigorous validation lifecycle:
Phase 1 - Training Window (First 250 bars, configurable 100-500):
Strategy trades normally via shadow portfolio
All trades count toward training performance metrics
System learns which gene combinations produce profitable patterns
Tracks independently: Training_Trades, Training_Wins, Training_PnL
Phase 2 - Testing Window (Next 75 bars, configurable 30-200):
Strategy continues trading without any parameter changes
Trades now count toward testing performance metrics (separate tracking)
This is out-of-sample data - strategy has never seen these bars during "optimization"
Tracks independently: Testing_Trades, Testing_Wins, Testing_PnL
Phase 3 - Validation Check:
Minimum_Trades = 5 (configurable 3-15)
IF (Train_Trades >= Minimum AND Test_Trades >= Minimum):
WR_Efficiency = Test_WinRate / Train_WinRate
Expectancy_Efficiency = Test_Expectancy / Train_Expectancy
WFO_Efficiency = (WR_Efficiency + Expectancy_Efficiency) / 2
IF (WFO_Efficiency >= 0.55): // configurable 0.3-0.9
Strategy.Validated = TRUE
Strategy receives fitness bonus
ELSE:
Strategy receives 30% fitness penalty
ELSE:
Validation deferred (insufficient trades in one or both periods)
What Validation Means
Validated Strategy (Green "✓ VAL" in dashboard):
Performed at least 55% as well on unseen data compared to training data
Gets fitness bonus: +(efficiency - 0.5) × 0.1
Receives priority during tournament selection for breeding
More likely to be chosen as active trading strategy
Unvalidated Strategy (Orange "○ TRAIN" in dashboard):
Failed to maintain performance on test data (likely curve-fitted to training period)
Receives 30% fitness penalty (0.7x multiplier)
Makes strategy prime candidate for culling
Can still trade but with lower selection probability
Insufficient Data (continues collecting):
Hasn't completed both training and testing periods yet
OR hasn't achieved minimum trade count in both periods
Validation check deferred until requirements met
Why 55% Efficiency Threshold?
If a strategy earned 10R during training but only 5.5R during testing, it still proved an edge exists beyond random luck. Requiring 100% efficiency would be unrealistic - market conditions change between periods. But requiring >50% ensures the strategy didn't completely degrade on fresh data.
The Protection: Strategies that work great on historical data but fail on new data are automatically identified and penalized. This prevents the population from being polluted by overfitted strategies that would fail in live trading.
🌊 DYNAMIC VOLATILITY SCALING (DVS): ADAPTIVE STOP/TARGET PLACEMENT
AGE doesn't use fixed stop distances. It adapts to current volatility conditions in real-time.
Four Volatility Measurement Methods
1. ATR Ratio (Simple Method):
Current_Vol = ATR(14) / Close
Baseline_Vol = SMA(Current_Vol, 100)
Ratio = Current_Vol / Baseline_Vol
Basic comparison of current ATR to 100-bar moving average baseline.
2. Parkinson (High-Low Range Based):
For each bar: HL = log(High / Low)
Parkinson_Vol = sqrt(Σ(HL²) / (4 × Period × log(2)))
More stable than close-to-close volatility. Captures intraday range expansion without overnight gap noise.
3. Garman-Klass (OHLC Based):
HL_Term = 0.5 × ²
CO_Term = (2×log(2) - 1) × ²
GK_Vol = sqrt(Σ(HL_Term - CO_Term) / Period)
Most sophisticated estimator. Incorporates all four price points (open, high, low, close) plus gap information.
4. Ensemble Method (Default - Median of All Three):
Ratio_1 = ATR_Current / ATR_Baseline
Ratio_2 = Parkinson_Current / Parkinson_Baseline
Ratio_3 = GK_Current / GK_Baseline
DVS_Ratio = Median(Ratio_1, Ratio_2, Ratio_3)
Why Ensemble?
Takes median to avoid outliers and false spikes
If ATR jumps but range-based methods stay calm, median prevents overreaction
If one method fails, other two compensate
Most robust approach across different market conditions
Sensitivity Scaling
Scaled_Ratio = (Raw_Ratio) ^ Sensitivity
Sensitivity 0.3: Cube root - heavily dampens volatility impact
Sensitivity 0.5: Square root - moderate dampening
Sensitivity 0.7 (Default): Balanced response to volatility changes
Sensitivity 1.0: Linear - full 1:1 volatility impact
Sensitivity 1.5: Exponential - amplified response to volatility spikes
Safety Clamps: Final DVS Ratio always clamped between 0.5x and 2.5x baseline to prevent extreme position sizing or stop placement errors.
How DVS Affects Shadow Trading
Every strategy's stop and target distances are multiplied by the current DVS ratio:
Stop Loss Distance:
Stop_Distance = ATR × ATR_Mult (gene) × Stop_Mult (gene) × DVS_Ratio
Take Profit Distance:
Target_Distance = ATR × ATR_Mult (gene) × Target_Mult (gene) × DVS_Ratio
Example Scenario:
ATR = 10 points
Strategy's ATR_Mult gene = 2.5
Strategy's Stop_Mult gene = 1.5
Strategy's Target_Mult gene = 2.5
DVS_Ratio = 1.4 (40% above baseline volatility - market heating up)
Stop = 10 × 2.5 × 1.5 × 1.4 = 52.5 points (vs. 37.5 in normal vol)
Target = 10 × 2.5 × 2.5 × 1.4 = 87.5 points (vs. 62.5 in normal vol)
Result:
During volatility spikes: Stops automatically widen to avoid noise-based exits, targets extend for bigger moves
During calm periods: Stops tighten for better risk/reward, targets compress for realistic profit-taking
Strategies adapt risk management to match current market behavior
🧬 THE EVOLUTIONARY CYCLE: SPAWN, COMPETE, CULL
Initialization (Bar 1)
AGE begins with 4 seed strategies (if evolution enabled):
Seed Strategy #0 (Balanced):
All sensitivities at 1.0 (neutral)
Zero probability boost
Moderate trend requirement (0.4)
Standard ATR/stop/target multiples (2.5/1.5/2.5)
Mid-level regime adaptation (0.5)
Seed Strategy #1 (Momentum-Focused):
Lower entropy sensitivity (0.7), higher momentum (1.5)
Slight probability boost (+0.03)
Higher trend requirement (0.5)
Tighter stops (1.3), wider targets (3.0)
Seed Strategy #2 (Entropy-Driven):
Higher entropy sensitivity (1.5), lower momentum (0.8)
Slight probability penalty (-0.02)
More trend tolerant (0.6)
Wider stops (1.8), standard targets (2.5)
Seed Strategy #3 (Structure-Based):
Balanced entropy/momentum (0.8/0.9), high structure (1.4)
Slight probability boost (+0.02)
Lower trend requirement (0.35)
Moderate risk parameters (1.6/2.8)
All seeds start with WFO validation bypassed if WFO is disabled, or must validate if enabled.
Spawning New Strategies
Timing (Adaptive):
Historical phase: Every 30 bars (configurable 10-100)
Live phase: Every 200 bars (configurable 100-500)
Automatically switches to live timing when barstate.isrealtime triggers
Conditions:
Current population < max population limit (default: 8, configurable 4-12)
At least 2 active strategies exist (need parents)
Available slot in population array
Selection Process:
Run tournament selection 3 times with different seeds
Each tournament: randomly sample active strategies, pick highest fitness
Best from 3 tournaments becomes Parent 1
Repeat independently for Parent 2
Ensures fit parents but maintains diversity
Crossover Breeding:
For each of 10 genes:
Parent1_Fitness = fitness
Parent2_Fitness = fitness
Weight1 = Parent1_Fitness / (Parent1_Fitness + Parent2_Fitness)
Gene1 = parent1's value
Gene2 = parent2's value
Child_Gene = Weight1 × Gene1 + (1 - Weight1) × Gene2
Fitness-weighted crossover ensures fitter parent contributes more genetic material.
Mutation:
For each gene in child:
IF (random < mutation_rate):
Gene_Range = GENE_MAX - GENE_MIN
Noise = (random - 0.5) × 2 × mutation_strength × Gene_Range
Mutated_Gene = Clamp(Child_Gene + Noise, GENE_MIN, GENE_MAX)
Historical mutation rate: 20% (aggressive exploration)
Live mutation rate: 8% (conservative stability)
Mutation strength: 12% of gene range (configurable 5-25%)
Initialization of New Strategy:
Unique ID assigned (total_spawned counter)
Parent ID recorded
Generation = max(parent generations) + 1
Birth bar recorded (for age tracking)
All performance metrics zeroed
Shadow portfolio reset
WFO validation flag set to false (must prove itself)
Result: New strategy with hybrid DNA enters population, begins trading in next bar.
Competition (Every Bar)
All active strategies:
Calculate their signal based on unique DNA
Check quality gate with their thresholds
Manage shadow positions (entries/exits)
Update performance metrics
Recalculate fitness score
Track WFO validation progress
Strategies compete indirectly through fitness ranking - no direct interaction.
Culling Weak Strategies
Timing (Adaptive):
Historical phase: Every 60 bars (configurable 20-200, should be 2x spawn interval)
Live phase: Every 400 bars (configurable 200-1000, should be 2x spawn interval)
Minimum Adaptation Score (MAS):
Initial MAS = 0.10
MAS decays: MAS × 0.995 every cull cycle
Minimum MAS = 0.03 (floor)
MAS represents the "survival threshold" - strategies below this fitness level are vulnerable.
Culling Conditions (ALL must be true):
Population > minimum population (default: 3, configurable 2-4)
At least one strategy has fitness < MAS
Strategy's age > culling interval (prevents premature culling of new strategies)
Strategy is not in top N elite (default: 2, configurable 1-3)
Culling Process:
Find worst strategy:
For each active strategy:
IF (age > cull_interval):
Fitness = base_fitness
IF (not WFO_validated AND WFO_enabled):
Fitness × 0.7 // 30% penalty for unvalidated
IF (Fitness < MAS AND Fitness < worst_fitness_found):
worst_strategy = this_strategy
worst_fitness = Fitness
IF (worst_strategy found):
Count elite strategies with fitness > worst_fitness
IF (elite_count >= elite_preservation_count):
Deactivate worst_strategy (set active flag = false)
Increment total_culled counter
Elite Protection:
Even if a strategy's fitness falls below MAS, it survives if fewer than N strategies are better. This prevents culling when population is generally weak.
Result: Weak strategies removed from population, freeing slots for new spawns. Gene pool improves over time.
Selection for Display (Every Bar)
AGE chooses one strategy to display signals:
Best fitness = -1
Selected = none
For each active strategy:
Fitness = base_fitness
IF (WFO_validated):
Fitness × 1.3 // 30% bonus for validated strategies
IF (Fitness > best_fitness):
best_fitness = Fitness
selected_strategy = this_strategy
Display selected strategy's signals on chart
Result: Only the highest-fitness (optionally validated-boosted) strategy's signals appear as chart markers. Other strategies trade invisibly in shadow portfolios.
🎨 PREMIUM VISUALIZATION SYSTEM
AGE includes sophisticated visual feedback that standard indicators lack:
1. Gradient Probability Cloud (Optional, Default: ON)
Multi-layer gradient showing signal buildup 2-3 bars before entry:
Activation Conditions:
Signal persistence > 0 (same directional signal held for multiple bars)
Signal probability ≥ minimum threshold (65% by default)
Signal hasn't yet executed (still in "forming" state)
Visual Construction:
7 gradient layers by default (configurable 3-15)
Each layer is a line-fill pair (top line, bottom line, filled between)
Layer spacing: 0.3 to 1.0 × ATR above/below price
Outer layers = faint, inner layers = bright
Color transitions from base to intense based on layer position
Transparency scales with probability (high prob = more opaque)
Color Selection:
Long signals: Gradient from theme.gradient_bull_mid to theme.gradient_bull_strong
Short signals: Gradient from theme.gradient_bear_mid to theme.gradient_bear_strong
Base transparency: 92%, reduces by up to 8% for high-probability setups
Dynamic Behavior:
Cloud grows/shrinks as signal persistence increases/decreases
Redraws every bar while signal is forming
Disappears when signal executes or invalidates
Performance Note: Computationally expensive due to linefill objects. Disable or reduce layers if chart performance degrades.
2. Population Fitness Ribbon (Optional, Default: ON)
Histogram showing fitness distribution across active strategies:
Activation: Only draws on last bar (barstate.islast) to avoid historical clutter
Visual Construction:
10 histogram layers by default (configurable 5-20)
Plots 50 bars back from current bar
Positioned below price at: lowest_low(100) - 1.5×ATR (doesn't interfere with price action)
Each layer represents a fitness threshold (evenly spaced min to max fitness)
Layer Logic:
For layer_num from 0 to ribbon_layers:
Fitness_threshold = min_fitness + (max_fitness - min_fitness) × (layer / layers)
Count strategies with fitness ≥ threshold
Height = ATR × 0.15 × (count / total_active)
Y_position = base_level + ATR × 0.2 × layer
Color = Gradient from weak to strong based on layer position
Line_width = Scaled by height (taller = thicker)
Visual Feedback:
Tall, bright ribbon = healthy population, many fit strategies at high fitness levels
Short, dim ribbon = weak population, few strategies achieving good fitness
Ribbon compression (layers close together) = population converging to similar fitness
Ribbon spread = diverse fitness range, active selection pressure
Use Case: Quick visual health check without opening dashboard. Ribbon growing upward over time = population improving.
3. Confidence Halo (Optional, Default: ON)
Circular polyline around entry signals showing probability strength:
Activation: Draws when new position opens (shadow_position changes from 0 to ±1)
Visual Construction:
20-segment polyline forming approximate circle
Center: Low - 0.5×ATR (long) or High + 0.5×ATR (short)
Radius: 0.3×ATR (low confidence) to 1.0×ATR (elite confidence)
Scales with: (probability - min_probability) / (1.0 - min_probability)
Color Coding:
Elite (85%+): Cyan (theme.conf_elite), large radius, minimal transparency (40%)
Strong (75-85%): Strong green (theme.conf_strong), medium radius, moderate transparency (50%)
Good (65-75%): Good green (theme.conf_good), smaller radius, more transparent (60%)
Moderate (<65%): Moderate green (theme.conf_moderate), tiny radius, very transparent (70%)
Technical Detail:
Uses chart.point array with index-based positioning
5-bar horizontal spread for circular appearance (±5 bars from entry)
Curved=false (Pine Script polyline limitation)
Fill color matches line color but more transparent (88% vs line's transparency)
Purpose: Instant visual probability assessment. No need to check dashboard - halo size/brightness tells the story.
4. Evolution Event Markers (Optional, Default: ON)
Visual indicators of genetic algorithm activity:
Spawn Markers (Diamond, Cyan):
Plots when total_spawned increases on current bar
Location: bottom of chart (location.bottom)
Color: theme.spawn_marker (cyan/bright blue)
Size: tiny
Indicates new strategy just entered population
Cull Markers (X-Cross, Red):
Plots when total_culled increases on current bar
Location: bottom of chart (location.bottom)
Color: theme.cull_marker (red/pink)
Size: tiny
Indicates weak strategy just removed from population
What It Tells You:
Frequent spawning early = population building, active exploration
Frequent culling early = high selection pressure, weak strategies dying fast
Balanced spawn/cull = healthy evolutionary churn
No markers for long periods = stable population (evolution plateaued or optimal genes found)
5. Entry/Exit Markers
Clear visual signals for selected strategy's trades:
Long Entry (Triangle Up, Green):
Plots when selected strategy opens long position (position changes 0 → +1)
Location: below bar (location.belowbar)
Color: theme.long_primary (green/cyan depending on theme)
Transparency: Scales with probability:
Elite (85%+): 0% (fully opaque)
Strong (75-85%): 10%
Good (65-75%): 20%
Acceptable (55-65%): 35%
Size: small
Short Entry (Triangle Down, Red):
Plots when selected strategy opens short position (position changes 0 → -1)
Location: above bar (location.abovebar)
Color: theme.short_primary (red/pink depending on theme)
Transparency: Same scaling as long entries
Size: small
Exit (X-Cross, Orange):
Plots when selected strategy closes position (position changes ±1 → 0)
Location: absolute (at actual exit price if stop/target lines enabled)
Color: theme.exit_color (orange/yellow depending on theme)
Transparency: 0% (fully opaque)
Size: tiny
Result: Clean, probability-scaled markers that don't clutter chart but convey essential information.
6. Stop Loss & Take Profit Lines (Optional, Default: ON)
Visual representation of shadow portfolio risk levels:
Stop Loss Line:
Plots when selected strategy has active position
Level: shadow_stop value from selected strategy
Color: theme.short_primary with 60% transparency (red/pink, subtle)
Width: 2
Style: plot.style_linebr (breaks when no position)
Take Profit Line:
Plots when selected strategy has active position
Level: shadow_target value from selected strategy
Color: theme.long_primary with 60% transparency (green, subtle)
Width: 2
Style: plot.style_linebr (breaks when no position)
Purpose:
Shows where shadow portfolio would exit for stop/target
Helps visualize strategy's risk/reward ratio
Useful for manual traders to set similar levels
Disable for cleaner chart (recommended for presentations)
7. Dynamic Trend EMA
Gradient-colored trend line that visualizes trend strength:
Calculation:
EMA(close, trend_length) - default 50 period (configurable 20-100)
Slope calculated over 10 bars: (current_ema - ema ) / ema × 100
Color Logic:
Trend_direction:
Slope > 0.1% = Bullish (1)
Slope < -0.1% = Bearish (-1)
Otherwise = Neutral (0)
Trend_strength = abs(slope)
Color = Gradient between:
- Neutral color (gray/purple)
- Strong bullish (bright green) if direction = 1
- Strong bearish (bright red) if direction = -1
Gradient factor = trend_strength (0 to 1+ scale)
Visual Behavior:
Faint gray/purple = weak/no trend (choppy conditions)
Light green/red = emerging trend (low strength)
Bright green/red = strong trend (high conviction)
Color intensity = trend strength magnitude
Transparency: 50% (subtle, doesn't overpower price action)
Purpose: Subconscious awareness of trend state without checking dashboard or indicators.
8. Regime Background Tinting (Subtle)
Ultra-low opacity background color indicating detected market regime:
Regime Detection:
Efficiency = directional_movement / total_range (over trend_length bars)
Vol_ratio = current_volatility / average_volatility
IF (efficiency > 0.5 AND vol_ratio < 1.3):
Regime = Trending (1)
ELSE IF (vol_ratio > 1.5):
Regime = Volatile (2)
ELSE:
Regime = Choppy (0)
Background Colors:
Trending: theme.regime_trending (dark green, 92-93% transparency)
Volatile: theme.regime_volatile (dark red, 93% transparency)
Choppy: No tint (normal background)
Purpose:
Subliminal regime awareness
Helps explain why signals are/aren't generating
Trending = ideal conditions for AGE
Volatile = fewer signals, higher thresholds applied
Choppy = mixed signals, lower confidence
Important: Extremely subtle by design. Not meant to be obvious, just subconscious context.
📊 ENHANCED DASHBOARD
Comprehensive real-time metrics in single organized panel (top-right position):
Dashboard Structure (5 columns × 14 rows)
Header Row:
Column 0: "🧬 AGE PRO" + phase indicator (🔴 LIVE or ⏪ HIST)
Column 1: "POPULATION"
Column 2: "PERFORMANCE"
Column 3: "CURRENT SIGNAL"
Column 4: "ACTIVE STRATEGY"
Column 0: Market State
Regime (📈 TREND / 🌊 CHAOS / ➖ CHOP)
DVS Ratio (current volatility scaling factor, format: #.##)
Trend Direction (▲ BULL / ▼ BEAR / ➖ FLAT with color coding)
Trend Strength (0-100 scale, format: #.##)
Column 1: Population Metrics
Active strategies (count / max_population)
Validated strategies (WFO passed / active total)
Current generation number
Total spawned (all-time strategy births)
Total culled (all-time strategy deaths)
Column 2: Aggregate Performance
Total trades across all active strategies
Aggregate win rate (%) - color-coded:
Green (>55%)
Orange (45-55%)
Red (<45%)
Total P&L in R-multiples - color-coded by positive/negative
Best fitness score in population (format: #.###)
MAS - Minimum Adaptation Score (cull threshold, format: #.###)
Column 3: Current Signal Status
Status indicator:
"▲ LONG" (green) if selected strategy in long position
"▼ SHORT" (red) if selected strategy in short position
"⏳ FORMING" (orange) if signal persisting but not yet executed
"○ WAITING" (gray) if no active signal
Confidence percentage (0-100%, format: #.#%)
Quality assessment:
"🔥 ELITE" (cyan) for 85%+ probability
"✓ STRONG" (bright green) for 75-85%
"○ GOOD" (green) for 65-75%
"- LOW" (dim) for <65%
Confluence score (X/3 format)
Signal age:
"X bars" if signal forming
"IN TRADE" if position active
"---" if no signal
Column 4: Selected Strategy Details
Strategy ID number (#X format)
Validation status:
"✓ VAL" (green) if WFO validated
"○ TRAIN" (orange) if still in training/testing phase
Generation number (GX format)
Personal fitness score (format: #.### with color coding)
Trade count
P&L and win rate (format: #.#R (##%) with color coding)
Color Scheme:
Panel background: theme.panel_bg (dark, low opacity)
Panel headers: theme.panel_header (slightly lighter)
Primary text: theme.text_primary (bright, high contrast)
Secondary text: theme.text_secondary (dim, lower contrast)
Positive metrics: theme.metric_positive (green)
Warning metrics: theme.metric_warning (orange)
Negative metrics: theme.metric_negative (red)
Special markers: theme.validated_marker, theme.spawn_marker
Update Frequency: Only on barstate.islast (current bar) to minimize CPU usage
Purpose:
Quick overview of entire system state
No need to check multiple indicators
Trading decisions informed by population health, regime state, and signal quality
Transparency into what AGE is thinking
🔍 DIAGNOSTICS PANEL (Optional, Default: OFF)
Detailed signal quality tracking for optimization and debugging:
Panel Structure (3 columns × 8 rows)
Position: Bottom-right corner (doesn't interfere with main dashboard)
Header Row:
Column 0: "🔍 DIAGNOSTICS"
Column 1: "COUNT"
Column 2: "%"
Metrics Tracked (for selected strategy only):
Total Evaluated:
Every signal that passed initial calculation (direction ≠ 0)
Represents total opportunities considered
✓ Passed:
Signals that passed quality gate and executed
Green color coding
Percentage of evaluated signals
Rejection Breakdown:
⨯ Probability:
Rejected because probability < minimum threshold
Most common rejection reason typically
⨯ Confluence:
Rejected because confluence < minimum required (e.g., only 1 of 3 indicators agreed)
⨯ Trend:
Rejected because signal opposed strong trend
Indicates counter-trend protection working
⨯ Regime:
Rejected because volatile regime detected and probability wasn't high enough to override
Shows regime filter in action
⨯ Volume:
Rejected because volume < 70% of 20-bar average
Indicates volume confirmation requirement
Color Coding:
Passed count: Green (success metric)
Rejection counts: Red (failure metrics)
Percentages: Gray (neutral, informational)
Performance Cost: Slight CPU overhead for tracking counters. Disable when not actively optimizing settings.
How to Use Diagnostics
Scenario 1: Too Few Signals
Evaluated: 200
Passed: 10 (5%)
⨯ Probability: 120 (60%)
⨯ Confluence: 40 (20%)
⨯ Others: 30 (15%)
Diagnosis: Probability threshold too high for this strategy's DNA.
Solution: Lower min probability from 65% to 60%, or allow strategy more time to evolve better DNA.
Scenario 2: Too Many False Signals
Evaluated: 200
Passed: 80 (40%)
Strategy win rate: 45%
Diagnosis: Quality gate too loose, letting low-quality signals through.
Solution: Raise min probability to 70%, or increase min confluence to 3 (all indicators must agree).
Scenario 3: Regime-Specific Issues
⨯ Regime: 90 (45% of rejections)
Diagnosis: Frequent volatile regime detection blocking otherwise good signals.
Solution: Either accept fewer trades during chaos (recommended), or disable regime filter if you want signals regardless of market state.
Optimization Workflow:
Enable diagnostics
Run 200+ bars
Analyze rejection patterns
Adjust settings based on data
Re-run and compare pass rate
Disable diagnostics when satisfied
⚙️ CONFIGURATION GUIDE
🧬 Evolution Engine Settings
Enable AGE Evolution (Default: ON):
ON: Full genetic algorithm (recommended for best results)
OFF: Uses only 4 seed strategies, no spawning/culling (static population for comparison testing)
Max Population (4-12, Default: 8):
Higher = more diversity, more exploration, slower performance
Lower = faster computation, less exploration, risk of premature convergence
Sweet spot: 6-8 for most use cases
4 = minimum for meaningful evolution
12 = maximum before diminishing returns
Min Population (2-4, Default: 3):
Safety floor - system never culls below this count
Prevents population extinction during harsh selection
Should be at least half of max population
Elite Preservation (1-3, Default: 2):
Top N performers completely immune to culling
Ensures best genes always survive
1 = minimal protection, aggressive selection
2 = balanced (recommended)
3 = conservative, slower gene pool turnover
Historical: Spawn Interval (10-100, Default: 30):
Bars between spawning new strategies during historical data
Lower = faster evolution, more exploration
Higher = slower evolution, more evaluation time per strategy
30 bars = ~1-2 hours on 15min chart
Historical: Cull Interval (20-200, Default: 60):
Bars between culling weak strategies during historical data
Should be 2x spawn interval for balanced churn
Lower = aggressive selection pressure
Higher = patient evaluation
Live: Spawn Interval (100-500, Default: 200):
Bars between spawning during live trading
Much slower than historical for stability
Prevents population chaos during live trading
200 bars = ~1.5 trading days on 15min chart
Live: Cull Interval (200-1000, Default: 400):
Bars between culling during live trading
Should be 2x live spawn interval
Conservative removal during live trading
Historical: Mutation Rate (0.05-0.40, Default: 0.20):
Probability each gene mutates during breeding (20% = 2 out of 10 genes on average)
Higher = more exploration, slower convergence
Lower = more exploitation, faster convergence but risk of local optima
20% balances exploration vs exploitation
Live: Mutation Rate (0.02-0.20, Default: 0.08):
Mutation rate during live trading
Much lower for stability (don't want population to suddenly degrade)
8% = mostly inherits parent genes with small tweaks
Mutation Strength (0.05-0.25, Default: 0.12):
How much genes change when mutated (% of gene's total range)
0.05 = tiny nudges (fine-tuning)
0.12 = moderate jumps (recommended)
0.25 = large leaps (aggressive exploration)
Example: If gene range is 0.5-2.0, 12% strength = ±0.18 possible change
📈 Signal Quality Settings
Min Signal Probability (0.55-0.80, Default: 0.65):
Quality gate threshold - signals below this never generate
0.55-0.60 = More signals, accept lower confidence (higher risk)
0.65 = Institutional-grade balance (recommended)
0.70-0.75 = Fewer but higher-quality signals (conservative)
0.80+ = Very selective, very few signals (ultra-conservative)
Min Confluence Score (1-3, Default: 2):
Required indicator agreement before signal generates
1 = Any single indicator can trigger (not recommended - too many false signals)
2 = Requires 2 of 3 indicators agree (RECOMMENDED for balance)
3 = All 3 must agree (very selective, few signals, high quality)
Base Persistence Bars (1-5, Default: 2):
Base bars signal must persist before entry
System adapts automatically:
High probability signals (75%+) enter 1 bar faster
Low probability signals (<68%) need 1 bar more
Trending regime: -1 bar (faster entries)
Volatile regime: +1 bar (more confirmation)
1 = Immediate entry after quality gate (responsive but prone to whipsaw)
2 = Balanced confirmation (recommended)
3-5 = Patient confirmation (slower but more reliable)
Cooldown After Trade (3-20, Default: 8):
Bars to wait after exit before next entry allowed
Prevents overtrading and revenge trading
3 = Minimal cooldown (active trading)
8 = Balanced (recommended)
15-20 = Conservative (position trading)
Entropy Length (10-50, Default: 20):
Lookback period for market order/disorder calculation
Lower = more responsive to regime changes (noisy)
Higher = more stable regime detection (laggy)
20 = works across most timeframes
Momentum Length (5-30, Default: 14):
Period for RSI/ROC calculations
14 = standard (RSI default)
Lower = more signals, less reliable
Higher = fewer signals, more reliable
Structure Length (20-100, Default: 50):
Lookback for support/resistance swing range
20 = short-term swings (day trading)
50 = medium-term structure (recommended)
100 = major structure (position trading)
Trend EMA Length (20-100, Default: 50):
EMA period for trend detection and direction bias
20 = short-term trend (responsive)
50 = medium-term trend (recommended)
100 = long-term trend (position trading)
ATR Period (5-30, Default: 14):
Period for volatility measurement
14 = standard ATR
Lower = more responsive to vol changes
Higher = smoother vol calculation
📊 Volatility Scaling (DVS) Settings
Enable DVS (Default: ON):
Dynamic volatility scaling for adaptive stop/target placement
Highly recommended to leave ON
OFF only for testing fixed-distance stops
DVS Method (Default: Ensemble):
ATR Ratio: Simple, fast, single-method (good for beginners)
Parkinson: High-low range based (good for intraday)
Garman-Klass: OHLC based (sophisticated, considers gaps)
Ensemble: Median of all three (RECOMMENDED - most robust)
DVS Memory (20-200, Default: 100):
Lookback for baseline volatility comparison
20 = very responsive to vol changes (can overreact)
100 = balanced adaptation (recommended)
200 = slow, stable baseline (minimizes false vol signals)
DVS Sensitivity (0.3-1.5, Default: 0.7):
How much volatility affects scaling (power-law exponent)
0.3 = Conservative, heavily dampens vol impact (cube root)
0.5 = Moderate dampening (square root)
0.7 = Balanced response (recommended)
1.0 = Linear, full 1:1 vol response
1.5 = Aggressive, amplified response (exponential)
🔬 Walk-Forward Optimization Settings
Enable WFO (Default: ON):
Out-of-sample validation to prevent overfitting
Highly recommended to leave ON
OFF only for testing or if you want unvalidated strategies
Training Window (100-500, Default: 250):
Bars for in-sample optimization
100 = fast validation, less data (risky)
250 = balanced (recommended) - about 1-2 months on daily, 1-2 weeks on 15min
500 = patient validation, more data (conservative)
Testing Window (30-200, Default: 75):
Bars for out-of-sample validation
Should be ~30% of training window
30 = minimal test (fast validation)
75 = balanced (recommended)
200 = extensive test (very conservative)
Min Trades for Validation (3-15, Default: 5):
Required trades in BOTH training AND testing periods
3 = minimal sample (risky, fast validation)
5 = balanced (recommended)
10+ = conservative (slow validation, high confidence)
WFO Efficiency Threshold (0.3-0.9, Default: 0.55):
Minimum test/train performance ratio required
0.30 = Very loose (test must be 30% as good as training)
0.55 = Balanced (recommended) - test must be 55% as good
0.70+ = Strict (test must closely match training)
Higher = fewer validated strategies, lower risk of overfitting
🎨 Premium Visuals Settings
Visual Theme:
Neon Genesis: Cyberpunk aesthetic (cyan/magenta/purple)
Carbon Fiber: Industrial look (blue/red/gray)
Quantum Blue: Quantum computing (blue/purple/pink)
Aurora: Northern lights (teal/orange/purple)
⚡ Gradient Probability Cloud (Default: ON):
Multi-layer gradient showing signal buildup
Turn OFF if chart lags or for cleaner look
Cloud Gradient Layers (3-15, Default: 7):
More layers = smoother gradient, more CPU intensive
Fewer layers = faster, blockier appearance
🎗️ Population Fitness Ribbon (Default: ON):
Histogram showing fitness distribution
Turn OFF for cleaner chart
Ribbon Layers (5-20, Default: 10):
More layers = finer fitness detail
Fewer layers = simpler histogram
⭕ Signal Confidence Halo (Default: ON):
Circular indicator around entry signals
Size/brightness scales with probability
Minimal performance cost
🔬 Evolution Event Markers (Default: ON):
Diamond (spawn) and X (cull) markers
Shows genetic algorithm activity
Minimal performance cost
🎯 Stop/Target Lines (Default: ON):
Shows shadow portfolio stop/target levels
Turn OFF for cleaner chart (recommended for screenshots/presentations)
📊 Enhanced Dashboard (Default: ON):
Comprehensive metrics panel
Should stay ON unless you want zero overlays
🔍 Diagnostics Panel (Default: OFF):
Detailed signal rejection tracking
Turn ON when optimizing settings
Turn OFF during normal use (slight performance cost)
📈 USAGE WORKFLOW - HOW TO USE THIS INDICATOR
Phase 1: Initial Setup & Learning
Add AGE to your chart
Recommended timeframes: 15min, 30min, 1H (best signal-to-noise ratio)
Works on: 5min (day trading), 4H (swing trading), Daily (position trading)
Load 1000+ bars for sufficient evolution history
Let the population evolve (100+ bars minimum)
First 50 bars: Random exploration, poor results expected
Bars 50-150: Population converging, fitness improving
Bars 150+: Stable performance, validated strategies emerging
Watch the dashboard metrics
Population should grow toward max capacity
Generation number should advance regularly
Validated strategies counter should increase
Best fitness should trend upward toward 0.50-0.70 range
Observe evolution markers
Diamond markers (cyan) = new strategies spawning
X markers (red) = weak strategies being culled
Frequent early activity = healthy evolution
Activity slowing = population stabilizing
Be patient. Evolution takes time. Don't judge performance before 150+ bars.
Phase 2: Signal Observation
Watch signals form
Gradient cloud builds up 2-3 bars before entry
Cloud brightness = probability strength
Cloud thickness = signal persistence
Check signal quality
Look at confidence halo size when entry marker appears
Large bright halo = elite setup (85%+)
Medium halo = strong setup (75-85%)
Small halo = good setup (65-75%)
Verify market conditions
Check trend EMA color (green = uptrend, red = downtrend, gray = choppy)
Check background tint (green = trending, red = volatile, clear = choppy)
Trending background + aligned signal = ideal conditions
Review dashboard signal status
Current Signal column shows:
Status (Long/Short/Forming/Waiting)
Confidence % (actual probability value)
Quality assessment (Elite/Strong/Good)
Confluence score (2/3 or 3/3 preferred)
Only signals meeting ALL quality gates appear on chart. If you're not seeing signals, population is either still learning or market conditions aren't suitable.
Phase 3: Manual Trading Execution
When Long Signal Fires:
Verify confidence level (dashboard or halo size)
Confirm trend alignment (EMA sloping up, green color)
Check regime (preferably trending or choppy, avoid volatile)
Enter long manually on your broker platform
Set stop loss at displayed stop line level (if lines enabled), or use your own risk management
Set take profit at displayed target line level, or trail manually
Monitor position - exit if X marker appears (signal reversal)
When Short Signal Fires:
Same verification process
Confirm downtrend (EMA sloping down, red color)
Enter short manually
Use displayed stop/target levels or your own
AGE tells you WHEN and HOW CONFIDENT. You decide WHETHER and HOW MUCH.
Phase 4: Set Up Alerts (Never Miss a Signal)
Right-click on indicator name in legend
Select "Add Alert"
Choose condition:
"AGE Long" = Long entry signal fired
"AGE Short" = Short entry signal fired
"AGE Exit" = Position reversal/exit signal
Set notification method:
Sound alert (popup on chart)
Email notification
Webhook to phone/trading platform
Mobile app push notification
Name the alert (e.g., "AGE BTCUSD 15min Long")
Save alert
Recommended: Set alerts for both long and short, enable mobile push notifications. You'll get alerted in real-time even if not watching charts.
Phase 5: Monitor Population Health
Weekly Review:
Check dashboard Population column:
Active count should be near max (6-8 of 8)
Validated count should be >50% of active
Generation should be advancing (1-2 per week typical)
Check dashboard Performance column:
Aggregate win rate should be >50% (target: 55-65%)
Total P&L should be positive (may fluctuate)
Best fitness should be >0.50 (target: 0.55-0.70)
MAS should be declining slowly (normal adaptation)
Check Active Strategy column:
Selected strategy should be validated (✓ VAL)
Personal fitness should match best fitness
Trade count should be accumulating
Win rate should be >50%
Warning Signs:
Zero validated strategies after 300+ bars = settings too strict or market unsuitable
Best fitness stuck <0.30 = population struggling, consider parameter adjustment
No spawning/culling for 200+ bars = evolution stalled (may be optimal or need reset)
Aggregate win rate <45% sustained = system not working on this instrument/timeframe
Health Check Pass:
50%+ strategies validated
Best fitness >0.50
Aggregate win rate >52%
Regular spawn/cull activity
Selected strategy validated
Phase 6: Optimization (If Needed)
Enable Diagnostics Panel (bottom-right) for data-driven tuning:
Problem: Too Few Signals
Evaluated: 200
Passed: 8 (4%)
⨯ Probability: 140 (70%)
Solutions:
Lower min probability: 65% → 60% or 55%
Reduce min confluence: 2 → 1
Lower base persistence: 2 → 1
Increase mutation rate temporarily to explore new genes
Check if regime filter is blocking signals (⨯ Regime high?)
Problem: Too Many False Signals
Evaluated: 200
Passed: 90 (45%)
Win rate: 42%
Solutions:
Raise min probability: 65% → 70% or 75%
Increase min confluence: 2 → 3
Raise base persistence: 2 → 3
Enable WFO if disabled (validates strategies before use)
Check if volume filter is being ignored (⨯ Volume low?)
Problem: Counter-Trend Losses
⨯ Trend: 5 (only 5% rejected)
Losses often occur against trend
Solutions:
System should already filter trend opposition
May need stronger trend requirement
Consider only taking signals aligned with higher timeframe trend
Use longer trend EMA (50 → 100)
Problem: Volatile Market Whipsaws
⨯ Regime: 100 (50% rejected by volatile regime)
Still getting stopped out frequently
Solutions:
System is correctly blocking volatile signals
Losses happening because vol filter isn't strict enough
Consider not trading during volatile periods (respect the regime)
Or disable regime filter and accept higher risk
Optimization Workflow:
Enable diagnostics
Run 200+ bars with current settings
Analyze rejection patterns and win rate
Make ONE change at a time (scientific method)
Re-run 200+ bars and compare results
Keep change if improvement, revert if worse
Disable diagnostics when satisfied
Never change multiple parameters at once - you won't know what worked.
Phase 7: Multi-Instrument Deployment
AGE learns independently on each chart:
Recommended Strategy:
Deploy AGE on 3-5 different instruments
Different asset classes ideal (e.g., ES futures, EURUSD, BTCUSD, SPY, Gold)
Each learns optimal strategies for that instrument's personality
Take signals from all 5 charts
Natural diversification reduces overall risk
Why This Works:
When one market is choppy, others may be trending
Different instruments respond to different news/catalysts
Portfolio-level win rate more stable than single-instrument
Evolution explores different parameter spaces on each chart
Setup:
Same settings across all charts (or customize if preferred)
Set alerts for all
Take every validated signal across all instruments
Position size based on total account (don't overleverage any single signal)
⚠️ REALISTIC EXPECTATIONS - CRITICAL READING
What AGE Can Do
✅ Generate probability-weighted signals using genetic algorithms
✅ Evolve strategies in real-time through natural selection
✅ Validate strategies on out-of-sample data (walk-forward optimization)
✅ Adapt to changing market conditions automatically over time
✅ Provide comprehensive metrics on population health and signal quality
✅ Work on any instrument, any timeframe, any broker
✅ Improve over time as weak strategies are culled and fit strategies breed
What AGE Cannot Do
❌ Win every trade (typical win rate: 55-65% at best)
❌ Predict the future with certainty (markets are probabilistic, not deterministic)
❌ Work perfectly from bar 1 (needs 100-150 bars to learn and stabilize)
❌ Guarantee profits under all market conditions
❌ Replace your trading discipline and risk management
❌ Execute trades automatically (this is an indicator, not a strategy)
❌ Prevent all losses (drawdowns are normal and expected)
❌ Adapt instantly to regime changes (re-learning takes 50-100 bars)
Performance Realities
Typical Performance After Evolution Stabilizes (150+ bars):
Win Rate: 55-65% (excellent for trend-following systems)
Profit Factor: 1.5-2.5 (realistic for validated strategies)
Signal Frequency: 5-15 signals per 100 bars (quality over quantity)
Drawdown Periods: 20-40% of time in equity retracement (normal trading reality)
Max Consecutive Losses: 5-8 losses possible even with 60% win rate (probability says this is normal)
Evolution Timeline:
Bars 0-50: Random exploration, learning phase - poor results expected, don't judge yet
Bars 50-150: Population converging, fitness climbing - results improving
Bars 150-300: Stable performance, most strategies validated - consistent results
Bars 300+: Mature population, optimal genes dominant - best results
Market Condition Dependency:
Trending Markets: AGE excels - clear directional moves, high-probability setups
Choppy Markets: AGE struggles - fewer signals generated, lower win rate
Volatile Markets: AGE cautious - higher rejection rate, wider stops, fewer trades
Market Regime Changes:
When market shifts from trending to choppy overnight
Validated strategies can become temporarily invalidated
AGE will adapt through evolution, but not instantly
Expect 50-100 bar re-learning period after major regime shifts
Fitness may temporarily drop then recover
This is NOT a holy grail. It's a sophisticated signal generator that learns and adapts using genetic algorithms. Your success depends on:
Patience during learning periods (don't abandon after 3 losses)
Proper position sizing (risk 0.5-2% per trade, not 10%)
Following signals consistently (cherry-picking defeats statistical edge)
Not abandoning system prematurely (give it 200+ bars minimum)
Understanding probability (60% win rate means 40% of trades WILL lose)
Respecting market conditions (trending = trade more, choppy = trade less)
Managing emotions (AGE is emotionless, you need to be too)
Expected Drawdowns:
Single-strategy max DD: 10-20% of equity (normal)
Portfolio across multiple instruments: 5-15% (diversification helps)
Losing streaks: 3-5 consecutive losses expected periodically
No indicator eliminates risk. AGE manages risk through:
Quality gates (rejecting low-probability signals)
Confluence requirements (multi-indicator confirmation)
Persistence requirements (no knee-jerk reactions)
Regime awareness (reduced trading in chaos)
Walk-forward validation (preventing overfitting)
But it cannot prevent all losses. That's inherent to trading.
🔧 TECHNICAL SPECIFICATIONS
Platform: TradingView Pine Script v5
Indicator Type: Overlay indicator (plots on price chart)
Execution Type: Signals only - no automatic order placement
Computational Load:
Moderate to High (genetic algorithms + shadow portfolios)
8 strategies × shadow portfolio simulation = significant computation
Premium visuals add additional load (gradient cloud, fitness ribbon)
TradingView Resource Limits (Built-in Caps):
Max Bars Back: 500 (sufficient for WFO and evolution)
Max Labels: 100 (plenty for entry/exit markers)
Max Lines: 150 (adequate for stop/target lines)
Max Boxes: 50 (not heavily used)
Max Polylines: 100 (confidence halos)
Recommended Chart Settings:
Timeframe: 15min to 1H (optimal signal/noise balance)
5min: Works but noisier, more signals
4H/Daily: Works but fewer signals
Bars Loaded: 1000+ (ensures sufficient evolution history)
Replay Mode: Excellent for testing without risk
Performance Optimization Tips:
Disable gradient cloud if chart lags (most CPU intensive visual)
Disable fitness ribbon if still laggy
Reduce cloud layers from 7 to 3
Reduce ribbon layers from 10 to 5
Turn off diagnostics panel unless actively tuning
Close other heavy indicators to free resources
Browser/Platform Compatibility:
Works on all modern browsers (Chrome, Firefox, Safari, Edge)
Mobile app supported (full functionality on phone/tablet)
Desktop app supported (best performance)
Web version supported (may be slower on older computers)
Data Requirements:
Real-time or delayed data both work
No special data feeds required
Works with TradingView's standard data
Historical + live data seamlessly integrated
🎓 THEORETICAL FOUNDATIONS
AGE synthesizes advanced concepts from multiple disciplines:
Evolutionary Computation
Genetic Algorithms (Holland, 1975): Population-based optimization through natural selection metaphor
Tournament Selection: Fitness-based parent selection with diversity preservation
Crossover Operators: Fitness-weighted gene recombination from two parents
Mutation Operators: Random gene perturbation for exploration of new parameter space
Elitism: Preservation of top N performers to prevent loss of best solutions
Adaptive Parameters: Different mutation rates for historical vs. live phases
Technical Analysis
Support/Resistance: Price structure within swing ranges
Trend Following: EMA-based directional bias
Momentum Analysis: RSI, ROC, MACD composite indicators
Volatility Analysis: ATR-based risk scaling
Volume Confirmation: Trade activity validation
Information Theory
Shannon Entropy (1948): Quantification of market order vs. disorder
Signal-to-Noise Ratio: Directional information vs. random walk
Information Content: How much "information" a price move contains
Statistics & Probability
Walk-Forward Analysis: Rolling in-sample/out-of-sample optimization
Out-of-Sample Validation: Testing on unseen data to prevent overfitting
Monte Carlo Principles: Shadow portfolio simulation with realistic execution
Expectancy Theory: Win rate × avg win - loss rate × avg loss
Probability Distributions: Signal confidence quantification
Risk Management
ATR-Based Stops: Volatility-normalized risk per trade
Volatility Regime Detection: Market state classification (trending/choppy/volatile)
Drawdown Control: Peak-to-trough equity measurement
R-Multiple Normalization: Performance measurement in risk units
Machine Learning Concepts
Online Learning: Continuous adaptation as new data arrives
Fitness Functions: Multi-objective optimization (win rate + expectancy + drawdown)
Exploration vs. Exploitation: Balance between trying new strategies and using proven ones
Overfitting Prevention: Walk-forward validation as regularization
Novel Contribution:
AGE is the first TradingView indicator to apply genetic algorithms to real-time indicator parameter optimization while maintaining strict anti-overfitting controls through walk-forward validation.
Most "adaptive" indicators simply recalibrate lookback periods or thresholds. AGE evolves entirely new strategies through competitive selection - it's not parameter tuning, it's Darwinian evolution of trading logic itself.
The combination of:
Genetic algorithm population management
Shadow portfolio simulation for realistic fitness evaluation
Walk-forward validation to prevent overfitting
Multi-indicator confluence for signal quality
Dynamic volatility scaling for adaptive risk
...creates a system that genuinely learns and improves over time while avoiding the curse of curve-fitting that plagues most optimization approaches.
🏗️ DEVELOPMENT NOTES
This project represents months of intensive development, facing significant technical challenges:
Challenge 1: Making Genetics Actually Work
Early versions spawned garbage strategies that polluted the gene pool:
Random gene combinations produced nonsensical parameter sets
Weak strategies survived too long, dragging down population
No clear convergence toward optimal solutions
Solution:
Comprehensive fitness scoring (4 factors: win rate, P&L, expectancy, drawdown)
Elite preservation (top 2 always protected)
Walk-forward validation (unproven strategies penalized 30%)
Tournament selection (fitness-weighted breeding)
Adaptive culling (MAS decay creates increasing selection pressure)
Challenge 2: Balancing Evolution Speed vs. Stability
Too fast = population chaos, no convergence. Too slow = can't adapt to regime changes.
Solution:
Dual-phase timing: Fast evolution during historical (30/60 bar intervals), slow during live (200/400 bar intervals)
Adaptive mutation rates: 20% historical, 8% live
Spawn/cull ratio: Always 2:1 to prevent population collapse
Challenge 3: Shadow Portfolio Accuracy
Needed realistic trade simulation without lookahead bias:
Can't peek at future bars for exits
Must track multiple portfolios simultaneously
Stop/target checks must use bar's high/low correctly
Solution:
Entry on close (realistic)
Exit checks on current bar's high/low (realistic)
Independent position tracking per strategy
Cooldown periods to prevent unrealistic rapid re-entry
ATR-normalized P&L (R-multiples) for fair comparison across volatility regimes
Challenge 4: Pine Script Compilation Limits
Hit TradingView's execution limits multiple times:
Too many array operations
Too many variables
Too complex conditional logic
Solution:
Optimized data structures (single DNA array instead of 8 separate arrays)
Minimal visual overlays (only essential plots)
Efficient fitness calculations (vectorized where possible)
Strategic use of barstate.islast to minimize dashboard updates
Challenge 5: Walk-Forward Implementation
Standard WFO is difficult in Pine Script:
Can't easily "roll forward" through historical data
Can't re-optimize strategies mid-stream
Must work in real-time streaming environment
Solution:
Age-based phase detection (first 250 bars = training, next 75 = testing)
Separate metric tracking for train vs. test
Efficiency calculation at fixed interval (after test period completes)
Validation flag persists for strategy lifetime
Challenge 6: Signal Quality Control
Early versions generated too many signals with poor win rates:
Single indicators produced excessive noise
No trend alignment
No regime awareness
Instant entries on single-bar spikes
Solution:
Three-layer confluence system (entropy + momentum + structure)
Minimum 2-of-3 agreement requirement
Trend alignment checks (penalty for counter-trend)
Regime-based probability adjustments
Persistence requirements (signals must hold multiple bars)
Volume confirmation
Quality gate (probability + confluence thresholds)
The Result
A system that:
Truly evolves (not just parameter sweeps)
Truly validates (out-of-sample testing)
Truly adapts (ongoing competition and breeding)
Stays within TradingView's platform constraints
Provides institutional-quality signals
Maintains transparency (full metrics dashboard)
Development time: 3+ months of iterative refinement
Lines of code: ~1500 (highly optimized)
Test instruments: ES, NQ, EURUSD, BTCUSD, SPY, AAPL
Test timeframes: 5min, 15min, 1H, Daily
🎯 FINAL WORDS
The Adaptive Genesis Engine is not just another indicator - it's a living system that learns, adapts, and improves through the same principles that drive biological evolution. Every bar it observes adds to its experience. Every strategy it spawns explores new parameter combinations. Every strategy it culls removes weakness from the gene pool.
This is evolution in action on your charts.
You're not getting a static formula locked in time. You're getting a system that thinks , that competes , that survives through natural selection. The strongest strategies rise to the top. The weakest die. The gene pool improves generation after generation.
AGE doesn't claim to predict the future - it adapts to whatever the future brings. When markets shift from trending to choppy, from calm to volatile, from bullish to bearish - AGE evolves new strategies suited to the new regime.
Use it on any instrument. Any timeframe. Any market condition. AGE will adapt.
This indicator gives you the pure signal intelligence. How you choose to act on it - position sizing, risk management, execution discipline - that's your responsibility. AGE tells you when and how confident . You decide whether and how much .
Trust the process. Respect the evolution. Let Darwin work.
"In markets, as in nature, it is not the strongest strategies that survive, nor the most intelligent - but those most responsive to change."
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
— Happy Holiday's
Argentum Flag [AGP] Ver.2.5Central Purpose and Concept
The Argentum Flag script is a multifunctional tool that integrates and visualizes multiple key indicators to provide a detailed and unified perspective of the market. The core concept is to analyze price from different angles—volatility, volume, and momentum—to identify confluences and patterns that may be difficult to see with separate indicators. This "mashup" is not a simple fusion of indicators, but a strategic combination of tools that complement each other to offer a comprehensive view of asset behavior.
Components and Their Functionality
This script combines and visualizes the following elements:
EMA Percentage Bands (EMA Bands):
Uses an Exponential Moving Average (EMA) as a baseline.
Calculates and draws several volatility bands that deviate from the central EMA by fixed percentages (0.47%, 0.94%, 2.36%). These bands are inspired by Fibonacci ratios and the cyclical nature of the market.
The bands are colored with a dynamic gradient that reflects the current state of volatility.
Utility: These bands act as dynamic support and resistance areas. The price entering or exiting these zones can indicate a change in volatility or a possible exhaustion of the movement.
Volatility Signals (Vortex & Prime Signals):
The script generates visual signals when the price stays outside the volatility bands for a specific number of bars.
Vortex Signals (diamond ⍲): Appear when the price crosses and stays outside the Prime bands, suggesting a high volatility or a possible continuation of the trend.
Exit/Entry Signals (circle ⌾): Are activated when the price stays outside the Vortex bands, indicating an extreme extension of volatility. These can be interpreted as potential reversal or profit-taking zones.
Utility: They help traders quickly identify moments of high and low volatility and potential turning points in price action.
Volume Analysis (Volume Bar Colors):
The script changes the color of the bars based on the relationship between the current volume and the average volume over a 50-bar period.
Utility: This feature allows the trader to immediately visualize the strength behind a price movement. For example, a bullish candle with "extreme" volume suggests strong buying interest, while a bearish candle with "low" volume could indicate a weak correction.
Summary Tables (Dashboard):
EMA-Fibo Table: Displays the values of 12 EMAs based on the Fibonacci sequence (5, 8, 13, 21...) in an easy-to-access table. The background color of each value indicates if the current price is above (bullish) or below (bearish) that EMA.
Multi-Timeframe RSI Table: Displays the Relative Strength Index (RSI) values across multiple timeframes (from 1 minute to monthly). The text color changes to highlight if the RSI is in overbought (orange) or oversold (white) areas, according to the established levels.
Utility: These tables condense a large amount of data into a simple format, allowing traders to perform a quick, multi-timeframe market analysis without constantly switching charts.
How to Use the Script
This script is a contextual analysis tool that works best when its different components are combined. It is not a "buy and sell signal" system on its own, but a tool for informed decision-making.
Trend Identification: Use the EMA table to see the general trend direction across different timeframes. A price above most of the EMAs in the table suggests a bullish bias.
Volatility Reading: Observe the EMA bands. If the price stays within the bands, volatility is low. A strong move that breaks out of the bands, accompanied by an "extreme" volume color (blue), suggests strong momentum that could continue.
Momentum Analysis: Use the RSI table to confirm movements. An overbought 15m RSI could support a reversal signal from the Vortex bands, while a 1D RSI in a neutral zone may indicate that the main trend has not changed.
Signal Confirmation: Visual signals (diamond and circle) should not be used in isolation. They must be confirmed by volume analysis and dashboard readings. For example, an "Exit Signal" (circle) with low volume may be less reliable than one with high volume and a clear reversal candle.
Disclaimer
This script is for informational and educational purposes only. It is not financial advice, nor is it a recommendation to buy or sell any financial instrument. All trading involves risk, and past performance is not indicative of future results. The user is solely responsible for their own trading decisions.
TARVIS Labs - Bitcoin Macro Bottom/Top SignalsSCRIPT DESCRIPTION
This is a script specifically written to help provide indicators from a macro view. This script is best run on the 1 day interval on Bitstamp's $BTCUSD chart. It helps indicate when to accumulate bitcoin, and when its in a bull run when there are local tops, strong top warnings, and a signal to exit a bull run. This is described further below.
If you don't have interest in trading on the way to the top I suggest turning off the following indicators in the settings of the indicator:
- Opportunity To Buy Back In Indicator
- Local Top Near Bull Run Top Indicator
ACCUMULATION ZONE INDICATOR - LIGHT GREEN
Description
When we look at the history of Bitcoin every bottom has crossed below the 100 week EMA. Once it does its accompanied by hash ribbon cross with miner capitulation. After that is the prime time to accumulate as theres a clearer signal the bottom is in. Specifically, a signal to look for is the 14 day MACD/signal cross and the 14 day MACD continuing to stay above the signal until the price returns above the 100 week EMA. This is prime accumulation territory.
Strategy for Usage
A good strategy to use when accumulating the bottom is dollar-cost averaging over a 30 day period. The accumulation zone can last longer than 30 days but 30 days is a good range of time to DCA.
STRONG BUY IN ACCUMULATION ZONE INDICATOR - DARK GREEN
Description
We can add to the bottoming signal by looking for post-downtrend reversals inside the bottoming signal. We do this by using a 9/19 daily cross.
Strategy for Usage
These post-downtrend reversals can potentially provide better targeted days for accumulation than the broader bottoming signal and can be used to add more on that day than on an average day for the dollar cost average strategy. Say for example, use 1/3 of funds on these days rather than 1/30th.
OPPORTUNITY TO BUY BACK IN INDICATOR - BLUE
Description
When the 1d 18 EMA > 1d 63 EMA and the 12/52 1d crosses. These together provide good buy opportunities to buy bitcoin.
Strategy for Usage
If you happen to find yourself out of the market from your own TA or a trade, this signal can provide a buy opportunity to reenter the market if you're out of it.
BULL RUN LOCAL TOP INDICATOR - ORANGE
Description
We will similarly use the 100 week EMA to determine trend reversal into a bull run. When we see the 100 week EMA uptrending, we can begin to look for local tops using the 9/19 daily MACD/signal bearish cross along with the 12 EMA having a negative slope, which could be the beginning signal for a local top.
Strategy for Usage
This is a rather light indicator, but can be used in tandem with your own technical analysis to determine if you want to reenter after you exit from its signal.
LOCAL TOP NEAR BULL RUN TOP INDICATOR - RED
Description
When the 100 week EMA is in an uptrend we can look for significant loss of momentum in order to determine if a local top is in near a bull run top. Similar to the Bull Run Local Top Indicator, this strategy uses a MACD/signal cross but instead uses the 30/65 day EMAs.
Strategy for Usage
Ideally the right strategy to use here is to exit the market when this indicator starts. When the indicator ends if the "End of Bull Run Indicator" is not showing on the chart you can buy back into the market.
TOP IS LIKELY IN INDICATOR
Description
When the 100 week EMA is in a very strong uptrend and the 9/19 weekly MACD/signal bearish cross occurs, and the 63 EMA begins to downtrend.
Strategy for Usage
This signal typically accompanies the "Local Top Near Bull Run Top Indicator" therefore if you're following the strategy you would likely already be out of the market, but if you're not and this signal fires its a strong signal the top is in and we're likely going to start seeing a strong retrace. This is typically right before we see the "End of Bull Run Indicator". There is only one occurrence where it wasn't followed by a large drop & the "End of Bull Run Indicator" and that was in the 2017 bull run where there were many strong retracements post local top. The likelihood we see that again is low, but if it were to happen you can buy back into the market when the "Top is Likely In Indicator" and the "Local Top Near Bull Run Top Indicator" are not firing.
TOP IS LIKELY IN INDICATOR
Description
When the 100 week EMA is in a strong uptrend and the 9/19 weekly MACD/signal bearish cross occurs, and the 63 EMA begins to downtrend.
Strategy for Usage
This signal typically accompanies the "Local Top Near Bull Run Top Indicator" therefore if you're following the strategy you would likely already be out of the market, but if you're not and this signal fires its a strong signal the top is in and we're likely going to start seeing a strong retrace. This is typically right before we see the "End of Bull Run Indicator". There is only one occurrence where it wasn't followed by a large drop & the "End of Bull Run Indicator" and that was in the 2017 bull run where there were many strong retracements post local top. The likelihood we see that again is low, but if it were to happen you can buy back into the market when the "Top is Likely In Indicator" and the "Local Top Near Bull Run Top Indicator" are not firing.
END OF BULL RUN INDICATOR
Description
When the 100 week EMA is in an uptrend and the 1d 18 EMA crosses the 1d 63 EMA.
Strategy for Usage
When the 100 week EMA is a strong uptrend and the 18/63 cross occurs the top is very likely in. It has occurred in every bull run top leading to the bear market.
5EMA + VP IGHola Divinis
En una villa nació, fue deseo de Dios
Crecer y sobrevivir a la humilde expresión
Enfrentar la adversidad
Con afán de ganarse a cada paso la vida
En un potrero forjó una zurda inmortal
Con experiencia, sedienta ambición de llegar
De cebollita, soñaba jugar un Mundial
Y consagrarse en Primera
Tal vez jugando pudiera a su familia ayudar
En una villa nació, fue deseo de Dios
Crecer y sobrevivir a la humilde expresión
Enfrentar la adversidad
Con afán de ganarse a cada paso la vida
En un potrero forjó una zurda inmortal
Con experiencia, sedienta ambición de llegar
De cebollita, soñaba jugar un Mundial
Y consagrarse en Primera
Tal vez jugando pudiera a su familia ayudar
A poco que debutó (Maradó, Maradó)
La 12 fue quien coreó (Maradó, Maradó)
Su sueño tenía una estrella
Llena de gol y gambetas
Y todo el pueblo cantó (Maradó, Maradó)
Nació la mano de Dios (Maradó, Maradó)
Llenó alegría en el pueblo
Regó de gloria este suelo
Carga una cruz en los hombros por ser el mejor
Por no venderse jamás, al poder enfrentó
Curiosa debilidad, si Jesús tropezó
¿Por qué él no habría de hacerlo?
La fama le presentó una blanca mujer
De misterioso sabor y prohibido placer
Que lo hizo adicto al deseo de usarla otra vez
Involucrando su vida
Y es un partido que un día el Diego está por ganar
A poco que debutó (Maradó, Maradó)
La 12 fue quien coreó (Maradó, Maradó)
Su sueño tenía una estrella
Llena de gol y gambetas
Y todo el pueblo cantó (Maradó, Maradó)
Nació la mano de Dios (Maradó, Maradó)
Llenó alegría en el pueblo
Llenó de gloria este suelo
Olé, olé, olé, olé
¡Diego, Diego!
Olé, olé, olé, olé
¡Diego, Diego!
Olé, olé, olé, olé
¡Diego, Diego!
Olé, olé, olé, olé
¡Diego, Diego!
Y todo el pueblo cantó (Maradó, Maradó)
La 12 fue quien coreó (Maradó, Maradó)
Su sueño tenía una estrella
Llena de gol y gambetas
Y todo el pueblo cantó (Maradó, Maradó)
Nació la mano de Dios (Maradó, Maradó)
Llenó alegría en el pueblo
Regó de gloria este suelo
Regó de gloria este suelo
Regó de gloria
Agregar a la playlist
Tamaño
A
A
Cifrado
Imprimir
Corregir
Market Profile for Futures with Session and After Hours SplitAdapted existing Market Profile scripts to be move suitable for Futures Markets with Session and After Hours split
Script Provides split Market Profiles for Session and After Hours
Users can customize the Session and AH hours inputs to suit any ticker and their interpretation of prime and non-prime hours
DEMA ATR Strategy [PrimeAutomation]⯁ OVERVIEW
The DEMA ATR Strategy combines trend-following logic with adaptive volatility filters to identify strong momentum phases and manage trades dynamically.
It uses a Double Exponential Moving Average (DEMA) anchored to ATR volatility bands, creating a self-adjusting trend baseline.
When the adjusted DEMA shifts direction, the strategy enters positions and scales out profit in phases based on ATR-driven targets.
This system adapts to volatility, filters noise, and seeks sustained directional moves.
⯁ KEY FEATURES
DEMA-Volatility Hybrid Filter
Uses Double EMA with ATR expansion/compression logic to form a dynamic trend baseline.
Directional Shift Entries
Entries occur when the adjusted DEMA flips trend (bullish crossover or bearish crossunder vs its past value).
Noise Reduction Mechanism
ATR range caps extreme moves and prevents false flips during choppy volatility spikes.
Multi-Level Take Profits
Targets scale out positions at 1×, 2×, and 3× ATR multiples in the trade direction.
Volatility-Adaptive Targets
ATR multiplier ensures profit targets expand/contract based on market conditions.
Single-Direction Exposure
No pyramiding; the strategy flips position only when trend shifts.
Automated Trade Finalization
When all profit targets trigger, the position is fully closed.
⯁ STRATEGY LOGIC
Trend Direction:
DEMA baseline is modified using ATR upper/lower envelopes.
• If the adjusted DEMA rises above previous value → Bullish
• If it falls below previous value → Bearish
Entry Rules:
• Enter Long when bullish shift occurs and no long position exists
• Enter Short when bearish shift occurs and no short position exists
Take Profit Logic:
3 partial exits for each trade based on ATR:
• TP1 = ±1× ATR
• TP2 = ±2× ATR
• TP3 = ±3× ATR
Profit distribution: 30% / 30% / 40%
Exit Conditions:
• Exit when all TPs hit (full scale-out if sum of all TPs 100%)
• Opposite trend signal closes current trade and opens new one
⯁ WHEN TO USE
Trending environments
Medium–high volatility phases
Swing trading and intraday trend plays
Markets that respect momentum continuation (crypto, indices, FX majors)
⯁ CONCLUSION
This strategy blends DEMA trend recognition with ATR-based volatility adaptation to generate cleaner directional entries and structured take-profit exits. It is designed to capture momentum phases while avoiding noise-driven false signals, delivering a disciplined and scalable trend-following approach.
RSI-Adaptive T3 & SAR Strategy [PrimeAutomation]⯁ OVERVIEW
The RSI-Adaptive T3 and SAR Confluence Strategy combines adaptive smoothing with dynamic trend confirmation to identify precise trend reversals and continuation opportunities. It fuses the power of an RSI-based adaptive T3 moving average with the Parabolic SAR filter , aiming to trade in harmony with dominant momentum shifts while maintaining tight control through automatic stop-loss placement.
The RSI-Adaptive T3 is a precision trend-following tool built around the legendary T3 smoothing algorithm developed by Tim Tillson, designed to enhance responsiveness while reducing lag compared to traditional moving averages. Current implementation takes it a step further by dynamically adapting the smoothing length based on real-time RSI conditions — allowing the T3 to “breathe” with market volatility. This dynamic length makes the curve faster in trending moves and smoother during consolidations.
To help traders visualize volatility and directional momentum, adaptive volatility bands are plotted around the T3 line, with visual crossover markers and a dynamic info panel on the chart. It’s ideal for identifying trend shifts, spotting momentum surges, and adapting strategy execution to the pace of the market.
⯁ LOGIC
The T3 moving average length dynamically adjusts based on RSI values — when RSI is high, the smoothing period shortens to react faster; when RSI is low, the period increases for stability in slow markets.
A Parabolic SAR filter confirms directional bias, ensuring trades only occur in alignment with the broader market trend.
Long Entries: Trigger when the T3 curve crosses upward while the current price remains above the SAR — signaling bullish momentum alignment.
Short Entries: Trigger when the T3 crosses downward while the price remains below the SAR — confirming bearish trend alignment.
Stops: Dynamic stops are placed using the highest or lowest price over a set lookback period, adapting automatically to market volatility.
⯁ FEATURES
RSI-Adaptive T3 Filter: Adjusts smoothing in real time to market conditions, blending responsiveness with noise reduction.
SAR Confluence Check: Prevents counter-trend entries by confirming momentum direction via the Parabolic SAR.
Automatic Stop Placement: Uses recent highs or lows as stop-loss anchors, minimizing risk exposure.
Color-coded Visualization: The T3 line dynamically changes color based on slope direction, making momentum shifts visually intuitive.
Smoothed Trend Structure: Reduces market noise, allowing cleaner, more reliable trend recognition across different assets.
⯁ CONCLUSION
The RSI-Adaptive T3 and SAR Confluence Strategy delivers an advanced fusion of adaptive smoothing and structural confirmation. By combining RSI-driven reactivity with Parabolic SAR trend validation, this strategy offers a balanced approach to identifying sustainable momentum reversals while maintaining strong risk management through automatic stop levels. Ideal for traders who seek precision entries aligned with adaptive trend dynamics.
Estrategia de NY ORB por CPThis strategy marks the New York market opening range during the first 15 minutes and confirms a buy or sell entry once the price returns and retests that range. It’s designed to capture trades of 60 points or more after the range has been retested. I suggest complementing the strategy with an indicator that highlights FVGs (Fair Value Gaps) or order blocks to better understand what price is doing and where it’s heading.
esta estrategia te marca el rango de apertura del mercado de ny de los primeros 15 minutos y te confirma entrada en venta o compra una vez que el precio regrese y retestee el rango. esta diseñada para tener trades de 60 puntos o mas una vez que el rango sea retesteado. sugiero acompañar la estrategia con algun indicador que marque fvg o order blocks para tener una mejor de lo que el precio esta haciendo y hacia donde se dirige.
BACAP PRICE STRUCTURE 21 EMA TREND21dma-STRUCTURE
Overview
The 21dma-STRUCTURE indicator is a sophisticated overlay indicator that visualizes price action relative to a triple 21-period exponential moving average structure. Originally developed by BalarezoCapital and enhanced by PrimeTrading, this indicator provides clear visual cues for trend direction and momentum through dynamic bar coloring and EMA structure analysis.
Key Features
Triple EMA Structure
- 21 EMA High: Tracks the exponential moving average of high prices
- 21 EMA Close: Tracks the exponential moving average of closing prices
- 21 EMA Low: Tracks the exponential moving average of low prices
- Dynamic Cloud: Gray fill between high and low EMAs for visual structure reference
Smart Bar Coloring System
- Blue Bars: Price closes above all three EMAs (strong bullish momentum)
- Pink Bars: Daily high falls below the lowest EMA (strong bearish signal)
- Gray Bars: Neutral conditions or transitional phases
- Color Memory: Maintains previous color until new condition is met
Dynamic Center Line
- Trend-Following Color: Green when all EMAs are rising, red when all are falling
- Color Persistence: Maintains trend color during sideways movement
- Visual Clarity: Thicker center line for easy trend identification
Customizable Visual Elements
- Adjustable line thickness for all EMA plots
- Customizable colors for bullish and bearish conditions
- Configurable trend colors for uptrend and downtrend phases
- Optional bar color changes with toggle control
How to Use
Trend Identification
- Rising Green Center Line: All EMAs trending upward (bullish structure)
- Falling Red Center Line: All EMAs trending downward (bearish structure)
- Flat Center Line: Maintains last trend color during consolidation
Momentum Analysis
- Blue Bars: Strong bullish momentum with price above entire EMA structure
- Pink Bars: Strong bearish momentum with high below lowest EMA
- Gray Bars: Neutral or transitional momentum phases
Entry and Exit Signals
- Bullish Setup: Look for blue bars during green center line periods
- Bearish Setup: Look for pink bars during red center line periods
- Exit Consideration: Watch for color changes as potential momentum shifts
Structure Trading
- Support/Resistance: Use EMA cloud as dynamic support and resistance zones
- Breakout Confirmation: Bar color changes can confirm structure breakouts
- Trend Continuation: Color persistence suggests ongoing momentum
Settings
Visual Customization
- Change Bar Color: Toggle to enable/disable bar coloring
- Line Size: Adjust thickness of EMA lines (default: 3)
- Bullish Candle Color: Customize blue bar color
- Bearish Candle Color: Customize pink bar color
Trend Colors
- Uptrend Color: Color for rising EMA center line (default: green)
- Downtrend Color: Color for falling EMA center line (default: red)
- Cloud Color: Fill color between high and low EMAs (default: gray)
Advanced Features
Modified Bar Logic
Unlike traditional EMA systems, this indicator uses refined conditions:
- Bullish signals require close above ALL three EMAs
- Bearish signals require high below the LOWEST EMA
- Enhanced precision reduces false signals compared to single EMA systems
Trend Memory System
- Intelligent color persistence during sideways movement
- Reduces noise from minor EMA fluctuations
- Maintains trend context during consolidation periods
Performance Optimization
- Efficient calculation methods for real-time performance
- Clean visual design that doesn't clutter charts
- Compatible with all timeframes and instruments
Best Practices
Multi-Timeframe Analysis
- Use higher timeframes to identify overall trend direction
- Apply on multiple timeframes for confluence
- Combine with weekly/monthly charts for position trading
Risk Management
- Use bar color changes as early warning signals
- Consider position sizing based on EMA structure strength
- Set stops relative to EMA support/resistance levels
Combination Strategies
- Pair with volume indicators for confirmation
- Use alongside RSI or MACD for momentum confirmation
- Combine with key support/resistance levels
Market Context
- More effective in trending markets than choppy conditions
- Consider overall market environment and sector strength
- Adjust expectations during high volatility periods
Technical Specifications
- Based on 21-period exponential moving averages
- Uses Pine Script v6 for optimal performance
- Overlay indicator that works with any chart type
- Maximum 500 lines for clean performance
Ideal Applications
- Swing trading on daily charts
- Position trading on weekly charts
- Intraday momentum trading (adjust timeframe accordingly)
- Trend following strategies
- Structure-based trading approaches
Disclaimer
This indicator is for educational and informational purposes only. It should not be used as the sole basis for trading decisions. Always combine with other forms of analysis, proper risk management, and consider your individual trading plan and risk tolerance.
Compatible with Pine Script v6 | Works on all timeframes | Optimized for trending markets






















