Algorithmic Kalman Filter [CRYPTIK1]Price action is chaos. Markets are driven by high-frequency algorithms, emotional reactions, and raw speculation, creating a constant stream of noise that obscures the true underlying trend. A simple moving average is too slow, too primitive to navigate this environment effectively. It lags, it gets chopped up, and it fails when you need it most.
This script implements an Algorithmic Kalman Filter (AKF), a sophisticated signal processing algorithm adapted from aerospace and robotic guidance systems. Its purpose is singular: to strip away market noise and provide a hyper-adaptive, self-correcting estimate of an asset's true trajectory.
The Concept: An Adaptive Intelligence
Unlike a moving average that mindlessly averages past data, the Kalman Filter operates on a two-step principle: Predict and Update.
Predict: On each new bar, the filter makes a prediction of the true price based on its previous state.
Update: It then measures the error between its prediction and the actual closing price. It uses this error to intelligently correct its estimate, learning from its mistakes in real-time.
The result is a flawlessly smooth line that adapts to volatility. It remains stable during chop and reacts swiftly to new trends, giving you a crystal-clear view of the market's real intention.
How to Wield the Filter: The Core Settings
The power of the AKF lies in its two tuning parameters, which allow you to calibrate the filter's "brain" to any asset or timeframe.
Process Noise (Q) - Responsiveness: This controls how much you expect the true trend to change.
A higher Q value makes the filter more sensitive and responsive to recent price action. Use this for highly volatile assets or lower timeframes.
A lower Q value makes the filter smoother and more stable, trusting that the underlying trend is slow-moving. Use this for higher timeframes or ranging markets.
Measurement Noise (R) - Smoothness: This controls how much you trust the incoming price data.
A higher R value tells the filter that the price is extremely noisy and to be more skeptical. This results in a much smoother, slower-moving line.
A lower R value tells the filter to trust the price data more, resulting in a line that tracks price more closely.
The interaction between Q and R is what gives the filter its power. The default settings provide a solid baseline, but a true operator will fine-tune these to perfectly match the rhythm of their chosen market.
Tactical Application
The AKF is not just a line; it's a complete framework for viewing the market.
Trend Identification: The primary signal. The filter's color code provides an unambiguous definition of the trend. Teal for an uptrend, Pink for a downtrend. No more guesswork.
Dynamic Support & Resistance: The filter itself acts as a dynamic level. Watch for price to pull back and find support on a rising (Teal) filter in an uptrend, or to be rejected by a falling (Pink) filter in a downtrend.
A Higher-Order Filter: Use the AKF's trend state to filter signals from your primary strategy. For example, only take long signals when the AKF is Teal. This single rule can dramatically reduce noise and eliminate low-probability trades.
This is a professional-grade tool for traders who are serious about gaining a statistical edge. Ditch the lagging averages. Extract the signal from the noise.
المؤشرات والاستراتيجيات
Machine Learning Gaussian Mixture Model | AlphaNattMachine Learning Gaussian Mixture Model | AlphaNatt
A revolutionary oscillator that uses Gaussian Mixture Models (GMM) with unsupervised machine learning to identify market regimes and automatically adapt momentum calculations - bringing statistical pattern recognition techniques to trading.
"Markets don't follow a single distribution - they're a mixture of different regimes. This oscillator identifies which regime we're in and adapts accordingly."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🤖 THE MACHINE LEARNING
Gaussian Mixture Models (GMM):
Unlike K-means clustering which assigns hard boundaries, GMM uses probabilistic clustering :
Models data as coming from multiple Gaussian distributions
Each market regime is a different Gaussian component
Provides probability of belonging to each regime
More sophisticated than simple clustering
Expectation-Maximization Algorithm:
The indicator continuously learns and adapts using the E-M algorithm:
E-step: Calculate probability of current market belonging to each regime
M-step: Update regime parameters based on new data
Continuous learning without repainting
Adapts to changing market conditions
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 THREE MARKET REGIMES
The GMM identifies three distinct market states:
Regime 1 - Low Volatility:
Quiet, ranging markets
Uses RSI-based momentum calculation
Reduces false signals in choppy conditions
Background: Pink tint
Regime 2 - Normal Market:
Standard trending conditions
Uses Rate of Change momentum
Balanced sensitivity
Background: Gray tint
Regime 3 - High Volatility:
Strong trends or volatility events
Uses Z-score based momentum
Captures extreme moves
Background: Cyan tint
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 KEY INNOVATIONS
1. Probabilistic Regime Detection:
Instead of binary regime assignment, provides probabilities:
30% Regime 1, 60% Regime 2, 10% Regime 3
Smooth transitions between regimes
No sudden indicator jumps
2. Weighted Momentum Calculation:
Combines three different momentum formulas
Weights based on regime probabilities
Automatically adapts to market conditions
3. Confidence Indicator:
Shows how certain the model is (white line)
High confidence = strong regime identification
Low confidence = transitional market state
Line transparency changes with confidence
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ PARAMETER OPTIMIZATION
Training Period (50-500):
50-100: Quick adaptation to recent conditions
100: Balanced (default)
200-500: Stable regime identification
Number of Components (2-5):
2: Simple bull/bear regimes
3: Low/Normal/High volatility (default)
4-5: More granular regime detection
Learning Rate (0.1-1.0):
0.1-0.3: Slow, stable learning
0.3: Balanced (default)
0.5-1.0: Fast adaptation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 TRADING STRATEGIES
Visual Signals:
Cyan gradient: Bullish momentum
Magenta gradient: Bearish momentum
Background color: Current regime
Confidence line: Model certainty
1. Regime-Based Trading:
Regime 1 (pink): Expect mean reversion
Regime 2 (gray): Standard trend following
Regime 3 (cyan): Strong momentum trades
2. Confidence-Filtered Signals:
Only trade when confidence > 70%
High confidence = clearer market state
Avoid transitions (low confidence)
3. Adaptive Position Sizing:
Regime 1: Smaller positions (choppy)
Regime 2: Normal positions
Regime 3: Larger positions (trending)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 ADVANTAGES OVER OTHER ML INDICATORS
vs K-Means Clustering:
Soft clustering (probabilities) vs hard boundaries
Captures uncertainty and transitions
More mathematically robust
vs KNN (K-Nearest Neighbors):
Unsupervised learning (no historical labels needed)
Continuous adaptation
Lower computational complexity
vs Neural Networks:
Interpretable (know what each regime means)
No overfitting issues
Works with limited data
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 PERFORMANCE CHARACTERISTICS
Best Market Conditions:
Markets with clear regime shifts
Volatile to trending transitions
Multi-timeframe analysis
Cryptocurrency markets (high regime variation)
Key Strengths:
Automatically adapts to market changes
No manual parameter adjustment needed
Smooth transitions between regimes
Probabilistic confidence measure
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 TECHNICAL BACKGROUND
Gaussian Mixture Models are used extensively in:
Speech recognition (Google Assistant)
Computer vision (facial recognition)
Astronomy (galaxy classification)
Genomics (gene expression analysis)
Finance (risk modeling at investment banks)
The E-M algorithm was developed at Stanford in 1977 and is one of the most important algorithms in unsupervised machine learning.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 PRO TIPS
Watch regime transitions: Best opportunities often occur when regimes change
Combine with volume: High volume + regime change = strong signal
Use confidence filter: Avoid low confidence periods
Multi-timeframe: Compare regimes across timeframes
Adjust position size: Scale based on identified regime
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT NOTES
Machine learning adapts but doesn't predict the future
Best used with other confirmation indicators
Allow time for model to learn (100+ bars)
Not financial advice - educational purposes
Backtest thoroughly on your instruments
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏆 CONCLUSION
The GMM Momentum Oscillator brings institutional-grade machine learning to retail trading. By identifying market regimes probabilistically and adapting momentum calculations accordingly, it provides:
Automatic adaptation to market conditions
Clear regime identification with confidence levels
Smooth, professional signal generation
True unsupervised machine learning
This isn't just another indicator with "ML" in the name - it's a genuine implementation of Gaussian Mixture Models with the Expectation-Maximization algorithm, the same technology used in:
Google's speech recognition
Tesla's computer vision
NASA's data analysis
Wall Street risk models
"Let the machine learn the market regimes. Trade with statistical confidence."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Developed by AlphaNatt | Machine Learning Trading Systems
Version: 1.0
Algorithm: Gaussian Mixture Model with E-M
Classification: Unsupervised Learning Oscillator
Not financial advice. Always DYOR.
FVG Inversion + Improved Order Block (15/30/60) — by samoedlooking for ifvg + ob 15/30/60m
gives short and long signals
ICC Indicator V6An adjustable Pine Script v6 “ICC” indicator that detects Indication → Correction → Continuation market structure across timeframes with optional volume confirmation, plots swing levels and zones, shows editable labels and toggleable yellow buy/sell triangle signals, and includes debug tools for tuning.
Composite Time ProfileComposite Time Profile Overlay (CTPO) - Market Profile Compositing Tool
Automatically composite multiple time periods to identify key areas of balance and market structure
What is the Composite Time Profile Overlay?
The Composite Time Profile Overlay (CTPO) is a Pine Script indicator that automatically composites multiple time periods to identify key areas of balance and market structure. It's designed for traders who use market profile concepts and need to quickly identify where price is likely to find support or resistance.
The indicator analyzes TPO (Time Price Opportunity) data across different timeframes and merges overlapping profiles to create composite levels that represent the most significant areas of balance. This helps you spot where institutional traders are likely to make decisions based on accumulated price action.
Why Use CTPO for Market Profile Trading?
Eliminate Manual Compositing Work
Instead of manually drawing and compositing profiles across different timeframes, CTPO does this automatically. You get instant access to composite levels without spending time analyzing each individual period.
Spot Areas of Balance Quickly
The indicator highlights the most significant areas of balance by compositing overlapping profiles. These areas often act as support and resistance levels because they represent where the most trading activity occurred across multiple time periods.
Focus on What Matters
Rather than getting lost in individual session profiles, CTPO shows you the composite levels that have been validated across multiple timeframes. This helps you focus on the levels that are most likely to hold.
How CTPO Works for Market Profile Traders
Automatic Profile Compositing
CTPO uses a proprietary algorithm that:
- Identifies period boundaries based on your selected timeframe (sessions, daily, weekly, monthly, or auto-detection)
- Calculates TPO profiles for each period using the C2M (Composite 2 Method) row sizing calculation
- Merges overlapping profiles using configurable overlap thresholds (default 50% overlap required)
- Updates composite levels as new price action develops in real-time
Key Levels for Market Profile Analysis
The indicator displays:
- Value Area High (VAH) and Value Area Low (VAL) levels calculated from composite TPO data
- Point of Control (POC) levels where most trading occurred across all composited periods
- Composite zones representing areas of balance with configurable transparency
- 1.618 Fibonacci extensions for breakout targets based on composite range
Multiple Timeframe Support
- Sessions: For intraday market profile analysis
- Daily: For swing trading with daily profiles
- Weekly: For position trading with weekly structure
- Monthly: For long-term market profile analysis
- Auto: Automatically selects timeframe based on your chart
Trading Applications for Market Profile Users
Support and Resistance Trading
Use composite levels as dynamic support and resistance zones. These levels often hold because they represent areas where significant trading decisions were made across multiple timeframes.
Breakout Trading
When composite levels break, they often lead to significant moves. The indicator calculates 1.618 Fibonacci extensions to give you clear targets for breakout trades.
Mean Reversion Strategies
Value Area levels represent the price range where most trading activity occurred. These levels often act as magnets, drawing price back when it moves too far from the mean.
Institutional Level Analysis
Composite levels represent areas where institutional traders have made significant decisions. These levels often hold more weight than traditional technical analysis levels because they're based on actual trading activity.
Key Features for Market Profile Traders
Smart Compositing Logic
- Automatic overlap detection using price range intersection algorithms
- Configurable overlap thresholds (minimum 50% overlap required for merging)
- Dead composite identification (profiles that become engulfed by newer composites)
- Real-time updates as new price action develops using barstate.islast optimization
Visual Customization
- Customizable colors for active, broken, and dead composites
- Adjustable transparency levels for each composite state
- Premium/Discount zone highlighting based on current price vs composite range
- TPO aggression coloring using TPO distribution analysis to identify buying/selling pressure
- Fibonacci level extensions with 1.618 target calculations based on composite range
Clean Chart Presentation
- Only shows the most relevant composite levels (maximum 10 active composites)
- Eliminates clutter from individual session profiles
- Focuses on areas of balance that matter most to current price action
Real-World Trading Examples
Day Trading with Session Composites
Use session-based composites to identify intraday areas of balance. The VAH and VAL levels often act as natural profit targets and stop-loss levels for scalping strategies.
Swing Trading with Daily Composites
Daily composites provide excellent swing trading levels. Look for price reactions at composite zones and use the 1.618 extensions for profit targets.
Position Trading with Weekly Composites
Weekly composites help identify major trend changes and long-term areas of balance. These levels often hold for months or even years.
Risk Management
Composite levels provide natural stop-loss levels. If a composite level breaks, it often signals a significant shift in market sentiment, making it an ideal place to exit losing positions.
Why Composite Levels Work
Composite levels work because they represent areas where significant trading decisions were made across multiple timeframes. When price returns to these levels, traders often remember the previous price action and make similar decisions, creating self-fulfilling prophecies.
The compositing process uses a proprietary algorithm that ensures only levels validated across multiple time periods are displayed. This means you're looking at levels that have proven their significance through actual market behavior, not just random technical levels.
Technical Foundation
The indicator uses TPO (Time Price Opportunity) data combined with price action analysis to identify areas of balance. The C2M row sizing method ensures accurate profile calculations, while the overlap detection algorithm (minimum 50% price range intersection) ensures only truly significant composites are displayed. The algorithm calculates row size based on ATR (Average True Range) divided by 10, then converts to tick size for precise level calculations.
How the Code Actually Works
1. Period Detection and ATR Calculation
The code first determines the appropriate timeframe based on your chart:
- 1m-5m charts: Session-based profiles
- 15m-2h charts: Daily profiles
- 4h charts: Weekly profiles
- 1D charts: Monthly profiles
For each period type, it calculates the number of bars needed for ATR calculation:
- Sessions: 540 minutes divided by chart timeframe
- Daily: 1440 minutes divided by chart timeframe
- Weekly: 7 days worth of minutes divided by chart timeframe
- Monthly: 30 days worth of minutes divided by chart timeframe
2. C2M Row Size Calculation
The code calculates True Range for each bar in the determined period:
- True Range = max(high-low, |high-prevClose|, |low-prevClose|)
- Averages all True Range values to get ATR
- Row Size = (ATR / 10) converted to tick size
- This ensures each TPO row represents a meaningful price movement
3. TPO Profile Generation
For each period, the code:
- Creates price levels from lowest to highest price in the range
- Each level is separated by the calculated row size
- Counts how many bars touch each price level (TPO count)
- Finds the level with highest count = Point of Control (POC)
- Calculates Value Area by expanding from POC until 68.27% of total TPO blocks are included
4. Overlap Detection Algorithm
When a new profile is created, the code checks if it overlaps with existing composites:
- Calculates overlap range = min(currentVAH, prevVAH) - max(currentVAL, prevVAL)
- Calculates current profile range = currentVAH - currentVAL
- Overlap percentage = (overlap range / current profile range) * 100
- If overlap >= 50%, profiles are merged into a composite
5. Composite Merging Logic
When profiles overlap, the code creates a new composite by:
- Taking the earliest start bar and latest end bar
- Using the wider VAH/VAL range (max of both profiles)
- Keeping the POC from the profile with more TPO blocks
- Marking the composite as "active" until price breaks through
6. Real-Time Updates
The code uses barstate.islast to optimize performance:
- Only recalculates on the last bar of each period
- Updates active composite with live price action if enabled
- Cleans up old composites to prevent memory issues
- Redraws all visual elements from scratch each bar
7. Visual Rendering System
The code uses arrays to manage drawing objects:
- Clears all lines/boxes arrays on every bar
- Iterates through composites array to redraw everything
- Uses different colors for active, broken, and dead composites
- Calculates 1.618 Fibonacci extensions for broken composites
Getting Started with CTPO
Step 1: Choose Your Timeframe
Select the period type that matches your trading style:
- Use "Sessions" for day trading
- Use "Daily" for swing trading
- Use "Weekly" for position trading
- Use "Auto" to let the indicator choose based on your chart timeframe
Step 2: Customize the Display
Adjust colors, transparency, and display options to match your charting preferences. The indicator offers extensive customization options to ensure it fits seamlessly into your existing analysis.
Step 3: Identify Key Levels
Look for:
- Composite zones (blue boxes) - major areas of balance
- VAH/VAL lines - value area boundaries
- POC lines - areas of highest trading activity
- 1.618 extension lines - breakout targets
Step 4: Develop Your Strategy
Use these levels to:
- Set entry points near composite zones
- Place stop losses beyond composite levels
- Take profits at 1.618 extension levels
- Identify trend changes when major composites break
Perfect for Market Profile Traders
If you're already using market profile concepts in your trading, CTPO eliminates the manual work of compositing profiles across different timeframes. Instead of spending time analyzing each individual period, you get instant access to the composite levels that matter most.
The indicator's automated compositing process ensures you're always looking at the most relevant areas of balance, while its real-time updates keep you informed of changes as they happen. Whether you're a day trader looking for intraday levels or a position trader analyzing long-term structure, CTPO provides the market profile intelligence you need to succeed.
Streamline Your Market Profile Analysis
Stop wasting time on manual compositing. Let CTPO do the heavy lifting while you focus on executing profitable trades based on areas of balance that actually matter.
Ready to Streamline Your Market Profile Trading?
Add the Composite Time Profile Overlay to your charts today and experience the difference that automated profile compositing can make in your trading performance.
A+ 0DTE Signal Suite [VWAP/EMA/SR/Volume] By Delta Surge
# What the indicator actually does (quick decode)
* **Bias (15-min):** Price vs VWAP and 13EMA vs 48EMA on 15m.
* **Entry engines:** recent **reclaim/reject** of VWAP/EMA13, **ORB-15** break/retest, **PDH/PDL** reclaim/break, **AVWAP-open** reclaim/reject, **inside-15** break, **squeeze release**, **liquidity sweep + reclaim**, **Delta Surge** (big candle + vol spike).
* **Score → Stars:** more confluence = higher score → ★–★★★★★.
* **Arrows/labels:** ▲/▼ and “BUY CALLS/PUTS + stars”.
* **Stops/Targets:** stop = min(VWAP, EMA13) for calls / max(VWAP, EMA13) for puts. The script marks **1R/2R** (risk multiples) and shows a small **EXIT?** hint if price gives up the “mean”.
> Translation: wait for **trend + reclaim + volume**, take the high-star signals, manage with R-multiples.
---
# Default settings that work well
**Timeframe:** 5-minute for decisions (1–3m only if you’re scalping); leave the 15-minute bias on.
**Inputs to keep ON:** ORB-15, PDH/PDL, AVWAP from open, Delta Surge, Squeeze (optional on very choppy days).
**Star gate:** set **Minimum Score** to **4–5** and only act on **★★★ or higher**.
**Session windows:** ON to avoid lunch chop (already in the script).
---
# Symbol-specific setup
## QQQ
* **Leader:** turn ON **Require Leader Confirm**
**Leader Symbol:** `CME_MINI:NQ1!` (fallback: `NASDAQ:NDX` or `AMEX:QQQ` if no futures)
**Leader TF:** 3m or 5m
* **Vol filter:** use **VXN** instead of VIX if you want (set `vixSymbol = "CBOE:VXN"` and turn ON Require VIX).
* **RVOL threshold:** **1.10–1.25**.
* **Minimum workable R (1R distance):** **0.8–1.2 QQQ points**.
* **Room check (eyeball):** to next S/R/ORB level ≥ **1.5R**.
## SPY
* **Leader:** `CME_MINI:ES1!` ON, 3–5m.
* **Vol filter:** VIX.
* **RVOL:** **1.10–1.30**.
* **Min 1R:** **0.5–0.8 SPY points**.
## SPX
* **Leader:** `CME_MINI:ES1!` ON, 3–5m.
* **Vol filter:** VIX.
* **RVOL:** **1.20–1.35** (0DTE needs juice).
* **Min 1R:** **8–12 SPX points** (quiet vs active).
* **Pro tip:** avoid signals if 15-min ATR < **2 × your R**.
## TSLA
* **Leader (optional):** QQQ (`AMEX:QQQ`) or NQ futures (`CME_MINI:NQ1!`) — pick one and keep it consistent.
* **Vol filter:** usually OFF (TSLA has its own tape), but you can keep it on VIX if you like.
* **RVOL:** **1.10–1.30**.
* **Min 1R:** **1.5–3.0 TSLA points**, or at least **¼ of 15-min ATR**.
---
# When to take the trade (entry checklist)
Only act when MOST boxes are checked:
1. **Trend/Bias:** 15-min bias agrees with your side (bull for calls, bear for puts).
2. **Fresh trigger:** a **reclaim/reject** or **ORB-15 retest** happened within `winBars` (default 3 bars).
3. **Location:** entry is **near VWAP/EMA13** (not in the middle of nowhere) OR it’s a proper **retest** of ORB/PDH/PDL/AVWAP.
4. **Volume:** RVOL ≥ your threshold; Delta Surge helps.
5. **Room:** at least **1.5R** to the next obvious level.
6. **Stars:** **★★★+** (ideally ★★★★/★★★★★).
7. **Leader confirms:** ON and aligned (NQ for QQQ, ES for SPY/SPX, QQQ/NQ for TSLA).
8. **Time of day:** opening drive (first 90m) or power hour; avoid mid-day unless RVOL is strong.
> **Entry:** on the printed **▲/▼** bar close (or the retest candle), set stop at min/max(VWAP, EMA13) as the script implies.
---
# How to manage it
* **Position size by R:** choose a dollar risk; contracts = dollar risk ÷ (R × option delta).
* **1R:** take **partial** at **1R**, move stop to **breakeven**.
* **2R:** scale more or flat the rest near 2R or the next HTF level.
* **Mean exit:** if the orange **EXIT?** prints before 1R, consider bailing or reducing.
**Option selection (0DTE):**
* Expect a drive? pick **0.45–0.55 delta**.
* Expect a grind up after reclaim? **0.30–0.40 delta**.
* If spread is ugly, step out a strike or use next-day expiry.
---
# Reading the signals (plain English)
* **BUY CALLS (▲) + stars:** bullish setup with confluence. More stars = more factors aligned.
* **BUY PUTS (▼) + stars:** bearish setup with confluence.
* **CALL/PUT 1R, 2R:** price hit +1× or +2× your initial risk.
* **CALL/PUT EXIT?**: momentum gave up (price crossed back through the stop reference).
---
# High-probability patterns to favor
1. **Reclaim + Retest + RVOL:** close above VWAP/EMA13, then a small pullback tags a level and holds — ★★★★+ often.
2. **ORB-15 break & retest with RVOL:** especially after a tight inside pre-market; take the retest.
3. **Squeeze release in bias direction:** first expansion bar with RVOL.
4. **Sweep + reclaim at a key HTF level:** wick below prior swing low then fast reclaim above VWAP/EMA13.
**Avoid:** counter-bias signals at noon, signals into a level sitting <1R away, or signals without RVOL.
---
# Suggested starting presets
* **QQQ:** minScore 4–5, rvThresh 1.15, Leader ON (`NQ1!`), VXN optional, act on **★★★+** only.
* **SPY:** minScore 4, rvThresh 1.15–1.25, Leader ON (`ES1!`), VIX ON, **★★★+**.
* **SPX:** minScore 5, rvThresh 1.25–1.35, Leader ON (`ES1!`), VIX ON, **★★★★+** only.
* **TSLA:** minScore 4–5, rvThresh 1.15–1.30, Leader ON (`QQQ` or `NQ1!`), **★★★+**.
---
# Routine for a “10/10” day (as close as trading gets)
1. **Pre-market:** mark PDH/PDL, pre-market high/low, overnight high/low (futures), and any daily SR boxes you trust.
2. **First 15m:** let ORB form; look for reclaim/reject + RVOL alignment; take ★★★★+ with room.
3. **Middle:** trade only if RVOL stays ≥ threshold and signal is at a level (retest).
4. **Power hour:** bias still intact? take the next ★★★★+ retest with room.
5. **Log it:** screenshot entry, R math, and whether 1R/2R printed; refine thresholds per symbol.
---
> No indicator can guarantee 10/10 winners—what this suite does is **stack edges** and make entries/exits **mechanical**. If you stick to bias + reclaim/retest + RVOL + stars + room, and manage by R, you’ll filter most of the low-odds trades and keep yourself on the strong ones.
Bullish & Bearish Once Bar PainterThe Bullish & Bearish First Bar Marker is a simple yet powerful indicator designed to highlight the first bullish and bearish bars in a sequence, helping traders identify key momentum shifts in the market. It marks:Bullish Bars: The first bar where the high and low are both higher than the previous bar (high > high and low > low ), painted green with a "Bullish" label.
Bearish Bars: The first bar where the high and low are both lower than the previous bar (high < high and low < low ), painted red with a "Bearish" label.
To avoid clutter, consecutive bullish or bearish bars are not marked until a non-bullish or non-bearish bar resets the sequence. This makes it ideal for spotting the start of strong upward or downward price movements.
AI-Weighted RSI (Zeiierman)█ Overview
AI-Weighted RSI (Zeiierman) is an adaptive oscillator that enhances classic RSI by applying a correlation-weighted prediction layer. Instead of looking only at RSI values directly, this indicator continuously evaluates how other price- and volume-based features (returns, volatility, volume shifts) correlate with RSI, and then weights them accordingly to project the next RSI state.
The result is a smoother, forward-looking RSI framework that adapts to market conditions in real time.
By leveraging feature correlation instead of static formulas, AI-Weighted RSI behaves like a lightweight learning model, adjusting its emphasis depending on which features are most aligned with RSI behavior during the current regime.
█ How It Works
⚪ Feature Extraction
Each bar, the script computes features: log returns, RSI itself, ATR% (volatility), volume, and volume log-change.
⚪ Correlation Screening
Over a rolling learning window, it measures the correlation of each feature against RSI. The strongest relationships are ranked and selected.
⚪ Adaptive Weighting
Features are standardized (z-scored), then combined using their signed correlations as weights, building a rolling, adaptive prediction of RSI.
⚪ Prediction to RSI Weight
The predicted RSI is mapped back into a “weight” scale (±2 by default). Above 0 = bullish bias, below 0 = bearish bias, with color-graded fills to visualize overbought/oversold pressure.
⚪ Signal Line
A smoothing option (signal length) overlays a moving average of the AI-Weighted RSI for clearer trend confirmation.
█ Why AI-Weighted RSI
⚪ Adaptive to Market Regime
Because the model re-evaluates correlations continuously, it naturally shifts which features dominate, sometimes volatility explains RSI best, sometimes volume, sometimes returns.
⚪ Forward-Looking Bias
Instead of simply reflecting RSI, the model provides a projection, helping anticipate shifts in momentum before RSI itself flips.
█ How to Use
⚪ Directional Bias
Read the RSI relative to 0. Above = bullish momentum bias, below = bearish.
⚪ Overbought / Oversold Zones
Shaded fills beyond +0.5 or -0.5 highlight extremes where RSI pressure often exhausts.
⚪ Divergences
When price makes new highs/lows but AI-Weighted RSI fails to confirm, it often signals weakening momentum.
█ Settings
RSI Length: Lookback for the core RSI calculation.
Signal Length: Smoothing applied to the AI-Weighted RSI output.
Learning Window: Bars used for correlation learning and z-scoring.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
EMA Zonen + Projektion (21, 50 + 200)standard 21ema, 50ema and 200ema,
ema Projection for next 3 Bars,
1% Box above to below all emas.
Confluence Engine Confluence Engine is a practical, non-repainting decision aid that scores market conditions from −100…+100 by combining six proven modules: Trend, Momentum, Volatility, Volume, Structure, and an HTF confirmation. It’s designed for crypto, forex, indices, and stocks, and it fires entries only on confirmed bar closes.
What’s inside
Trend: EMA 20/50/200 alignment plus a Supertrend/KAMA toggle (you choose the baseline).
Momentum: RSI + MACD with confirmed-pivot divergence detection.
Volatility: ATR% and Bollinger Band width vs its average to favor expansion over chop.
Volume: OBV-style cumulative flow slope + volume surge vs SMA×multiplier.
Market Structure: Confirmed pivots, BOS (break of structure) and CHOCH (change of character).
HTF Filter: Closed higher-timeframe context via request.security(..., barmerge.gaps_on, barmerge.lookahead_off).
Why it does not repaint
Signals are computed and plotted on closed bars only.
Pivots/divergences use confirmed pivot points (no forward look).
HTF series are fetched with lookahead_off and use the last closed HTF bar in realtime.
No future bar references are used for entries or alerts.
How to use (3 steps)
Pick a timeframe pair: use a 4–6× HTF multiplier (5m→30m, 15m→1h, 1h→4h, 4h→1D, 1D→1W).
Trade with the HTF: take longs only when the HTF filter is bullish; shorts only when bearish.
Prefer expansion: act when BB width > its average and ATR% is elevated; skip most signals in compression.
Suggested presets (start here)
Crypto (BTC/ETH): 15m→1h, 1h→4h. stLen=10, stMult=3.0, bbLen=20, surgeMul=1.8–2.2, thresholds +40 / −40 (intraday can try +35 / −35).
Forex majors: 15m→1h, 1h→4h. stLen=10–14, stMult=2.5–3.0, surgeMul=1.5–1.8, thresholds +35 / −35 (swing: +45 / −45).
US equities (liquid): 5m→30m/1h, 15m→1h/2h. stMult=3.0–3.5, surgeMul=1.6–2.0, thresholds +45 / −45 to reduce chop.
Indices (ES/NQ): 5m→30m, 15m→1h. Defaults are fine; start at +40 / −40.
Gold/Oil: 15m→1h, 1h→4h. Thresholds +35 / −35, surgeMul=1.6–1.9.
Inputs (plain English)
Use Supertrend (off = KAMA): choose the trend baseline.
EMA Fast/Mid/Slow: 20/50/200 by default for classic stack.
RSI/MACD + divergence pivots: momentum and exhaustion context.
ATR Length & BB Length: volatility regime detection.
Volume SMA & Surge Multiplier: defines “meaningful” volume spikes.
Pivot left/right & “Confirm BOS/CHOCH on Close”: structure strictness.
Enable HTF & Higher Timeframe: confirms the lower timeframe direction.
Thresholds (+long / −short): when the score crosses these, you get signals.
Signals & alerts (IDs preserved)
Entry shapes plot at bar close when the score crosses thresholds.
Alerts you can enable:
CONFLUENCE LONG — long entry signal
CONFLUENCE SHORT — short entry signal
BULLISH BIAS — score turned positive
BEARISH BIAS — score turned negative
Best practices
Focus on signals with HTF agreement and volatility expansion; require volume participation (surge or rising OBV slope) for higher quality.
Raise thresholds (+45/−45 or +50/−50) to reduce whipsaws in choppy sessions.
Lower thresholds (+35/−35) only if you also require volatility/volume filters.
Performance & scope
Works across crypto/FX/equities/indices; no broker data or special feeds required.
No repainting by design; signals/alerts are computed on closed bars.
As with any tool, results vary by regime; always combine with risk management.
Disclosure
This script is for educational purposes only and is not financial advice. Trading involves risk. Test on historical data and paper trade before using live.
APC – Anti-Analysis-Paralysis Kompass APC – Anti-Analysis-Paralysis Compass (Pine v5).
Research/education indicator that compresses trend from 5 timeframes into one compass with Direction, Score, and Coherence (TF agreement). Non-repainting with a high-contrast breakdown table and in-chart help. No financial advice.
What it is
APC is a research/education tool that condenses trend information from five timeframes into a single compass. It shows Direction (↑/↓/→), a weighted Score, and Coherence (how strongly timeframes agree). The script is non-repainting (security(..., lookahead=off)) and includes a readable breakdown panel and example alerts.
How it works
• For each timeframe APC fits a linear regression to price, measures the slope change over k bars, optionally normalizes by ATR%, then maps it to +1 / 0 / −1 using a Deadzone (small slopes → neutral).
• A (weighted) sum of the five signs forms the Score.
• Coherence = |Score| / maxScore (0–100%), i.e., degree of TF alignment.
Quick start (suggested defaults)
• Timeframes: 15m · 1h · 4h · 1D · 1W • Weights: 1, 1, 1, 1.5, 2
• LinReg length: 100 • Slope Δ window: 10
• ATR normalization: ON • Deadzone: 0.03–0.05
• Coherence lock (for example alerts): 60%
Example research filters (non-advisory)
Many users test: Bullish bias when Score ≥ +3 and Coherence ≥ 60%; bearish bias when Score ≤ −3 and Coherence ≥ 60%. These are illustrative defaults only—configure and test your own thresholds.
Optional: pair with Kagi
Use APC for bias/conviction and Kagi turns for timing. Typical Kagi (swing): base 15m–1h, reversal ATR(14) × 1.5–2.5 or 1–3%.
Notes
Raise Deadzone in choppy markets; lower it for earlier flips. On very illiquid or young symbols, lengthen lenLR.
Disclaimer
APC is a research & educational indicator. It does not provide financial advice or recommendations. Use at your own risk. License: MIT.
Deadband Hysteresis Supertrend [BackQuant]Deadband Hysteresis Supertrend
A two-stage trend tool that first filters price with a deadband baseline, then runs a Supertrend around that baseline with optional flip hysteresis and ATR-based adverse exits.
What this is
A hybrid of two ideas:
Deadband Hysteresis Baseline that only advances when price pulls far enough from the baseline to matter. This suppresses micro noise and gives you a stable centerline.
Supertrend bands wrapped around that baseline instead of raw price. Flips are further gated by an extra margin so side changes are more deliberate.
The goal is fewer whipsaws in chop and clearer regime identification during trends.
How it works (high level)
Deadband step — compute a per-bar “deadband” size from one of four modes: ATR, Percent of price, Ticks, or Points. If price deviates from the baseline by more than this amount, move the baseline forward by a fraction of the excess. If not, hold the line.
Centered Supertrend — build upper and lower bands around the baseline using ATR and a user factor. Track the usual trailing logic that tightens a band while price moves in its favor.
Flip hysteresis — require price to exceed the active band by an extra flip offset × ATR before switching sides. This adds stickiness at the boundary.
Adverse exit — once a side is taken, trigger an exit if price moves against the entry by K × ATR .
If you would like to check out the filter by itself:
What it plots
DBHF baseline (optional) as a smooth centerline.
DBHF Supertrend as the active trailing band.
Candle coloring by trend side for quick read.
Signal markers 𝕃 and 𝕊 at flips plus ✖ on adverse exits.
Inputs that matter
Price Source — series being filtered. Close is typical. HL2 or HLC3 can be steadier.
Deadband mode — ATR, Percent, Ticks, or Points. This defines the “it’s big enough to matter” zone.
ATR Length / Mult (DBHF) — only used when mode = ATR. Larger values widen the do-nothing zone.
Percent / Ticks / Points — alternatives to ATR; pick what fits your market’s convention.
Enter Mult — scales the deadband you must clear before the baseline moves. Increase to filter more noise.
Response — fraction of the excess applied to baseline movement. Higher responds faster; lower is smoother.
Supertrend ATR Period & Factor — traditional band size controls; higher factor widens and flips less often.
Flip Offset ATR — extra ATR buffer required to flip. Useful in choppy regimes.
Adverse Stop K·ATR — per-trade danger brake that forces an exit if price moves K×ATR against entry.
UI — toggle baseline, supertrend, signals, and bar painting; choose long and short colors.
How to read it
Green regime — candles painted long and the Supertrend running below price. Pullbacks toward the baseline that fail to breach the opposite band often resume higher.
Red regime — candles painted short and the Supertrend running above price. Rallies that cannot reclaim the band may roll over.
Frequent side swaps — reduce sensitivity by increasing Enter Mult, using ATR mode, raising the Supertrend factor, or adding Flip Offset ATR.
Use cases
Bias filter — allow entries only in the direction of the current side. Use your preferred triggers inside that bias.
Trailing logic — treat the active band as a dynamic stop. If the side flips or an adverse K·ATR exit prints, reduce or close exposure.
Regime map — on higher timeframes, the combination baseline + band produces a clean up vs down template for allocation decisions.
Tuning guidance
Fast markets — ATR deadband, modest Enter Mult (0.8–1.2), response 0.2–0.35, Supertrend factor 1.7–2.2, small Flip Offset (0.2–0.5 ATR).
Choppy ranges — widen deadband or raise Enter Mult, lower response, and add more Flip Offset so flips require stronger evidence.
Slow trends — longer ATR periods and higher Supertrend factor to keep you on side longer; use a conservative adverse K.
Included alerts
DBHF ST Long — side flips to long.
DBHF ST Short — side flips to short.
Adverse Exit Long / Short — K·ATR stop triggers against the current side.
Strengths
Deadbanded baseline reduces micro whipsaws before Supertrend logic even begins.
Flip hysteresis adds a second layer of confirmation at the boundary.
Optional adverse ATR stop provides a uniform risk cut across assets and regimes.
Clear visuals and minimal parameters to adjust for symbol behavior.
Putting it together
Think of this tool as two decisions layered into one view. The deadband baseline answers “does this move even count,” then the Supertrend wrapped around that baseline answers “if it counts, which side should I be on and where do I flip.” When both parts agree you tend to stay on the correct side of a trend for longer, and when they disagree you get an early warning that conditions are changing.
When the baseline bends and price cannot reclaim the opposite band , momentum is usually continuing. Pullbacks into the baseline that stall before the far band often resolve in trend.
When the baseline flattens and the bands compress , expect indecision. Use the Flip Offset ATR to avoid reacting to the first feint. Wait for a clean band breach with follow through.
When an adverse K·ATR exit prints while the side has not flipped , treat it as a risk event rather than a full regime change. Many users cut size, re-enter only if the side reasserts, and let the next flip confirm a new trend.
Final thoughts
Deadband Hysteresis Supertrend is best read as a regime lens. The baseline defines your tolerance for noise, the bands define your trailing structure, and the flip offset plus adverse ATR stop define how forgiving or strict you want to be at the boundary. On strong trends it helps you hold through shallow shakeouts. In choppy conditions it encourages patience until price does something meaningful. Start with settings that reflect the cadence of your market, observe how often flips occur, then nudge the deadband and flip offset until the tool spends most of its time describing the move you care about rather than the noise in between.
Script_Algo - Pivot Trend Rider Strategy📌 This strategy aims to enter a trade in the direction of the trend, catching a reversal point at the end of a correction.
The script is unique due to the combination of three key elements:
🔹 Detection of reversal points through searching for local lows and highs
🔹 Trend filter based on SMA for trading only in the trend direction
🔹 Adaptive risk management using ATR for dynamic stop-losses and take-profits
This allows the strategy to work effectively in various market conditions, minimizing false signals and adapting to market volatility.
⚙️ Principle of Operation
The strategy is based on the following logical components:
📈 Entry Signals:
Long: when a local low (pivot low) is detected in an uptrend
Short: when a local high (pivot high) is detected in a downtrend
📉 Position Management:
Stop-loss and take-profit are calculated based on ATR
Automatic reverse switching when an opposite signal appears
📊 Trend Filter:
Uses SMA to determine trend direction (can be disabled if needed)
🔧 Default Settings
Pivot detection: 11 bars
SMA filter length: 16 periods
ATR period: 14
SL multiplier: 2.5
TP multiplier: 10
Trend filter: enabled
🕒 Usage Recommendations
Timeframe: from 1 hour and above
Assets: cryptocurrency pairs, stocks
🤖 Trading Automation
This script is fully ready for integration with cryptocurrency exchanges via Webhook.
📊 Backtest Results
As seen from testing results, over 4.5 years this strategy could have potentially generated about $5000 profit or 50% of initial capital on the NAERUSDT crypto pair on the 4H timeframe.
Position size: $1000
Max drawdown: $1400
Total trades: 376
Win rate: 38%
Profit factor: 1.34
⚠️ Disclaimer
Please note that the results of the strategy are not guaranteed to repeat in the future. The market constantly changes, and no algorithm can predict exactly how an asset will behave.
The author of this strategy is not responsible for any financial losses associated with using this script.
All trading decisions are made solely by the user.
Trading financial markets carries high risks and can lead to loss of your investments.
Before using the strategy, it is strongly recommended to:
✅ Backtest the strategy on historical data
✅ Start with small trading volumes
✅ Use only risk capital you are ready to lose
✅ Fully understand how the strategy works
🔮 Further Development
The strategy will continue to evolve and improve. Planned updates include:
Adding additional filters to reduce false signals
Optimizing position management algorithms
Expanding functionality for various market conditions
💡 Wishing everyone good luck and profitable trading!
📈 May your charts be green and your portfolios keep growing!
Developed by Script_Algo | MIT License | Version 1.0
Cumulative Returns by Session [BackQuant]Cumulative Returns by Session
What this is
This tool breaks the trading day into three user-defined sessions and tracks how much each session contributes to return, volatility, and volume. It then aggregates results over a rolling window so you can see which session has been pulling its weight, how streaky each session has been, and how sessions relate to one another through a compact correlation heatmap.
We’ve also given the functionality for the user to use a simplified table, just by switching off all settings they are not interested in.
How it works
1) Session segmentation
You define APAC, EU, and US sessions with explicit hours and time zones. The script detects when each session starts and ends on every intraday bar and records its open, intraday high and low, close, and summed volume.
2) Per-session math
At each session end the script computes:
Return — either Percent: (Close−Open)÷Open×100(Close − Open) ÷ Open × 100(Close−Open)÷Open×100 or Points: (Close−Open)(Close − Open)(Close−Open), based on your selection.
Volatility — either Range: (High−Low)÷Open×100(High − Low) ÷ Open × 100(High−Low)÷Open×100 or ATR scaled by price: ATR÷Open×100ATR ÷ Open × 100ATR÷Open×100.
Volume — total volume transacted during that session.
3) Storage and lookback
Each day’s three session stats are stored as a row. You choose how many recent sessions to keep in memory. The script then:
Builds cumulative returns for APAC, EU, US across the lookback.
Computes averages, win rates, and a Sharpe-like ratio avgreturn÷avgvolatilityavg return ÷ avg volatilityavgreturn÷avgvolatility per session.
Tracks streaks of positive or negative sessions to show momentum.
Tracks drawdowns on cumulative returns to show worst runs from peak.
Computes rolling means over a short window for short-term drift.
4) Correlation heatmap
Using the stored arrays of session returns, the script calculates Pearson correlations between APAC–EU, APAC–US, and EU–US, and colors the matrix by strength and sign so you can spot coupling or decoupling at a glance.
What it plots
Three lines: cumulative return for APAC, EU, US over the chosen lookback.
Zero reference line for orientation.
A statistics table with cumulative %, average %, positive session rate, and optional columns for volatility, average volume, max drawdown, current streak, return-to-vol ratio, and rolling average.
A small correlation heatmap table showing APAC, EU, US cross-session correlations.
How to use it
Pick the asset — leave Custom Instrument empty to use the chart symbol, or point to another symbol for cross-asset studies.
Set your sessions and time zones — defaults approximate APAC, EU, and US hours, but you can align them to exchange times or your workflow.
Choose calculation modes — Percent vs Points for return, Range vs ATR for volatility. Points are convenient for futures and fixed-tick assets, Percent is comparable across symbols.
Decide the lookback — more sessions smooths lines and stats; fewer sessions makes the tool more reactive.
Toggle analytics — add volatility, volume, drawdown, streaks, Sharpe-like ratio, rolling averages, and the correlation table as needed.
Why session attribution helps
Different sessions are driven by different flows. Asia often sets the overnight tone, Europe adds liquidity and direction changes, and the US session can dominate range expansion. Separating contributions by session helps you:
Identify which session has been the main driver of net trend.
Measure whether volatility or volume is concentrated in a specific window.
See if one session’s gains are consistently given back in another.
Adapt tactics: fade during a mean-reverting session, press during a trending session.
Reading the tables
Cumulative % — sum of session returns over the lookback. The sign and slope tell you who is carrying the move.
Avg Return % and Positive Sessions % — direction and hit rate. A low average but high hit rate implies many small moves; the reverse implies occasional big swings.
Avg Volatility % — typical intrabars range for that session. Compare with Avg Return to judge efficiency.
Return/Vol Ratio — return per unit of volatility. Higher is better for stability.
Max Drawdown % — worst cumulative give-back within the lookback. A quick way to spot riskiness by session.
Current Streak — consecutive up or down sessions. Useful for mean-reversion or regime awareness.
Rolling Avg % — short-window drift indicator to catch recent turnarounds.
Correlation matrix — green clusters indicate sessions tending to move together; red indicates offsetting behavior.
Settings overview
Basic
Number of Sessions — how many recent days to include.
Custom Instrument — analyze another ticker while staying on your current chart.
Session Configuration and Times
Enable or hide APAC, EU, US rows.
Set hours per session and the specific time zone for each.
Calculation Methods
Return Calculation — Percent or Points.
Volatility Calculation — Range or ATR; ATR Length when applicable.
Advanced Analytics
Correlation, Drawdown, Momentum, Sharpe-like ratio, Rolling Statistics, Rolling Period.
Display Options and Colors
Show Statistics Table and its position.
Toggle columns for Volatility and Volume.
Pick individual colors for each session line and row accents.
Common applications
Session bias mapping — find which window tends to trend in your market and plan exposure accordingly.
Strategy scheduling — allocate attention or risk to the session with the best return-to-vol ratio.
News and macro awareness — see if correlation rises around central bank cycles or major data releases.
Cross-asset monitoring — set the Custom Instrument to a driver (index future, DXY, yields) to see if your symbol reacts in a particular session.
Notes
This indicator works on intraday charts, since sessions are defined within a day. If you change session clocks or time zones, give the script a few bars to accumulate fresh rows. Percent vs Points and Range vs ATR choices affect comparability across assets, so be consistent when comparing symbols.
Session context is one of the simplest ways to explain a messy tape. By separating the day into three windows and scoring each one on return, volatility, and consistency, this tool shows not just where price ended up but when and how it got there. Use the cumulative lines to spot the steady driver, read the table to judge quality and risk, and glance at the heatmap to learn whether the sessions are amplifying or canceling one another. Adjust the hours to your market and let the data tell you which session deserves your focus.
DNSE VN301!, ADX Momentum StrategyDiscover the tailored Pine Script for trading VN30F1M Futures Contracts intraday.
This strategy applies the Statistical Method (IQR) to break down the components of the ADX, calculating the threshold of "normal" momentum fluctuations in price to identify potential breakouts for entry and exit signals. The script automatically closes all positions by 14:30 to avoid overnight holdings.
www.tradingview.com
Settings & Backtest Results:
- Chart: 30-minute timeframe
- Initial capital: VND 100 million
- Position size: 4 contracts per trade (includes trading fees, excludes tax)
- Backtest period: Sep-2021 to Sep-2025
- Return: over 270% (with 5 ticks slippage)
- Trades executed: 1,000+
- Win rate: ~40%
- Profit factor: 1.2
Default Script Settings:
Calculates the acceleration of changes in the +DI and -DI components of the ADX, using IQR to define "normal" momentum fluctuations (adjustable via Lookback period).
Calculates the difference between each bar’s Open and Close prices, using IQR to define "normal" gaps (adjustable via Lookback period).
Entry & Exit Conditions:
Entry Long: Change in +DI or -DI > Avg IQR Value AND Close Price > Previous Close
Exit Long: (all 4 conditions must be met)
- Change in +DI or -DI > Avg IQR Value
- RSI < Previous RSI
- Close–Open Gap > Avg IQR Gap
- Close Price < Previous Close
Entry Short: Change in +DI or -DI > Avg IQR Value AND Close Price < Previous Close
Exit Short: (all 4 conditions must be met)
- Change in +DI or -DI > Avg IQR Value
- RSI > Previous RSI
- Close–Open Gap > Avg IQR Gap
- Close Price > Previous Close
Disclaimers:
Trading futures contracts carries a high degree of risk, and price movements can be highly volatile. This script is intended as a reference tool only. It should be used by individuals who fully understand futures trading, have assessed their own risk tolerance, and are knowledgeable about the strategy’s logic.
All investment decisions are the sole responsibility of the user. DNSE bears no liability for any potential losses incurred from applying this strategy in real trading. Past performance does not guarantee future results. Please contact us directly if you have specific questions about this script.
Speed od Engulfing Candles
Blue candles = fast bullish engulfings.
Magenta candles = fast bearish engulfings.
Everything else stays default.
Weekly/Monthly Golden ATR LevelsWeekly/Monthly Golden ATR Levels
This indicator is designed to give traders a clear, rule-based framework for identifying support and resistance zones anchored to prior period ranges and the market’s own volatility. It uses the Average True Range (ATR) as a measure of how far price can realistically stretch, then projects fixed levels from the midpoint of the prior week and prior month.
Rather than “moving targets” that repaint, these levels are frozen at the start of each new week and month and stay fixed until the next period begins. This makes them reliable rails for both intraday and swing trading.
What It Plots
Weekly Midpoint (last week’s High + Low ÷ 2)
From this mid, the script projects:
Weekly +1 / −1 ATR
Weekly +2 / −2 ATR
Monthly Midpoint (last month’s High + Low ÷ 2)
From this mid, the script projects:
Monthly +1 / −1 ATR
Monthly +2 / −2 ATR
Customization
Set ATR length & timeframe (default: 14 ATR on Daily bars).
Adjust multipliers for Level 1 (±1 ATR) and Level 2 (±2 ATR).
Choose line color, style, and width separately for weekly and monthly bands.
Toggle labels on/off.
How to Use
Context at the Open
If price opens above last week’s midpoint, bias favors upside toward +1 / +2.
If price opens below the midpoint, bias favors downside toward −1 / −2.
Weekly Bands = Short-Term Rails
+1 / −1 ATR: Rotation pivots. Expect intraday reaction.
+2 / −2 ATR: Extreme stretch zones. Reversals or breakouts often occur here.
Monthly Bands = Big Picture Rails
Use these for swing positioning, or as “outer guardrails” on intraday charts.
When weekly and monthly bands cluster → high-confluence zone.
Trade Playbook
Trend Day: Hold above +1 → target +2. Break below −1 → target −2.
Range Day: Fade first test of ±2, scalp toward ±1 or midpoint.
Catalyst/News Day: Use with caution—levels provide context, not barriers.
Risk Management
Place stops just outside the band you’re trading against.
Scale profits at the next inner level (e.g., short from +2, cover partial at +1).
Runners can trail to the midpoint or opposite side.
Why It Works
ATR measures volatility—how far price tends to travel in a given period.
Anchoring to prior highs and lows captures where real supply/demand last clashed.
Combining the two gives levels that are statistically relevant, widely observed, and psychologically sticky.
Trading books from Mark Douglas (Trading in the Zone), Jared Tendler (The Mental Game of Trading), and Oliver Kell (Victory in Stock Trading) all stress the importance of having objective, repeatable reference points. These levels deliver that discipline—removing guesswork and reducing emotional trading
MCDX Plus - Leading Banker with Ichimoku (Swing Opt)Understanding the Indicator
Components:
Green Bars (Retailer): Inverse on top (stacked from 20 downward), represent retail momentum. High values (>15) with a lime background signal retail dominance—often a sell or avoid zone.
Yellow Bars (Hot Money): Middle layer, indicate speculative momentum. Useful as a secondary confirmation.
Red/Fuchsia Bars (Banker): Bottom layer, show institutional (banker/hedge fund) momentum. Red when RSI_Banker ≥ BankerMA, fuchsia otherwise. Crossings above 5, 10, 15 are key buy signals.
Blue Line (Banker MA): Hull Moving Average (HMA) of Banker RSI, tracks institutional trend with minimal lag.
Orange Line (Hot Money MA): HMA of Hot Money RSI.
Green Line (Retailer MA): HMA of Retailer RSI.
Reference Lines: 0 (base), 5 (25% Banker Entry), 10 (50% Banker Building), 15 (75% Banker Control), buildThreshold (2.0 for early signals).
Backgrounds: Red (RSI_Banker > 15, strong buy), Lime (RSI_Retailer > 15, sell/avoid), Blue (earlyBuildSignal, potential entry).
Precision Features:
HMAs reduce lag for faster cross signals.
Shortened MA periods (default 8) align with quick price moves.
PriceEMA (50-period) filters entries/exits with trend confirmation.
Pro-Level Usage Strategy
1. Master Entry Timing
Signal: Look for a Golden Cross (Banker MA crosses above Retailer MA or Hot Money MA) + red bars >5 + price > priceEMA (50-period EMA of close) + blue background (earlyBuildSignal).
Why It Works: The HMA’s low lag catches early institutional buying (red bars rising), while price > priceEMA confirms an uptrend. The blue background (RSI_Banker > 2, positive ROC, volume > volMA) flags pre-breakout accumulation.
Pro Action:
Enter a small position on the Golden Cross with blue background.
Add to the position as red bars hit 10, confirmed by volume spikes (volume > volMA).
Set a stop-loss 2-3% below the recent low or the 20-period price EMA.
Target a take-profit at 10-15% or when red bars approach 15.
2. Nail Exit Timing
Signal: Look for a Dead Cross (Banker MA crosses below Retailer MA or Hot Money MA) + green bars >15 + price < priceEMA + lime background.
Why It Works: The HMA’s precision flags waning institutional interest (red bars falling), while green bars >15 and a lime background indicate retail overextension—a classic reversal point. Price < priceEMA confirms a downtrend.
Pro Action:
Exit partial profits on the Dead Cross if red bars drop below 10.
Full exit when green bars >15 and lime background appear, with a stop-loss moved to break-even.
Target a re-entry on the next Golden Cross if red bars recover.
3. Use Cross Signals as Triggers
Golden Cross (Buy): Banker MA > Retailer MA or Hot Money MA. Confirm with red bars >5 and price > priceEMA.
Dead Cross (Sell/Avoid): Banker MA < Retailer MA or Hot Money MA. Confirm with green bars >15 and price < priceEMA.
Pro Action:
Set TradingView alerts for these conditions (e.g., "GC: Banker > Retailer MA and Price > EMA50" for buy).
Use multiple timeframes (e.g., 1H for entry, 4H for exit) to filter noise.
Combine with candlestick patterns (e.g., bullish engulfing for entry) for confirmation.
4. Leverage Backgrounds for Momentum
Red Background (RSI_Banker > 15): Strong institutional control—hold or add to longs.
Lime Background (RSI_Retailer > 15): Retail dominance—exit or short (if your broker allows).
Blue Background (earlyBuildSignal): Early banker accumulation—prepare for entry, watch for Golden Cross.
Pro Action:
Scale into trades during red zones, scale out in lime zones.
Use blue zones to anticipate breakouts, entering only after cross confirmation.
5. Optimize with Volume and Price
Volume Confirmation: Enter only when volume > volMA (10-period SMA) during Golden Cross or red bar rises.
Price Action: Align entries with support/resistance breaks, exits with trendline breaks.
Pro Action:
Add a volume oscillator (e.g., OBV) to your chart to confirm spikes.
Use Fibonacci retracement (e.g., 50% level) with MCDX signals for precise targets.
6. Pro Risk Management
Position Sizing: Risk 1-2% of capital per trade, adjusting based on red bar height (e.g., larger size at 15).
Stop-Loss: Dynamic—below recent low for entries, above recent high for exits, or trailing 2% below price EMA.
Take-Profit: Scale out at 5-10-15 red bar levels or key price targets (e.g., 20% gain).
Risk-Reward: Aim for 1:3 or better, validated by backtesting.
Ichimoku Cloud
What It Does: Combines five lines—Tenkan-sen (conversion line), Kijun-sen (base line), Senkou Span A/B (cloud edges), and Chikou Span (lagging span)—to provide trend direction, support/resistance, and momentum. The cloud (area between Span A and B) acts as a dynamic zone to filter trades.
Benefits for MCDX Plus:
Trend Confirmation: Entry is stronger when a Golden Cross (Banker MA > Retailer MA) occurs above the cloud (bullish), or exit on Dead Cross below the cloud (bearish). This aligns with priceEMA (50-period) filtering.
Support/Resistance: The cloud’s edges (e.g., Senkou Span B) can act as profit targets or stop-loss levels, enhancing precision on CleanSpark’s sharp moves.
Leading Edge: The Tenkan-sen (default 9-period) and Kijun-sen (default 26-period) cross can signal momentum shifts before MCDX crosses, complementing the blue earlyBuildSignal.
Visual Clarity: Adds a contextual layer to your chart, making it easier to see if red bars >5 align with a bullish cloud breakout.
Drawbacks:
Complexity: Requires learning (e.g., cloud thickness indicates strength), which might clutter your workflow if you’re focused solely on red bars.
Lag in Volatile Markets: The cloud’s 26-period base can lag in fast reversals
Best For: Swing traders or those wanting a holistic trend filter. Backtests on similar scripts (e.g., Smart Money Flow Pro + Ichimoku) show 70-80% accuracy when cloud aligns with MCDX signals.
TURT Donchian Ladder v3.13How to trade TURT+ with the v3.13 script
1) Pick the system & arm the entry
• In the script, choose System = S1 (20D) or S2 (55D).
The HUD always shows both rails for reference, but the ladder (Entry/+Adds) uses the system you pick.
• Your Entry is shown as Pivot + 0.1×N (rounded).
• Place a stop-limit “parent” order at that Entry price. (Classic Turtle uses an entry stop; I suggest a tight limit offset so you don’t chase a blow-through.)
• Initial stop = N2 = Entry − 2×N (rounded). Put that in immediately.
If you like only confirming on a bar close, leave confirmClose = true and place the parent after the close that breaks out. If you want intrabar fills, set confirmClose = false and keep the stop-limit active intraday.
2) Size it the way you planned
• Set acctEquity / riskCapPct / posCapUSD / entryFrac / entryRiskFrac / sizingMode.
• HUD gives Rec Entry Qty (when flat) and, once in, it shows:
• Next Rung (price)
• Suggested AddShares (honors RiskCap & PosCap)
• Proj Stop if Add (ratcheted N2)
• A limiter note (RiskCap or PosCap) if you’re constrained.
3) After entry fills, stage the ADDs (only at fixed +N steps)
• Adds are NOT “every Donchian break.” You add only at:
• Add-1 = Entry + 0.5×N
• Add-2 = Entry + 1.0×N
• Add-3 = Entry + 1.5×N (optional)
• Use the HUD’s Suggested AddShares for each rung (it respects your RiskCap/PosCap).
• Place stop-limit orders for each add (either immediately as a contingent OTO chain that arms only after Entry fills, or you arm each add when price approaches—your choice).
• On each add fill, ratchet the catastrophic stop for the entire position to Last-Add − 2×N (the script and HUD show Proj Stop if Add so you know where it will land). Never move it lower.
Pro tip: If your broker supports OTO/OTOCO:
• OTO parent = Entry stop-limit.
• On fill, fire an OCO with the N2 stop (no target), and also stage child stop-limits for Add-1 / Add-2 / Add-3 with the correct sizes. If your broker can’t chain that deep, just use the script’s alerts (Entry/Add-1/Add-2/Add-3/Exits) to place/adjust orders quickly.
4) Exits (two layers)
• Catastrophic (always on): the N2 stop you’re ratcheting (Last-Add − 2×N).
• Trend exits (runner):
• S1: 10-low close (HUD shows it).
• S2: 20-low close (HUD shows it).
• Profit-taking (optional): sell ~50% at +2.5R to +3R vs current N2; let the runner trail with 10-low/20-low. You can keep N2 as a hard backstop.
5) Should you pre-set everything or buy live?
Both work; pick the style that fits you:
Preset (Turtle-pure, rules-based)
• ✅ You won’t miss the breakout; minimal discretion.
• ✅ Broker handles fills even if you’re away.
• ⚠️ You may get the occasional intraday “poke” (use confirmClose + place after close if you want fewer).
Buy on break manually
• ✅ Lets you check tape/volume or any extra gates before clicking.
• ⚠️ Higher chance of slippage or of simply missing the trigger.
A nice hybrid: place the Entry order, then arm Add-1/2/3 when price is nearing each rung and the HUD shows Suggested AddShares > 0 (green risk read).
⸻
6) Quick checklist per trade
1. System: S1 or S2?
2. Levels: Entry / Add-1 / Add-2 / Add-3 / 10-low / 20-low / N2 (rounded).
3. Sizing: confirm RiskCap/PosCap; HUD shows Suggested AddShares and limiter.
4. Orders:
• Parent Entry stop-limit.
• N2 stop (rounded).
• Stage adds (stop-limits) with sizes from HUD.
5. On fill: ratchet stop to Last-Add − 2×N; adjust remaining adds and sizes.
⸻
7) Example with your MU position (pattern)
• You’re already in: set entryQty and entryPman in the inputs to match your fill.
• HUD now focuses on Next Rung, Suggested AddShares, and Proj Stop if Add.
• If Suggested AddShares = 0 and limiter says RiskCap or PosCap, you’ll still see the next rung price and Proj Stop if Add so you can decide whether to override.
⸻
Bottom line
• Entry: buy the Donchian breakout + 0.1N with a stop-limit (Turtle style).
• Adds: only at +0.5N steps, sized by HUD; not on every future Donchian break.
• Stops: keep (and ratchet) the N2 catastrophic; trail runner on 10-low / 20-low.
If you want, tell me your broker/platform and I’ll map this to exact order ticket types (stop-limit/OTO/OCO) and a tiny checklist you can keep next to your screen.
Auto Slope Extremes ChannelAuto Slope Extremes Channel
Expanding channel that locks onto the highest high and lowest low of the slope between A and B.
This indicator builds a dynamic channel between two anchors, A and B.
Unlike fixed-width channels, it adapts to the slope of the leg between A and B and expands until:
• The upper channel line touches the highest candle in that slope.
• The lower channel line touches the lowest candle in that slope.
This method ensures that the channel edges are defined only by the single most extreme high and the single most extreme low within the selected leg. No other candles in the range touch the edges.
A centerline is drawn midway between the two extremes, and small triangle markers highlight the exact candles that determine the upper and lower boundaries.
Features
• Anchored channel defined by two user-selected points (A and B).
• Expands to fit the highest high and lowest low of the slope between A and B.
• Optional centerline and channel fill.
• Extend lines left, right, or both.
• Customizable line widths and colours.
Liquidity HeatmapDescription: This script calculates liquidity based on CME data and visualizes it
on the chart as a heatmap. Areas with high volumes of liquidity will
be highlighted, providing insights into market activity.
Note: This script assumes that you have access to CME data and that the data is
available in the TradingView environment.