Thuonggsclap- Preferred indicator: 5m wave, mainly using Scalps
- MA9: timing for entry
- EMA34: short-term trend (scalp)
- EMA89: medium-term trend
- EMA200: major trend / noise filter
👉 Suggestions:
- Only BUY when price > EMA34 & EMA89
- Avoid SELL when price is still above EMA200
指标和策略
Chotkiy Rasklad 1.5Chotkiy Rasklad v1.5
Chotkiy Rasklad v1.5 is a professional-grade Multi-Timeframe (MTF) market scanner designed for precision day trading and scalping.
Unlike standard indicators that lag, this system focuses on Confluence . It visualizes the alignment of Price Action, Institutional Trend Filters, and Volatility across 6 timeframes simultaneously (1m to Daily).
New in v1.5: Integration of the ADX Color Engine to visually identify trend strength and "Overheated" (Parabolic) states instantly.
🚀 CORE FEATURES
MTF Dashboard: A real-time heads-up display monitoring 1m, 5m, 15m, 1h, 4h, and 1D timeframes. Trend Confluence Algorithm: Signals are generated only when Heikin Ashi structure aligns with SMA 200, EMA 200, and VWAP. ADX Volatility Engine: Color-coded ADX cells to filter out chop and highlight extreme momentum. Session Awareness: Automatically flags the "Opening Mess" and specific trading sessions to provide context. No Repainting: All logic is based on confirmed candle states and real-time data.
📊 STRATEGY LOGIC
The system uses a strict "Waterfall" logic. A BUY or SELL signal in the "ACTION" row is only generated if ALL the following conditions are met:
1. Institutional Filters (The Bias) To ensure we trade with the "Smart Money," the script checks three key levels: Long Condition: Price > SMA 200 AND Price > EMA 200 AND Price > VWAP. Short Condition: Price < SMA 200 AND Price < EMA 200 AND Price < VWAP.
2. Momentum & Structure (The Trigger) Candle Structure: Requires a sequence of 3 consecutive Heikin Ashi candles (Green for Long, Red for Short) with valid step-up/step-down structures. HARSI Filter: Uses Heikin Ashi RSI to confirm momentum direction (> 50 for Bulls, < 50 for Bears).
3. ADX Volatility Engine (The Safety) The Dashboard displays the raw ADX value with specific background colors to guide your decision: Gray (< 20): NO TRADE ZONE. The market is choppy/consolidating. Signals here are likely fakeouts. Yellow (20 - 25): Waking Up. Volatility is increasing; a trend may be starting. Bright Green (26 - 50): PRIME ZONE. Strong, healthy trend. The best probability for entry. Sky Blue (> 50): EXTREME / PARABOLIC. The trend is overheated. Be cautious of "V-Shape" reversals or exhaustion.
🎯 HOW TO READ THE DASHBOARD
The Dashboard is located in the top-right corner.
Scan the "ACTION" Row: Look for a column (e.g., 5m or 15m) that says BUY (Green) or SELL (Red). If it says WAIT (Gray), the filters do not align.
Verify with ADX: Is the ADX cell below it Green or Yellow? Good. Is it Gray ? Skip the trade. Is it Sky Blue ? Tighten your stop-loss immediately.
Check Higher Timeframes: If you are scalping the 5m, ensure the 15m and 1h columns are also colored in your direction.
⚙️ SETTINGS
Global Filters: Custom lengths for SMA and EMA (Default: 200). HARSI Settings: Sensitivity of the momentum filter. Time Settings: Define your local Opening/Morning/Evening sessions for the "TIME" row status. Dashboard: Toggle visibility, change size (Tiny/Small/Normal), and adjust vertical/horizontal offsets.
⚠️ DISCLAIMER This tool is for educational and informational purposes only. It does not constitute financial advice. Trading involves significant risk. Always manage your risk appropriately. Past performance is not indicative of future results.
© 2026 Sergei Seivach
SK INTRAY SETUPthis indicator help to trade in the primary trend direction with align and in direction of the trend
able bigtrades dom + liquidity sweep This Pine Script is a sophisticated **Order Flow and Liquidity analysis tool** designed for TradingView. It combines volume analysis, multi-exchange data, and price action to identify where institutional "whales" are entering the market.
Below is a detailed guide on how to interpret and use the **BigTrades DOM** indicator.
---
## 1. Core Concept: Big Trades Detection
Instead of looking at raw volume, this indicator uses **Z-Scores** (Standard Deviations). It compares current volume to the average of the last 30 bars (customizable).
* **Tier 1 (Small Circles):** Significant volume, slightly above average.
* **Tier 2 (Medium Circles):** High volume ( by default). These often act as local support/resistance.
* **Tier 3 (Large Circles):** Extreme volume. These represent institutional "Big Trades" that usually lead to trend reversals or major continuations.
---
## 2. Initiative (INIT) vs. Absorbed (ABS)
This is a powerful feature located in the **Confirmation** settings. It looks at what happens *after* a Tier 3 big trade occurs:
* **Initiative (Purple Circle `●`):** High volume occurs, and price **moves strongly** in that direction within bars. This confirms aggressive "Initiative" buying or selling.
* **Absorbed (Yellow Cross `✕`):** High volume occurs, but price **fails to move**. This indicates "Absorption"—where a large limit order (passive seller) is soaking up all the aggressive market buys, often leading to a reversal.
---
## 3. Liquidity Sweep Detection
The script tracks "Pivots" (old highs and lows) and watches for **Stop Runs**.
* **Bullish Sweep (LTL-SWEEP):** Price dips below a previous Low (Liquidity) but immediately closes back above it, usually accompanied by a Big Trade. This is a classic "Stop Hunt" before a move up.
* **Bearish Sweep (LTH-SWEEP):** Price spikes above a previous High but closes below it. This indicates "trapped longs" and potential downside.
* **Visuals:** The script draws a **Dotted Box** and a **Horizontal Line** to mark the swept liquidity zone.
---
## 4. The Mini DOM & Volume Profile
On the right side of your chart, you will see a real-time table:
* **Profile:** A visual histogram of volume distributed at specific price levels.
* **Bid/Ask:** Shows the estimated volume of sellers (Bid) and buyers (Ask) at those specific levels.
* **Delta (Δ):** The net difference. Green means more aggressive buyers; Red means more aggressive sellers.
* **Current Price:** Highlighted in Green to help you see where the "Value" is currently sitting.
---
## 5. Multi-Exchange Aggregation (Crypto Only)
If you are trading a crypto pair (e.g., BTCUSD), the script can fetch volume data from **Binance, Bybit, OKX, Coinbase, and Kraken** simultaneously.
> **Why it matters:** It gives you a "Global" view of volume. If you see a Big Trade on your chart, but the Multi-Exchange data shows high volume across all 5 exchanges, the signal is much more reliable.
---
## 6. How to Trade with this Indicator
### **Strategy A: The Liquidity Reversal**
1. Look for a **Liquidity Sweep** (LTL-SWEEP).
2. Wait for a **Big Trade (Tier 2 or 3)** to appear at the bottom of the sweep.
3. **Entry:** Long when the bar closes back above the sweep level.
4. **Target:** The opposite Liquidity High.
### **Strategy B: Following Initiative**
1. Wait for an **INIT (Purple Circle)** signal.
2. This confirms that the "Big Trade" has successfully pushed the market.
3. **Entry:** Enter in the direction of the INIT signal on the next pullback.
### **Strategy C: Fading Absorption**
1. Price reaches a resistance level.
2. An **ABS (Yellow Cross)** appears.
3. This means buyers are exhausted and being "absorbed" by a large seller.
4. **Entry:** Short on the break of the Absorption candle's low.
---
## 7. Recommended Settings
* **Sensitivity (Sigma):** Set to `2.5` for volatile markets (Crypto) or `2.0` for slower markets (Forex/Stocks).
* **Normalize by ATR:** Keep this **ON**. it ensures that "Big Trades" are calculated relative to current market volatility.
* **Require Big Trade (Sweep):** Keep this **ON** to filter out "fake" sweeps that don't have institutional backing.
SMC Structure [PickMyTrade]Concept & Methodology
This strategy is an implementation of Smart Money Concepts (SMC) logic combined with structured risk management rules. The purpose of the script is to demonstrate how market structure analysis and position sizing logic can be applied in a systematic, rule-based approach.
The design emphasizes consistency, trade management, and controlled risk rather than signal frequency.
How It Works
1. Market Structure Detection
The strategy evaluates market structure using swing points:
Swings are identified using pivot highs and lows with a configurable lookback period.
Break of Structure (BOS) is detected when price breaks a prior swing level, indicating a potential structural shift or continuation.
Order Blocks are identified after a valid BOS and represent the candle range associated with the structure break.
2. Entry Logic
After a valid structure break, the strategy waits for price to retrace into the identified Order Block zone. Optional filters can be enabled to refine entries:
Trend Filter: Uses the 50 EMA to align trades with directional bias.
Volatility Filter: Uses ATR to avoid low-volatility conditions.
Candle Confirmation: Requires a directional candle within the Order Block area.
3. Risk Management Logic
Risk is handled through predefined and configurable rules:
Dynamic Position Sizing: Position size is calculated based on a fixed percentage of account equity and the distance to the stop loss.
Multiple Take-Profit Levels (optional):
TP1 at a fixed risk-to-reward ratio.
TP2 with an optional trailing stop mechanism.
Stop loss placement is derived from structure-based levels.
Settings Guide
Risk and Position Sizing: Controls the percentage of equity risked per trade.
Filters: Enable or disable trend, volatility, and confirmation logic.
Display Options: Toggle structure points, order blocks, and trade labels.
Strategy Explanation (Code Overview)
The script defines realistic strategy properties such as commission, margin, and pyramiding limits to improve backtesting accuracy.
Market structure is identified using pivot-based swing detection, with BOS logic tracking the most recent swing levels. Order Blocks are derived from candles preceding valid structure breaks.
Trade execution occurs only when no active position is present. Entry conditions require price interaction with a valid Order Block and confirmation from enabled filters. Position size is calculated dynamically based on risk settings.
Exit management supports partial exits at predefined risk-to-reward levels, with optional trailing stop logic for remaining position size.
A statistics panel is displayed on the chart to summarize current settings and account information. This panel is informational only and does not affect strategy logic or results.
Disclaimer
This strategy is provided for educational and analytical purposes only. It does not constitute financial or investment advice. Past performance does not guarantee future results. Users should independently evaluate and backtest the strategy on their own instruments and timeframes before using it for any trading decisions.
Double SweepsThis is a basic script that shows double sweeps and closes back inside the range of the first candle. Essentially, Candle 1 gets swept, Candle 2 closes back inside candle 1, and then candle 3 sweeps candle 2 and closes back inside candle 1's range. These can be strong reversal signs when used with higher timeframe context.
Two toggleable options are only showing setups that align with the hourly bias and how the previous hourly candle closed.
Other option is to only show setups in the first 20 minutes of a new hourly candle when we are looking for hourly manipulation to end, thus meaning reversal.
DO NOT TRADE THIS MECHANICALLY!
Candle PatternsOverview
This indicator is a modernized, high-signal-quality candlestick pattern detector designed for the price-action trader. Unlike standard pattern recognizers that trigger on "weak" or indecisive candles (Dojis), this script uses a Momentum-Verified Logic to ensure that multi-candle patterns represent true market conviction.
The script scans for the most reliable reversal and continuation patterns while providing a built-in Moving Average filter to align signals with the prevailing trend.
Key Features
1. Momentum-Verified Logic (Anti-Doji)
Standard patterns like 3 Soldiers or 3 Crows often trigger with small-bodied candles that lack momentum. This indicator uses a custom isStrong() function requiring the candle body to be at least 50% of the total candle range. This effectively filters out weak signals and "leggy" wicks, showing you only when the bulls or bears are truly in control.
2. "Real Body" Engulfing
To reduce noise, the Engulfing logic is calculated using the Real Bodies (Open to Close). The current candle's body must completely engulf the previous candle's body, ignoring the "noise" of long wicks (thicks).
3. Integrated MA Filter
Trade only in the direction of the trend. When the MA Filter is enabled, bullish signals are only shown if price is above the Moving Average, and bearish signals if price is below it.
Supported Patterns
Engulfing (Body-to-Body): Powerful reversal signals ignoring wick noise.
3 Soldiers & 3 Crows: Momentum-verified (no Dojis allowed).
Morning Star & Evening Star: Three-candle bottom/top reversal patterns.
Meeting Line: Strike patterns where closing prices align.
Piercing Line & Dark Cloud: Deep-penetration reversal signals.
Harami: Traditional "inside bar" reversal setups.
How to Use
Select Your Patterns: Use the Settings menu to toggle specific patterns on or off.
Trend Alignment: Enable the "MA Filter" and set your period (e.g., 50 or 200) to filter for high-probability trend-following setups.
Y-Axis Alignment: For the best experience, ensure your Price Scale is set to "Merge All Scales into One (Right)" to keep labels perfectly pinned to price action.
Technical Details
Version: Pine Script v5
Overlay: Yes (Plots directly on candles)
Alerts: Compatible with alertcondition for "Once Per Bar Close" notifications.
Previous Day, Pre Market and ORB LevelsDescription
This indicator is designed for intraday traders who need significant price levels—Previous Day, Premarket, and Opening Ranges—without the visual clutter that typically plagues multi-level indicators.
Unlike standard indicators that draw lines across your entire chart history, this script focuses purely on the current trading day. It draws levels starting from the daily open and extends them into the future, keeping your historical price action clean and readable.
Key Features
Previous Day Levels: Automatically plots Previous Day High (PDH), Low (PDL), and Close (PDC).
Premarket Levels: Tracks the High and Low of the premarket session (04:00 – 09:30 NY).
Opening Range Breakout (ORB): Automatically detects and plots the 5-minute and 15-minute Opening Range Highs and Lows.
Clean Charting: Lines and labels are only drawn for the current active day. Old levels from previous days are automatically removed to prevent "chart noise."
Fully Customizable: Toggle any level on/off and customize colors to match your chart theme via the settings menu.
How It Works
Daily Data: Uses request.security to fetch the previous day's High, Low, and Close without repainting.
Session Logic: The script utilizes specific time sessions (set to New York time) to capture the Premarket range and the first 5 and 15 minutes of the regular session for ORB calculations.
Dynamic Drawing: Using Pine Script's line.new and label.new functions, the indicator draws levels only on the last bar, ensuring the lines stay relevant to the current price action.
RSI like Volume Bars + MARsi bars that appear the way volume bars do to give a cleaner look with a moving average throughout the day to catch momentum and trends.
Market Dashboard: Vol %, Trend, ATR (Custom Colors)Market Dashboard: Volume %, Trend & ATR
This indicator provides a compact at-a-glance market dashboard directly on your chart, helping you quickly assess order flow bias, trend direction, and volatility without clutter.
What it shows:
Bull vs Bear Volume % over a customizable lookback, with flexible doji handling (ignore, assign, or split).
Trend direction using EMA crossovers on both the current timeframe and a higher timeframe for context.
ATR value with an optional percentage-of-price display to gauge volatility and position sizing.
Key features:
Fully customizable colors, text size, and table position
Higher timeframe trend confirmation
Clean table design that updates on the latest bar only
Ideal for traders who want quick confirmation before entries, improved market bias awareness, and better risk/volatility context while scalping or swing trading.
Weinstein Stage AnalysisWeinstein Stage Analysis
This is an enhanced version of Stan Weinstein's classic Stage Analysis, optimized for visual clarity on dark themes. The indicator instantly colors your candlesticks based on the current Weinstein Stage using a bright, fully opaque color scheme that stands out strongly even on dark charts.
Key Features:
- Uses Weekly 30-period SMA (customizable length) as the primary reference line
- Supports "Within Range %" parameter – set to 0% for super-strong stocks that must stay clearly above/below the MA
- Four distinct stages with vivid colors:
• Stage 1 (Accumulation) – Bright Cyan (#00FFFF) – Stock is basing or consolidating near the MA
• Stage 2 (Uptrend) – Bright Green (#00CD00) – Strong uptrend, price clearly above the weekly MA
• Stage 3 (Topping) – Bright Orange (#FFAA00) – Price is still above MA but weakening (potential distribution)
• Stage 4 (Downtrend) – Bright Red (#FF0000) – Strong downtrend, price clearly below the weekly MA
- Automatic stage transition logic with perfect color persistence (no flickering)
- Super visible on both light and dark themes – colors are 100% opaque and highly saturated
- Plots the Weekly 30 SMA as a thick white line for easy reference
How to Use:
1. Add to any chart (works best on daily or weekly timeframes)
2. For very strong momentum stocks, set "Within Range %" to 0% – this forces the indicator to only show Stage 2 when price is clearly above the MA
3. Use default 30-period length or adjust based on your preference
4. Watch for clean stage transitions – especially the switch from Stage 3 (orange) to Stage 4 (red) as a strong sell signal, or Stage 1 (cyan) to Stage 2 (green) as a powerful buy signal
Neeson Crypto Cycle - Super Enhanced EditionThe "Neeson Crypto Cycle - Super Enhanced Edition": A Philosophical and Practical Framework for Market Analysis
Originality & Core Philosophy
Most trading indicators focus on a single domain: pure price action, a specific economic theory, or a handful of technical oscillators. The "Neeson Crypto Cycle" breaks this paradigm. Its fundamental originality lies not in inventing one new mathematical formula, but in architecting a multi-dimensional, multi-timeframe convergence framework. It operates on a core philosophical premise: financial markets are Complex Adaptive Systems (CAS) influenced by a symphony of concurrent cycles. These cycles range from mathematical and technical ones visible on the chart, to fundamental economic rhythms, down to collective human psychology and even speculative meta-patterns.
The script is built as a "dashboard of dashboards," attempting to quantify and visualize these disparate layers on a single pane. It does not claim predictive certainty but aims to provide a holistic situational awareness, allowing the trader to identify when multiple, unrelated cycles from different domains align (convergence) or conflict (divergence).
What It Does & How It Achieves It
The indicator functions as a comprehensive market-phase and sentiment analysis engine implemented directly on the TradingView chart. It is an overlay indicator that provides visual plots, background coloring, signal labels, and, most notably, extensive multi-table data panels.
Its implementation can be broken down into several operational layers:
1. The Core Technical Cycle Layer:
This is the foundational price-based engine. It simultaneously tracks multiple proprietary cyclical models derived from moving average crossovers with non-standard periods believed to capture crypto-specific rhythms.
CCT Pi Cycle: Uses the interaction between a 150-period EMA / 471-period SMA pair (for "bottom" identification) and a 111-period SMA / (350-period SMA * 2) pair (for "top" identification). It identifies golden/death crosses within these specific pairs.
Atlantean Signals: A variant using similar periods (471, 150, 350, 111) but with different multipliers (e.g., 0.745) and crossover logic to define "Market Bottom," "Bull Market Start," and "Market Top" events.
Bitcoin Cycle: Based on the interaction between a 116-period SMA and a doubled 365-period SMA.
Golden Pi Cycle: Another variant using SMAs of 111, 350, 150, and 471 periods.
These are not just four random moving average systems; they are distinct models targeting different aspects of the purported "Pi-based" and long-term cyclicality in Bitcoin's price history. The script visually plots these lines and labels their crossover events.
2. The Market Phase & Structural Context Layer:
Background Coloring: It dynamically colors the chart background (blue for "Bottom to Top" phase, orange for "Top to Bottom" phase) based on the sequential logic of Atlantean signals, providing immediate visual context for the perceived market regime.
Halving Event Annotations: It marks key historical and projected Bitcoin halving dates with vertical lines and labels, anchoring price action to this fundamental supply schedule.
3. The Quantitative Dashboard Layer (Technical & On-Chain):
This is where the script transitions from chart plotting to an information system. It renders multiple fixed tables on the chart (bottom-left, bottom-center, bottom-right) only on the last bar.
Technical Sentiment Dashboard (Right): A massive table aggregating over a dozen classic and advanced technical indicators (RSI, MACD, Bollinger Bands, Stochastic, ADX, Ichimoku, Parabolic SAR, Fibonacci levels, etc.). For each, it shows a calculated Status (e.g., "Overbought"), a numeric Value, and a concise Advice (e.g., "Sell"). It then groups these into "Cycle Indicators" (status of the core models above) and "Risk Management" metrics (Max Drawdown, Sharpe Ratio simulation, volatility).
Synthetic On-Chain Metrics Dashboard (Center): Since TradingView cannot pull real on-chain data, the script ingeniously simulates 80 different on-chain metrics (NVT, MVRV, Hash Rate, Exchange Flows, HODL Waves, S2F, etc.) by deriving them from price and volume data. Each metric displays a name, a simulated value, a signal ("Overvalued"), and a color code. This provides a proxy for the fundamental/network health narrative.
Multi-Cycle Systems Dashboard (Left): This table transcends traditional finance, cataloging the status of various long-wave cycles:
Economic Cycles: Kondratieff (50-60yr), Kuznets (15-25yr), Juglar (7-11yr), Kitchin (3-5yr), etc., each with a hardcoded current phase (e.g., "Recession (2020-2030)"), impact, and advice.
Speculative & Novel Cycles: Lunar, Seasonal, Commodity Super, Debt, and Innovation cycles.
Esoteric Systems: A full celestial (astrological) positioning of planets and a Four Pillars of Destiny (Bazi) reading, each with assigned market "impact" and "advice."
4. The Synthesis & Alert Layer:
Comprehensive Statistics: The right dashboard concludes with a tally of "Bullish vs. Bearish Signals" from across all technical and cycle indicators, generating an "Overall Sentiment" score.
Alert System: It creates TradingView alert conditions for every major crossover event from the core cycle models (CCT, Atlantean, Bitcoin, Golden Pi), allowing for automated notifications.
Underlying Calculation Logic & Rationale
The logic is built on convergence and weighted evidence. The creator's hypothesis appears to be that significant market turning points are rarely signaled by one indicator in isolation. Instead, they occur when:
Multiple Price-Based Cycle Models Align: When the CCT, Atlantean, and Bitcoin cycles all approach a "bottom" or "top" signal near the same time, the probability of a true phase change is considered higher.
Technical Conditions Match the Cycle Phase: A "Bull Market Start" signal is more credible if accompanied by oversold RSI/Stochastic, bullish MACD, and money flowing in (rising OBV).
The Macro Backdrop Supports the Narrative: The script hardcodes a specific macroeconomic worldview (e.g., "Tightening Credit Cycle," "AI Revolution Tech Cycle") to remind the user of the broader environment the price cycles are operating within.
Awareness of "Non-Rational" Drivers: By including astrological and Bazi elements, the script acknowledges that market narratives and crowd psychology can sometimes be influenced by or framed within these non-traditional systems. It doesn't necessarily predict with them but tracks them as potential sentiment catalysts.
The calculations for technical indicators are standard. The novelty is in their collective presentation and the synthetic creation of supporting data realms (on-chain, economic, esoteric) to form a complete, albeit highly speculative, "universe" of market-influencing factors.
How to Use It: A Practical Guide
This is not a "set and forget" system that generates simple buy/sell arrows. It is a decision-support and research tool.
Market Phase Identification: First, look at the background color and the status of the core cycle models in the right dashboard. Are you in a blue "Bottom to Top" phase? Check if the Atlantean "Bull Market Start" is active. This sets your primary bias.
Seeking Convergent Signals: Before acting on a cycle signal, cross-reference it with the Technical Sentiment dashboard. For example, an Atlantean "Market Top" signal is stronger if the RSI and Stochastic also show "Overbought," the MACD is "Bearish," and the Fear & Greed Index is in "Extreme Greed." Look for clusters of agreement.
Context from Other Dimensions: Check the On-Chain dashboard. Does the synthetic data suggest the network is "Overheated" or "Undervalued"? Check the Economic Cycle table. Does the perceived long-wave phase (e.g., "Kondratieff Recession") support a risk-on or risk-off stance? This provides narrative context for your trade thesis.
Risk Management Integration: Before sizing a position, check the Risk Management section. What is the current "Max Drawdown" and "Volatility Risk"? The dashboard suggests position sizing ("Light," "Medium," "Heavy") based on this.
Utilizing Alerts: Set alerts for the key cycle crossovers (CCT, Atlantean, etc.). When an alert triggers, it's your cue to open the chart and perform the full multi-dimensional convergence analysis described above, rather than acting on the alert alone.
In essence, the "Neeson Crypto Cycle" is a conceptual trading terminal. It posits that the modern trader, especially in crypto, must synthesize information from technicals, fundamentals, macroeconomics, and market psychology. By attempting to model all these facets in one place—even through estimation and simulation—it aims to give the user a structured framework for asking the right questions about the current state of the market, rather than providing simplistic, one-dimensional answers. Its value is in the breadth of its perspective and the discipline of multi-factor confirmation it encourages.
Lanovyx# Lanovyx
A comprehensive day trading indicator that generates **Pullback**, **Reversal**, and **Breakout** signals using the confluence of Stochastic oscillator lanes, VWAP standard deviation bands, and a unique Setup Window system.
---
## 🎯 Three Signal Families
| Signal | Label | Best For |
|--------|-------|----------|
| **Pullback (P)** | Blue | Trend continuation days |
| **Reversal (R)** | Green/Red | Range-bound markets |
| **Breakout (B)** | Orange | Compression breakouts |
**Strong signals (★)** appear when multiple confluence factors align—these are your highest probability setups.
---
## 📊 How It Works
**1. Regime Detection**
Lanovyx identifies market regime (Bull Trend, Bear Trend, Ranging, Coiling) using EMA alignment, market structure, and VWAP position.
**2. Setup Windows**
Unlike traditional indicators requiring all conditions on the same bar, Lanovyx uses Setup Windows. When a context event occurs (VWAP band touch, S/R level, divergence), a setup activates and stays valid for N bars, allowing the trigger to fire within that window.
**3. Signal Generation**
When regime, VWAP zone, stochastic position, and setup all align—a signal appears on your chart.
---
## 📋 Clean Info Table
The top-right table shows 6 essential rows for quick decision-making:
- **Regime** — Market direction (Bull/Bear Trend, Ranging, Coiling)
- **VWAP Zone** — Price location (Discount for buys, Premium for sells)
- **Stoch %D** — Oscillator position for timing
- **Session** — Market hours status
- **Last Signal** — Most recent signal type
- **Trade** — Current position status
Enable **Debug Mode** for additional diagnostic information.
---
## ✅ Entry Rules
**LONG Setup:**
✓ Regime = BULL TREND (or RANGING for reversal)
✓ VWAP Zone = Discount (-1, -2, -3)
✓ Stoch %D = 20-50 rising
✓ Session = ACTIVE
✓ Signal = P, R, or B below candle
**SHORT Setup:**
✓ Regime = BEAR TREND (or RANGING for reversal)
✓ VWAP Zone = Premium (+1, +2, +3)
✓ Stoch %D = 50-80 falling
✓ Session = ACTIVE
✓ Signal = P, R, or B above candle
---
## ⚙️ Key Features
- **3 Stochastic Lanes** — Fast (14), Mid (21), Slow (55) for multi-timeframe momentum
- **VWAP + Bands** — Session-anchored with ±1σ, ±2σ, ±3σ bands
- **Market Structure** — Higher High/Low, Lower High/Low detection
- **HTF Bias Filter** — Optional higher timeframe trend alignment
- **Volume Analysis** — Spike, dry-up, and climax detection
- **ATR Momentum** — Strong/Moderate/Weak classification
- **Trade Management** — ATR-based stop loss and profit targets
- **Signal Statistics** — Win rate and R-multiple tracking
- **Non-Repainting** — Strict mode enabled by default
- **Per-Direction Cooldown** — Prevents signal spam
---
## 🎛️ Recommended Settings
| Timeframe | Setup Window | Cooldown |
|-----------|--------------|----------|
| 5-minute | 10 bars | 5 bars |
| 15-minute | 10 bars | 5 bars |
---
## 📈 Best On
- **ETFs**: SPY, QQQ, IWM
- **Tech**: TSLA, NVDA, AMD, META, GOOG, AAPL
- **Futures**: MNQ, MES, NQ, ES
---
## ⚠️ Disclaimer
This indicator is for educational purposes only. It is not financial advice. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
---
## 📝 Version
v3.0
---
**Questions or feedback?** Drop a comment below!
Directional Auto TrendlinesFeatures of This Script
Resistance trendlines: red, only downward connecting highs
Support trendlines: green, only upward connecting lows
Non-repainting, confirmed pivots
Optional pivot labels
Adjustable maxTLines and lineWidth
Market State Engine V2# Market State Engine
**Deterministic Confidence-Scoring System for TradingView**
A professional-grade PineScript v5 indicator that scores market conditions from 0-100, helping traders identify high-quality trading opportunities through systematic structure analysis, VWAP positioning, order flow dynamics, and time-based context.
---
## 🎯 Overview
The **Market State Engine** is not a trading bot—it's a **noise-reduction and opportunity-ranking system** designed to filter market conditions and surface only the highest-quality setups.
Instead of blindly taking every signal, this indicator:
- ✅ **Scores** market conditions objectively (0-100 scale)
- ✅ **Filters** out low-probability setups automatically
- ✅ **Classifies** opportunities into A, A+, and A++ grades
- ✅ **Alerts** only on confirmed structure shifts with supporting context
- ✅ **Keeps the human in control** - provides intelligence, not automation
### Philosophy: Reduce Noise. Enforce Discipline. Surface Quality.
---
## 🚀 Key Features
- **Deterministic Scoring** - No black boxes, fully explainable logic
- **Multi-Factor Analysis** - Combines 4 independent market state components
- **Structure-First Approach** - Only alerts on confirmed pivot breaks
- **VWAP Mean Reversion Logic** - Directional filtering based on VWAP zones
- **Order Flow Proxy** - CVD divergence and confirmation detection
- **Session-Aware Scoring** - Prioritizes high-volume New York sessions
- **Alert De-Duplication** - One alert per unique structure shift
- **Zero Repainting** - Uses confirmed pivots only (left=2, right=2)
- **Fully Configurable** - All parameters exposed as inputs
- **Visual Feedback** - VWAP bands, setup labels, and real-time score panel
---
## 📊 Scoring System (0-100)
The Market State Engine evaluates **four independent components**, each contributing up to **25 points** for a maximum total score of **100**.
### 🎯 Component Breakdown
| Component | Max Points | Description |
|-----------|------------|-------------|
| **VWAP Context** | 25 | Measures price deviation from session VWAP |
| **Structure Shift** | 25 | Confirms pivot breakout (HARD GATE) |
| **CVD Alignment** | 25 | Detects order flow divergence/confirmation |
| **Time-of-Day** | 25 | Identifies high-probability trading sessions |
---
### 1️⃣ VWAP Context (Max 25 Points)
**Purpose:** Identifies extreme price deviations from fair value for mean-reversion opportunities.
VWAP (Volume-Weighted Average Price) is calculated session-anchored to New York market time, with standard deviation bands creating zones of opportunity.
#### Band Structure:
- **1st Band**: ±1σ from VWAP (fair value zone)
- **2nd Band**: ±2σ from VWAP (moderate deviation)
- **3rd Band**: ±3σ from VWAP (extreme deviation)
#### Scoring Logic (Exclusive):
```
Price in 3rd VWAP Band (>2σ and ≤3σ) → +25 points
Price in 2nd VWAP Band (>1σ and ≤2σ) → +15 points
Otherwise (inside 1σ or beyond 3σ) → 0 points
```
**Key Insight:** The further price stretches from VWAP, the higher the probability of mean reversion.
---
### 2️⃣ Structure Shift (Max 25 Points) — **HARD GATE**
**Purpose:** Confirms momentum shift through confirmed pivot breakouts.
⚠️ **CRITICAL:** Structure shift is **mandatory**. If no valid structure shift occurs, the **total score becomes 0** regardless of other factors.
#### Detection Method:
Uses TradingView's `ta.pivothigh()` and `ta.pivotlow()` functions with **locked parameters**:
- **Left bars**: 2
- **Right bars**: 2
- **Source**: Configurable (Wick or Body)
- **Break confirmation**: Candle close only
#### Bullish Structure Shift:
- ✅ Prior swing high exists (confirmed pivot)
- ✅ Current candle **closes above** swing high + tick buffer
- ✅ Must occur in VWAP 2nd or 3rd band
- ✅ **VWAP Filter**: Price must be **at or below VWAP** (lower bands)
#### Bearish Structure Shift:
- ✅ Prior swing low exists (confirmed pivot)
- ✅ Current candle **closes below** swing low - tick buffer
- ✅ Must occur in VWAP 2nd or 3rd band
- ✅ **VWAP Filter**: Price must be **at or above VWAP** (upper bands)
#### Scoring:
```
Valid structure shift → +25 points
No structure shift → Total score = 0
```
**Tick Buffer:** Default 5 ticks (configurable) - prevents false breaks from minor price noise.
---
### 3️⃣ CVD Alignment (Max 25 Points)
**Purpose:** Detects institutional order flow through volume delta analysis.
CVD (Cumulative Volume Delta) is a proxy for order flow:
```
Close > Open → +Volume (buying pressure)
Close < Open → -Volume (selling pressure)
```
#### Scoring Logic:
| Condition | Points | Description |
|-----------|--------|-------------|
| **Divergence** | +25 | Price makes higher high + CVD makes lower high (bearish)Price makes lower low + CVD makes higher low (bullish) |
| **Confirmation** | +20 | Price and CVD both make higher highs or lower lows |
| **Neutral** | 0 | No clear divergence or confirmation |
**Lookback Window:** Last 20 bars (configurable) - prevents stale divergences.
**Key Insight:** Divergences suggest weakening momentum, while confirmations validate the trend.
---
### 4️⃣ Time-of-Day Context (Max 25 Points)
**Purpose:** Prioritizes high-volume, high-volatility New York sessions.
#### Scored Sessions (America/New_York timezone):
| Session | Time Range (NY) | Points | Description |
|---------|-----------------|--------|-------------|
| **Pre-Market** | 03:00 - 04:00 | +25 | Early liquidity injection |
| **Market Open** | 09:30 - 11:30 | +25 | Highest volume period |
| **Off-Hours** | All other times | 0 | Lower probability setups |
**Key Insight:** Structure shifts during active sessions have higher follow-through probability.
---
## 🏆 Setup Classification
Setups are graded based on total score thresholds (configurable):
| Grade | Score Range | Typical Components | Quality Level |
|-------|-------------|-------------------|---------------|
| **A++ Setup** | ≥90 | All 4 factors aligned(VWAP 3rd band + Structure + CVD + Session) | Premium - Rare |
| **A+ Setup** | ≥75 | Structure + VWAP + CVD or Session(3 of 4 factors) | High - Select |
| **A Setup** | ≥60 | Structure + VWAP + Session(Minimum viable setup) | Good - Regular |
| **No Grade** | <60 | Insufficient confluence | Filtered out |
**Default Thresholds:**
- A Setup: 60 points
- A+ Setup: 75 points
- A++ Setup: 90 points
---
## 📥 Installation
### Step 1: Download the Indicator
Download the `market_state_engine.pine` file from this repository.
### Step 2: Add to TradingView
1. Open (www.tradingview.com)
2. Open the **Pine Editor** (bottom panel)
3. Click **"New"** → **"Blank indicator"**
4. Delete all default code
5. Paste the contents of `market_state_engine.pine`
6. Click **"Add to Chart"**
### Step 3: Configure for Your Symbol
1. Click the **gear icon** next to the indicator name
2. Adjust **Tick Size** for your instrument:
- ES futures: `0.25`
- NQ futures: `0.25`
- Stocks: `0.01`
3. Save settings
---
## ⚙️ Configuration
### Symbol Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Tick Size** | 0.25 | Minimum price movement for your symbol |
| **Tick Buffer Count** | 5 | Ticks beyond swing for valid break |
### VWAP Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **VWAP Band 1 (σ)** | 1.0 | 1st standard deviation multiplier |
| **VWAP Band 2 (σ)** | 2.0 | 2nd standard deviation multiplier |
| **VWAP Band 3 (σ)** | 3.0 | 3rd standard deviation multiplier |
### Session Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Session 1** | 0300-0400 | Pre-market window (NY time) |
| **Session 2** | 0930-1130 | Market open window (NY time) |
### Score Thresholds
| Parameter | Default | Description |
|-----------|---------|-------------|
| **A Setup Threshold** | 60 | Minimum score for A grade |
| **A+ Setup Threshold** | 75 | Minimum score for A+ grade |
| **A++ Setup Threshold** | 90 | Minimum score for A++ grade |
### CVD Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **CVD Divergence Lookback** | 20 | Maximum bars for divergence detection |
### Swing Settings
| Parameter | Default | Options | Description |
|-----------|---------|---------|-------------|
| **Swing Detection Method** | Wick | Wick / Body | Use high/low or open/close for pivots |
### Visual Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Show VWAP Bands** | ✅ | Display VWAP and standard deviation bands |
| **Show Setup Labels** | ✅ | Display setup markers on chart |
| **Show Score Panel** | ✅ | Display real-time score breakdown |
---
## 📖 How to Use
### Step 1: Apply to 1-Minute Chart
⚠️ **The indicator is locked to 1-minute timeframe** - do not use on other timeframes.
### Step 2: Understand the Visual Signals
#### Setup Labels
- **Green Triangle (▲)** - Bullish (Long) setup detected
- **Red Triangle (▼)** - Bearish (Short) setup detected
- Label shows **Grade** (A/A+/A++) and **Total Score**
#### VWAP Bands
- **Yellow Line** - Session VWAP (fair value)
- **Blue Bands** - ±1σ (fair value zone)
- **Purple Bands** - ±2σ (moderate deviation)
- **Red Bands** - ±3σ (extreme deviation)
#### Score Panel (Top Right)
Real-time breakdown of all four components:
```
Component Score
VWAP Zone 15/25
Structure 25/25
CVD 20/25
Session 25/25
TOTAL 85/100 (A+)
```
### Step 3: Interpret Signals
#### Valid Long Setup:
✅ Green triangle below candle
✅ Price in **lower VWAP bands** (below VWAP)
✅ Structure shift breaks swing high
✅ Score ≥60
#### Valid Short Setup:
✅ Red triangle above candle
✅ Price in **upper VWAP bands** (above VWAP)
✅ Structure shift breaks swing low
✅ Score ≥60
### Step 4: Set Up Alerts (See Alert Conditions section)
---
## 🚦 Signal Filters (VWAP Zone Logic)
The indicator uses **directional VWAP filtering** to prevent counter-trend signals:
### Long Signals (Green)
**Only allowed when price is AT or BELOW VWAP**
- ✅ Lower 2nd band (-2σ to -1σ)
- ✅ Lower 3rd band (-3σ to -2σ)
- ✅ At VWAP exactly
- ❌ **BLOCKED** in upper bands (above VWAP)
**Logic:** Longs when price is stretched below fair value (mean reversion)
### Short Signals (Red)
**Only allowed when price is AT or ABOVE VWAP**
- ✅ Upper 2nd band (+1σ to +2σ)
- ✅ Upper 3rd band (+2σ to +3σ)
- ✅ At VWAP exactly
- ❌ **BLOCKED** in lower bands (below VWAP)
**Logic:** Shorts when price is stretched above fair value (mean reversion)
---
## 🎨 Visual Elements
### Chart Overlays
| Element | Color | Description |
|---------|-------|-------------|
| **VWAP Line** | Yellow | Session-anchored fair value |
| **±1σ Bands** | Blue | Fair value zone (no score) |
| **±2σ Bands** | Purple | Moderate deviation (15 pts) |
| **±3σ Bands** | Red | Extreme deviation (25 pts) |
| **Swing Highs** | Red ▼ | Confirmed pivot highs |
| **Swing Lows** | Green ▲ | Confirmed pivot lows |
| **Session Background** | Light Green | Active high-value session |
### Setup Labels
**Bullish Setup:**
```
A+
▲ 75
```
Green label below candle, shows grade and score
**Bearish Setup:**
```
A++
▼ 90
```
Red label above candle, shows grade and score
### Score Panel
Real-time table in top-right corner:
- Individual component scores (0-25 each)
- Total score (0-100)
- Current setup grade (A/A+/A++)
- Updates in real-time as market conditions change
---
## 🔔 Alert Conditions
### Setting Up Alerts
#### Method 1: Built-in Alert Conditions
1. Click **"Create Alert"** in TradingView
2. Select **Market State Engine** as condition
3. Choose alert type:
- **Bullish Setup** - Long signals only
- **Bearish Setup** - Short signals only
- **Any Setup** - All signals
4. Set to **"Once Per Bar Close"**
5. Configure notification method (app, email, webhook)
#### Method 2: Custom Alert Message
Alert messages include full breakdown:
```
A+ Setup Detected (Score: 85)
Components: VWAP(25) + Structure(25) + CVD(20) + Time(15)
CVD State: Confirmation
Direction: Long
Timeframe: 1m
```
### Alert Behavior
✅ **One alert per unique pivot break** - no spam
✅ **Fires on candle close only** - no repainting
✅ **Minimum score filter** - only A grade or higher (≥60)
✅ **Direction-specific** - separate bullish/bearish conditions
⚠️ **No cooldown between different pivots** - multiple alerts per session allowed if different swing levels break
---
## 🔧 Technical Details
### Timeframe Lock
- **Required**: 1-minute chart only
- **Reason**: Scoring model calibrated for 1m micro-structure
- **Future**: Multi-timeframe support planned for v2
### Timezone Configuration
- **Hard-coded**: `America/New_York`
- **Session Detection**: Uses TradingView's native session functions
- **Consistency**: All time-based logic uses NY timezone
### Swing Detection Parameters
**Locked to specification:**
- `ta.pivothigh(source, left=2, right=2)`
- `ta.pivotlow(source, left=2, right=2)`
**Implications:**
- Pivots confirmed 2 bars after formation
- No repainting - historical pivots don't move
- 4-bar minimum swing structure (2 left + pivot + 2 right)
### VWAP Calculation
- **Type**: Session-anchored (resets daily)
- **Source**: Typical price `(high + low + close) / 3`
- **Weighting**: Volume-weighted
- **Standard Deviation**: True population standard deviation
### CVD Proxy Formula
```pine
barDelta = close > open ? volume : close < open ? -volume : 0
CVD = cumulative sum of barDelta (session-reset)
```
### Performance Limits
- **Max Labels**: 500 (TradingView limit)
- **Max Bars Back**: 500
- **Memory**: Lightweight - uses only essential variables
---
## 💡 Best Practices
### 1. **Use as a Filter, Not a Strategy**
❌ Don't: Blindly take every signal
✅ Do: Use score as confluence for your existing analysis
### 2. **Higher Grades = Better Probability**
- **A Setups (60-74)**: Regular opportunities, still require discretion
- **A+ Setups (75-89)**: High-quality, multiple factors aligned
- **A++ Setups (90-100)**: Rare premium opportunities, strongest edge
### 3. **Respect the VWAP Zone Filter**
The indicator **automatically blocks**:
- Longs in upper VWAP bands (counter-trend)
- Shorts in lower VWAP bands (counter-trend)
Trust this logic - it enforces mean reversion discipline.
### 4. **Monitor the Score Panel**
Watch which components are scoring to understand **why** a setup formed:
- Missing CVD score? → No order flow confirmation
- Missing Time score? → Outside high-volume sessions
- Low VWAP score? → Weak deviation from fair value
### 5. **Combine with Risk Management**
The indicator provides **opportunity scoring**, not position sizing:
- Use stop losses based on swing structure
- Scale position size with setup grade (larger on A++, smaller on A)
- Set profit targets at VWAP or opposing band
### 6. **Session Awareness**
Prioritize signals during **active sessions**:
- **03:00-04:00 NY**: Pre-market momentum
- **09:30-11:30 NY**: Highest volume, tightest spreads
Off-hours signals (0 time score) are lower probability but still valid if other factors strong.
### 7. **Understand the Hard Gate**
If **no structure shift** occurs:
- Total score = 0
- No alerts fire
- Other components irrelevant
**Why?** Structure shift confirms momentum change - without it, there's no tradable opportunity.
### 8. **Avoid Over-Optimization**
Default settings are well-calibrated:
- Don't chase "perfect" parameters
- Test changes on historical data before live use
- Document any modifications
### 9. **Leverage Alert De-Duplication**
The indicator prevents spam automatically:
- One alert per unique swing break
- New swing levels = new alerts
- No need to manually filter notifications
### 10. **Supplement with Price Action**
Use the indicator alongside:
- Support/resistance levels
- Order flow footprint charts
- Volume profile
- Market internals (breadth, TICK, etc.)
---
## 📚 Example Scenarios
### Example 1: A++ Premium Setup (Score: 95)
```
Price: In lower 3rd VWAP band (-2.8σ) → VWAP: 25 pts
Structure: Close breaks swing high → Structure: 25 pts
CVD: Price LL + CVD HL (bullish div) → CVD: 25 pts
Time: 10:15 AM NY (market open) → Time: 25 pts
Direction: LONG (price below VWAP) → Valid
Grade: A++ (95/100)
```
**Interpretation:** All factors aligned - premium mean-reversion long opportunity.
---
### Example 2: A+ Strong Setup (Score: 80)
```
Price: In upper 2nd VWAP band (+1.5σ) → VWAP: 15 pts
Structure: Close breaks swing low → Structure: 25 pts
CVD: Price HH + CVD LH (bearish div) → CVD: 25 pts
Time: 2:00 PM NY (off-hours) → Time: 0 pts
Direction: SHORT (price above VWAP) → Valid
Grade: A+ (65/100)
```
**Interpretation:** Strong setup despite off-hours, bearish divergence adds confidence.
---
### Example 3: Filtered Setup (Score: 0)
```
Price: In upper 3rd VWAP band (+2.5σ) → VWAP: 25 pts (if allowed)
Structure: Close breaks swing high → Structure: BLOCKED
CVD: Price HH + CVD HH (confirmation) → CVD: 20 pts (if allowed)
Time: 10:00 AM NY → Time: 25 pts (if allowed)
Direction: LONG (price ABOVE VWAP) → ❌ INVALID ZONE
Grade: None (0/100) - NO ALERT
```
**Interpretation:** VWAP filter blocked long signal in upper band - prevents counter-trend trade.
---
## 🛠️ Troubleshooting
### No Signals Appearing
- ✅ Verify you're on **1-minute chart**
- ✅ Check **Tick Size** matches your symbol
- ✅ Ensure **VWAP Bands** are visible
- ✅ Wait for confirmed pivots (requires at least 5 bars of history)
### Alerts Not Firing
- ✅ Confirm alert is set to **"Once Per Bar Close"**
- ✅ Check score threshold (must be ≥60 by default)
- ✅ Verify VWAP zone filter isn't blocking signals
- ✅ Check that structure shift is actually occurring
### Score Always Zero
- ✅ No structure shift detected (hard gate active)
- ✅ Price may not be in valid VWAP zone (2nd or 3rd band)
- ✅ Insufficient swing history (wait for pivots to form)
### Too Many/Too Few Signals
**Too many signals:**
- Increase **A Setup Threshold** (e.g., 70 instead of 60)
- Increase **Tick Buffer Count** (reduces false breaks)
**Too few signals:**
- Decrease **A Setup Threshold** (e.g., 50 instead of 60)
- Decrease **Tick Buffer Count** (more sensitive to breaks)
---
## 📜 License
This indicator is provided under the **Mozilla Public License 2.0**.
---
## 🤝 Credits
Developed as a professional trading tool for systematic opportunity identification.
**Philosophy:** Reduce noise. Enforce discipline. Keep the human in control.
---
## 📞 Support
For questions, issues, or feature requests, please consult:
1. This README documentation
2. The specification document (`pinescript_market_state_engine_spec.docx`)
3. Inline code comments in `market_state_engine.pine`
---
## 🔄 Version History
**v1.0** (Current)
- Initial release
- 4-component scoring model (VWAP + Structure + CVD + Time)
- VWAP zone directional filtering
- Alert de-duplication
- Configurable inputs
- Real-time score panel
- Session-aware logic
---
## 🎓 Understanding the Numbers
### Quick Reference Card
| Score Range | Grade | Quality | Typical Use |
|-------------|-------|---------|-------------|
| 90-100 | A++ | Premium | Highest conviction trades |
| 75-89 | A+ | High | Strong probability setups |
| 60-74 | A | Good | Acceptable with discretion |
| 0-59 | None | Filtered | Skip or wait for confluence |
### Component Contribution Examples
**Minimum A Setup (60 points):**
- Structure (25) + VWAP 3rd band (25) + Time (25) = 75 ✅
**Typical A+ Setup (75 points):**
- Structure (25) + VWAP 2nd band (15) + CVD confirm (20) + Time (25) = 85 ✅
**Maximum A++ Setup (100 points):**
- Structure (25) + VWAP 3rd band (25) + CVD divergence (25) + Time (25) = 100 ✅
---
## 🎯 Final Reminder
**This is NOT a trading bot.**
**This is NOT financial advice.**
**This is a decision-support tool.**
Always:
- ✅ Use proper risk management
- ✅ Understand the logic before trading
- ✅ Backtest on your symbols
- ✅ Keep the human in control
**Happy Trading! 📈**
Polynomial Trend Exhaustion & DivergencePolynomial Trend Exhaustion & Divergence
Overview
This indicator combines advanced polynomial regression analysis with momentum-based exhaustion detection and forecast-based divergence signals. It identifies potential trend reversals by analyzing when price momentum is fading (exhaustion) and when price direction conflicts with the mathematical trajectory projected by cubic polynomial forecasting (divergence).
The system uses optional source smoothing (Linear Regression Blend or Kalman filtering) to reduce noise before analysis, then applies two independent detection methods to generate high-probability reversal warnings.
Exhaustion Detection
What it detects: Trend exhaustion occurs when price is still moving in one direction but the underlying momentum is weakening—a classic early warning of potential reversal.
How it works:
The indicator calculates either a cubic polynomial regression or Kalman filter trend, then monitors the slope of that trend line. Exhaustion is detected when:
Bullish Exhaustion: The slope is positive (uptrend) but the rate of change of the slope is negative (momentum decelerating)
Bearish Exhaustion: The slope is negative (downtrend) but the rate of change of the slope is positive (momentum decelerating)
Signal filtering:
Consecutive Bars Required: Exhaustion conditions must persist for a configurable number of bars before triggering
Max Repeat Signals: Limits how many consecutive exhaustion signals can fire to prevent clustering
Cooldown Period: After hitting the max signal limit, the indicator pauses before allowing new signals
This produces clean, actionable warnings rather than noise during extended exhaustion phases.
Divergence Detection
What it detects: Divergence signals identify when the polynomial-projected future price path conflicts with current price direction—suggesting price may be overextended and due for a correction toward the forecast.
How it works:
The indicator fits a cubic polynomial to recent price data and extrapolates it forward by a configurable number of bars. It then compares:
Current price direction (rising or falling over the lookback period)
Forecast position (above or below current price)
Divergence triggers when:
Bullish Divergence: Price is falling but the polynomial forecast is above current price (suggesting upward reversion)
Bearish Divergence: Price is rising but the polynomial forecast is below current price (suggesting downward reversion)
Signal filtering:
Minimum Divergence (ATR): The forecast must be at least X ATRs away from price
Minimum Price Movement (ATR): Price must have moved at least X ATRs over the lookback period (filters out sideways noise)
Consecutive Bars Required: Divergence conditions must persist for X bars before triggering
Cooldown Period: Minimum bars between divergence signals of the same type
Key Features
Dual trend methods: Choose between Polynomial Regression or Kalman filtering for the base trend calculation
Source smoothing options: None, LinReg Blend, or Kalman filter applied to OHLC data before analysis
ATR-normalized thresholds: All filter thresholds adapt to current volatility
Anti-clustering logic: Built-in repeat limits and cooldowns prevent signal spam during extended conditions
Full alert support: All four signal types (Bull/Bear Exhaustion, Bullish/Bearish Divergence) have dedicated alert conditions
Band Walk Detector TENKYO [BASIC]Band Walk Detector TENKYO is a precision volatility analyzer designed for the 15-minute timeframe. It allows traders to visually verify the efficacy of the "TENKYO" logic, focusing strictly on high-probability breakout zones during specific market sessions.
Core Logic
This indicator is designed to capture the initial movement of a band walk. By filtering market noise through a specialized algorithm, it isolates the exact moment trend momentum begins to accelerate, providing a clear visual representation of market expansion.
Strategy Verification
This tool is engineered for rigorous market analysis and strategy confirmation. The backtest period can be set freely in 15-minute increments. Whether analyzing past market cycles or recent volatility, please feel free to test extensively across various seasons and times of day. This allows for a deep understanding of how the logic performs under different liquidity conditions.
Operational Guide
This release focuses on manual analysis and visual timing:
・Entry Signals: This version does not have an alert function. Please gauge the entry timing based on the labels that appear on the screen.
・Exit Management: In this version, labels indicating the timing of the exit are not displayed. Traders are encouraged to monitor the chart to determine the optimal exit points based on the trend's progression.
System Specifications
To ensure logical consistency and performance accuracy, the following settings are applied:
・Supported Assets: This version functions only on EURUSD and USDJPY currency pairs. The parameters are tuned specifically for the liquidity profiles of these major pairs.
・Session Timing: In this version, the time zone is fixed to London. This ensures that market session overlaps are calculated consistently, regardless of your local time.
・Parameter Tuning: In this version, users cannot finely customize details such as the band expansion acceleration threshold or the sensitivity of the wick block. The developer's recommended settings are used.
For more detailed information and further resources, please check the links in my profile.
Supertrend Channel + Trend SignalsThis indicator is designed to capture high-probability entries by combining a dynamic volatility-based channel with sensitive momentum oscillators. The supertrend is based on this indicator: Supertrend Channels by
Here is a simple breakdown of how it works:
1. The Supertrend Channel (The Filter)
The core of the indicator is a channel that tracks market volatility. Unlike standard fixed bands, this channel shifts and colors based on the prevailing trend:
Bullish Trend (Green): The midline is rising, indicating upward momentum.
Bearish Trend (Red): The midline is falling, indicating downward momentum.
Custom Timeframes: You can set the channel to a higher timeframe (like 30m or Daily) while trading on a smaller timeframe to ensure you are trading with the "Big Picture" trend.
2. Signal #1: The Momentum "Snap"
The "Signal #1" markers (Triangles) appear when two momentum tools align perfectly:
RSI (3-period): Captures very fast, short-term oversold/overbought conditions.
Stochastic RSI: Confirms that momentum is actually turning back in your favor.
Trend Filter: By default, the script only shows Buy signals in a Green trend and Sell signals in a Red trend to avoid "fighting the tape."
3. Dynamic ATR Volatility
The script features an intelligent ATR (Average True Range) logic that automatically adjusts its multiplier based on how the current volatility compares to the historical average. This helps the indicator stay wide during high-volatility spikes and tighten up during quiet periods.
4. Key Features
Multi-Timeframe Capability: Use the channel from any timeframe to filter your current chart.
You can use the top and bottom of the channels as potential take profit and stop losses based on the trend.
Toggleable Logic: Use the "Ignore Trend Filter" setting if you want to see every RSI/Stoch signal, regardless of whether the channel is green or red.
Ready for Alerts: Built-in alert conditions for both Buy and Sell signals so you never miss a confirmed momentum shift.
*I've have found that the 30 minute timeframe works best for almost all assets.
Trend & Volume indicatorThis is a Trend, Entry, Exit, and Risk-assessment indicator built around the NNFX (No-Nonsense Forex) methodology, intended primarily for Daily timeframes.
It combines:
A Baseline trend filter
Signal Wave (formerly SSL) lines for continuation and exits
ATR-based volatility analysis
Dynamic risk assessment
Visual trade context (colors, channels, alerts, table)
The indicator does not auto-trade. It provides decision support.
Core Components
1. Baseline (Trend Filter)
Uses a configurable moving average (HMA, EMA, JMA, McGinley, etc.)
Acts as the primary trend direction filter
Includes an optional volatility channel around the baseline
Trend logic:
Above baseline → bullish bias
Below baseline → bearish bias
Inside channel → neutral / ranging
This follows NNFX’s rule: Only trade in the direction of the baseline.
2. Signal Wave 1 (Trend Confirmation)
A high/low MA-based line (SW1)
Changes direction only when price clearly breaks structure
Confirms:
Trend continuation
Momentum agreement with baseline
3. Signal Wave 2 (Continuation Entries)
Short-length MA-based signal (SW2)
Uses ATR-distance logic to detect valid pullbacks
Signals continuation entries only when volatility criteria are met
Prevents chasing price during overextended moves
4. Exit Line (Trade Management)
Independent MA-based exit line
Generates:
Exit Long when price crosses below
Exit Short when price crosses above
Designed to:
Protect profits
Avoid emotional exits
Volatility & ATR Logic
ATR is smoothed using selectable methods (RMA, SMA, EMA, WMA)
ATR bands show:
Expected price range
Overextension zones
Used for:
Entry qualification
Continuation logic
False breakout detection
Risk Assessment System
ATR Percentile
Compares current ATR to historical volatility
Classifies risk as:
Low
Normal
High
Dynamic Color Fading
High volatility → more transparent colors
Low volatility → solid colors
Gives instant visual risk feedback
Entry Quality Filters
Entry Distance
Measures how far price is from the baseline:
Near → ideal
Extended → caution
Far → high risk
False Breakout Detection
Flags candles:
Larger than 1× ATR
Still within baseline range
Helps avoid trap trades
Visual Elements
Colored candles reflect trend + risk
Baseline channel fill changes with market bias
Diamond markers highlight risky candles
Optional ATR bands
Risk table showing:
Risk level
Entry distance
Volatility percentile
Current ATR
Alerts Included
The script provides alerts for:
Exit signals
Continuation entries
Baseline breaks
High-risk entries
False breakouts
Extreme volatility conditions
All alerts are context-aware, not raw crossovers.
Best Use Case
✔ Daily timeframe
✔ Trend-following strategies
✔ NNFX-style system building
✔ Discretionary traders who want structure, not automation
FX Momentum Breakout Detector# FX Momentum Breakout Strategy
A TradingView Pine Script indicator that detects momentum breakouts in forex pairs and automatically executes trades via SignalStack integration. The strategy uses EMA crossovers, swing structure breaks, and Fibonacci retracement levels for entry, stop loss, and take profit placement.
## Overview
This strategy identifies bullish and bearish momentum breakouts by combining:
- **EMA (Exponential Moving Average)** for trend direction
- **Swing High/Low** structure breaks for entry signals
- **Fibonacci retracement levels** for stop loss and take profit
- **Volume and time filters** to improve signal quality
- **Dynamic position sizing** based on Fibonacci stop distance and risk percentage
### Key Features
- ✅ **Automated Order Execution**: Direct integration with SignalStack for hands-free trading
- ✅ **Risk-Based Position Sizing**: Automatically calculates lot size based on stop distance and account risk
- ✅ **Fibonacci-Based TP/SL**: Uses Fibonacci 0.5 levels for take profit and stop loss
- ✅ **Time Window Filter**: Only trades during active market hours (7AM-7PM Japan Time)
- ✅ **Volume Filter**: Requires volume above 10-day moving average
- ✅ **Single Alert System**: One alert handles both long and short signals
## Strategy Logic
### Entry Conditions
**Long (Buy) Signal:**
- Price crosses above EMA 20, OR
- Price breaks above swing high structure
- AND: Minimum 3 consecutive bull bars (strong momentum)
- AND: Price is above EMA 20 (if EMA filter enabled)
- AND: Volume is above 10-day MA
- AND: Time is within 7AM-7PM JST window
**Short (Sell) Signal:**
- Price crosses below EMA 20, OR
- Price breaks below swing low structure
- AND: Minimum 3 consecutive bear bars (strong momentum)
- AND: Price is below EMA 20 (if EMA filter enabled)
- AND: Volume is above 10-day MA
- AND: Time is within 7AM-7PM JST window
### Stop Loss & Take Profit
- **Long Positions:**
- Take Profit: Fibonacci 0.5 level above entry (`fib_up_0_5`)
- Stop Loss: Fibonacci 0.5 level below entry (`fib_dn_0_5`)
- **Short Positions:**
- Take Profit: Fibonacci 0.5 level below entry (`fib_dn_0_5`)
- Stop Loss: Fibonacci 0.5 level above entry (`fib_up_0_5`)
### Position Sizing
Position size is calculated dynamically based on:
1. **Account Balance**: Your account size in USD (default: $125,000)
2. **Risk Percentage**: Risk per trade (default: 1.0%)
3. **Stop Loss Distance**: Distance from entry to Fibonacci stop level (in pips)
**Formula:**
```
Risk in Dollars = Account Balance × (Risk % / 100)
Stop Loss (pips) = |Entry Price - Stop Loss Price| / Pip Size
Position Size (lots) = Risk $ / (Stop Loss (pips) × $10 per pip per lot)
```
The strategy rounds to 0.01 lot increments (micro lots) for precise position sizing.
## Setup Instructions
### Prerequisites
1. **TradingView Account**: Pro plan or higher (required for webhook alerts)
2. **SignalStack Account**: Active account with connected broker (e.g., OANDA)
3. **SignalStack Webhook URL**: Get this from your SignalStack dashboard
### Step 1: Add Strategy to TradingView
1. Open TradingView and navigate to your chart
2. Click "Pine Editor" (bottom panel)
3. Copy the code from `v2.0_fx_breakout_strategy.md`
4. Paste into Pine Editor
5. Click "Save" and then "Add to Chart"
### Step 2: Configure Strategy Inputs
In the strategy settings panel, configure:
**Technical Parameters:**
- **EMA Length**: Default 20 (trend filter)
- **Swing High/Low Lookback**: Default 7 bars
- **Min Consecutive Bull/Bear Bars**: Default 3 (momentum requirement)
- **Require EMA Filter**: Default `true` (price must be on correct side of EMA)
**Risk Management:**
- **Account Balance (USD)**: Your account size (default: 125,000)
- **Risk Per Trade (%)**: Risk percentage per trade (default: 1.0%)
- **ATR Length**: Default 14 (for informational ATR display)
**Filters:**
- **Volume MA Length**: Default 10 (volume filter period)
- **Enable Webhook Alerts**: Set to `true` for automated trading
- **Alert Frequency**: `once_per_bar_close` (recommended)
- **Asset Label**: Leave empty to use chart symbol, or override if needed
### Step 3: Create TradingView Alert
1. Click the "Alerts" icon (bell) at the top of the chart, or press `Alt+A` (Windows) / `Option+A` (Mac)
2. Click "Create Alert" or the "+" button
3. Select the chart with your strategy
**Alert Configuration:**
**Condition Tab:**
- **Condition**: Select "FX Momentum Breakout Detector" (your strategy name)
- **Trigger**: "Once Per Bar Close" (matches strategy setting)
- **Expiration**: Set as needed (or leave unlimited)
**Notifications Tab:**
- **Webhook URL**: Paste your SignalStack webhook URL
- **Message**: Leave as default (strategy generates JSON automatically)
4. Save the alert with a descriptive name (e.g., "EURUSD Breakout SignalStack")
### Step 4: Verify SignalStack Connection
1. Check your SignalStack dashboard for incoming webhooks
2. Verify the broker connection is active
3. Test with a paper trading account first
For detailed SignalStack setup, see (./SIGNALSTACK_SETUP.md).
## Webhook Payload Format
The strategy sends a JSON payload in SignalStack format. Primary fields:
```json
{
"symbol": "EURUSD",
"action": "buy",
"quantity": 2.78,
"take_profit": 1.0895,
"stop_loss": 1.0805,
"ticker": "EURUSD",
"ticker_id": "OANDA:EURUSD",
"base": "EUR",
"quote": "USD",
"timeframe": "15",
"price": 1.0850,
"ema20": 1.0820,
"range": 0.0050,
"breakout_price": 1.0850,
"fib_up_0_5": 1.0895,
"fib_dn_0_5": 1.0805,
"atr_pips": 25.0,
"stop_loss_pips": 45.0,
"position_size_lots": 2.78,
"risk_dollars": 1250.0,
"signal": "bullish momentum breakout",
"bar_time": "2024-01-15T10:30:00"
}
```
**SignalStack Required Fields:**
- `symbol`: Trading symbol
- `action`: "buy" or "sell"
- `quantity`: Position size in lots
- `take_profit`: Take profit price
- `stop_loss`: Stop loss price
## Testing
Use the included test script to verify webhook integration:
```bash
# Test both Discord and SignalStack
python test_webhook.py
# Test Discord only
python test_webhook.py --discord
# Test SignalStack only
python test_webhook.py --signalstack
```
The test script sends sample payloads matching the strategy format and verifies webhook delivery.
## Configuration Examples
### Conservative Setup (Lower Risk)
- Account Balance: 125,000 USD
- Risk Per Trade: 0.5%
- EMA Length: 20
- Min Bull/Bear Bars: 4
- Require EMA Filter: `true`
### Aggressive Setup (Higher Risk)
- Account Balance: 125,000 USD
- Risk Per Trade: 2.0%
- EMA Length: 15
- Min Bull/Bear Bars: 2
- Require EMA Filter: `false`
### Multiple Currency Pairs
To trade multiple pairs:
1. Add the strategy to each chart
2. Create a separate alert for each pair
3. Use the same SignalStack webhook URL for all alerts
4. SignalStack routes orders based on the `symbol` field
## Time Window Filter
The strategy only trades during **7AM-7PM Japan Time (JST)**, which corresponds to:
- **UTC**: 22:00 (previous day) to 10:00 (same day)
- This covers the Asian and early European trading sessions
To modify the time window, edit the `timeWindowFilter` calculation in the strategy code.
## Position Sizing Examples
### Example 1: EURUSD Long
- Account Balance: $125,000
- Risk: 1.0% = $1,250
- Entry Price: 1.0850
- Stop Loss (fib_dn_0_5): 1.0805
- Stop Distance: 45 pips
- Position Size: $1,250 / (45 pips × $10) = **2.78 lots**
### Example 2: GBPUSD Short
- Account Balance: $125,000
- Risk: 1.0% = $1,250
- Entry Price: 1.2650
- Stop Loss (fib_up_0_5): 1.2700
- Stop Distance: 50 pips
- Position Size: $1,250 / (50 pips × $10) = **2.50 lots**
## Troubleshooting
### Alert Not Triggering
1. **Check Strategy Settings:**
- Ensure "Enable Webhook Alerts" is `true`
- Verify time window (7AM-7PM JST)
- Check volume filter (must be above 10-day MA)
2. **Check Alert Settings:**
- Verify webhook URL is correct
- Ensure alert is active (not expired)
- Check alert frequency matches strategy setting
### Webhook Not Received by SignalStack
1. **Verify URL:**
- Check SignalStack dashboard for correct webhook URL
- Ensure URL is complete (no truncation)
2. **Check Payload Format:**
- SignalStack expects `symbol`, `action`, `quantity`, `take_profit`, `stop_loss`
- Verify these fields are present in the payload
3. **Test Webhook:**
- Use TradingView's "Test Alert" feature
- Check SignalStack logs for incoming requests
- Run `test_webhook.py` to verify format
### OANDA Authentication Error
If you receive a 401 Unauthorized error:
1. **Check OANDA API Token Permissions:**
- Log in to OANDA
- Go to "My Account" > "My Services" > "Manage API Access"
- Ensure token has **Trading** permissions (not just read-only)
2. **Update SignalStack Configuration:**
- Go to SignalStack dashboard
- Navigate to OANDA broker connection settings
- Update API token with a token that has trading permissions
- Verify account ID matches your OANDA account
For detailed troubleshooting, see (./SIGNALSTACK_SETUP.md).
### Position Size Issues
1. **Check Account Balance Input:**
- Verify account balance matches your actual account size
- Ensure risk percentage is appropriate (1% recommended)
2. **Verify Stop Loss Calculation:**
- Stop loss is based on Fibonacci 0.5 level
- Position size automatically adjusts to maintain risk percentage
- Check that pip size is correct for your currency pair
## Files
- **v2.0_fx_breakout_strategy.md**: Pine Script strategy code
- **test_webhook.py**: Python test script for webhook validation
- **SIGNALSTACK_SETUP.md**: Detailed SignalStack configuration guide
- **design.md**: Strategy design notes and considerations
## Risk Disclaimer
⚠️ **Trading forex involves substantial risk of loss. This strategy is provided for educational purposes only.**
- Always test with paper trading before using real funds
- Past performance does not guarantee future results
- Use appropriate risk management (1-2% risk per trade recommended)
- Monitor positions and adjust stop losses as needed
- This strategy does not guarantee profits
## Support
- **SignalStack Documentation**: Check SignalStack's official docs for webhook requirements
- **TradingView Support**: For alert/webhook issues in TradingView
- **Strategy Issues**: Review the strategy code comments for configuration options
## License
This strategy is provided as-is for personal use. Modify and adapt as needed for your trading requirements.
Gemini Trend & Momentum Synergy (With Sound Alerts)** هذا المؤشر لا يعمل ك محلل تداول بديل لكنه يستخدم لمعرفة الاتجاه العام و مناطق الدخول والخروج لطفا ..
خطوة مهمة جداً: كيف تفعل الصوت؟ 🔊
الكود وحده لا يصدر صوتاً، هو فقط يرسل "إشارة" للمنصة. لكي تسمع الصوت، عليك اتباع الخطوات التالية في TradingView بعد حفظ الكود:
1. اضغط على أيقونة "الساعة" (Alerts) في القائمة الجانبية اليمنى، أو اضغط Alt + A.
2. اضغط على زر Create Alert.
3. في خانة Condition، اختر اسم المؤشر: Gemini Trend & Momentum....
سيكون لديك خياران الآن:
الخيار السهل: اختر "Any alert() function call". هذا سيفعل التنبيه تلقائياً لأي إشارة شراء أو بيع يطلقها الكود.
الخيار المخصص: اختر Gemini Buy Alert أو Gemini Sell Alert إذا كنت تريد تنبيهاً لاتجاه واحد فقط.
الأهم: اذهب لتبويب Notifications وتأكد من وضع علامة صح (✅) على Play Sound.
اضغط Create.
Here is the translation of the text, organized exactly as requested:
**Please Note: This indicator does not serve as a replacement for a trading analyst; rather, it is used to identify the general trend as well as potential entry and exit zones.**
**Very Important Step: How to Enable Sound Alerts? 🔊**
The code alone does not generate sound; it merely sends a "signal" to the platform. To hear audio alerts, you must follow these steps in TradingView after saving the code:
1. Click the **"Clock" icon (Alerts)** in the right-hand sidebar, or press `Alt + A`.
2. Click the **Create Alert** button.
3. In the **Condition** field, select the indicator name: `Gemini Trend & Momentum...`.
4. You will now have two options:
* **The Easy Option:** Select **"Any alert() function call"**. This automatically activates the alert for any Buy or Sell signal triggered by the code.
* **The Custom Option:** Select `Gemini Buy Alert` or `Gemini Sell Alert` if you only want alerts for a specific direction.
5. **Most Importantly:** Go to the **Notifications** tab and ensure the **Play Sound** box is checked (✅).
6. Click **Create**.
---
**Would you like me to translate the installation instructions or the strategy logic as well?**






















