ten2 Cipher v.1Created and built by ten2crypto
This is not just another "Market Cipher" clone. This is my personal, ground-up build of a comprehensive momentum and divergence toolkit, designed to provide a deeper, more nuanced view of the market. The ten2 Cipher Divergence Engine combines the best aspects of classic momentum oscillators with a powerful, multi-layered divergence system.
This indicator was built for my own trading and is now being shared with the community.
지표 및 전략
Reversal Zones// This indicator identifies likely reversal zones above and below current price by aggregating multiple technical signals:
// • Prior Day High/Low
// • Opening Range (9:30–10:00)
// • VWAP ±2 standard deviations
// • 60‑minute Bollinger Bands
// It draws shaded boxes for each base level, then computes a single upper/lower reversal zone (closest level from combined signals),
// with configurable zone width based on the expected move (EM). Within those reversal zones, it highlights an inner “strike zone”
// (percentage of the box) to suggest optimal short-option strikes for credit spreads or iron condors.
// Additional features:
// • Optional Expected Move lines from the RTH open
// • 15‑minute RSI/Mean‑Reversion and Trend‑Day confluence flags displayed in a dashboard
// • Toggles to include/exclude each signal and adjust styling
// How to use:
// 1. Adjust inputs to select which levels to include and set the expected move parameters.
// 2. Reversal boxes (red above, green below) show zones where price is most likely to reverse.
// 3. Inner strike zones (darker shading) guide optimal short-strike placement.
// 4. Dashboard confirms whether mean-reversion or trend-day conditions are active.
// Customize colors and visibility in the settings panel. Enjoy disciplined, confluence-based trade entries!
Advanced HMM - 3 States CompleteHidden Markov Model
Aconsistent challenge for quantitative traders is the frequent behaviour modification of financial
markets, often abruptly, due to changing periods of government policy, regulatory environment
and other macroeconomic effects. Such periods are known as market regimes. Detecting such
changes is a common, albeit difficult, process undertaken by quantitative market participants.
These various regimes lead to adjustments of asset returns via shifts in their means, variances,
autocorrelation and covariances. This impacts the effectiveness of time series methods that rely
on stationarity. In particular it can lead to dynamically-varying correlation, excess kurtosis ("fat
tails"), heteroskedasticity (volatility clustering) and skewed returns.
There is a clear need to effectively detect these regimes. This aids optimal deployment of
quantitative trading strategies and tuning the parameters within them. The modeling task then
becomes an attempt to identify when a new regime has occurred adjusting strategy deployment,
risk management and position sizing criteria accordingly.
A principal method for carrying out regime detection is to use a statistical time series tech
nique known as a Hidden Markov Model . These models are well-suited to the task since they
involve inference on "hidden" generative processes via "noisy" indirect observations correlated
to these processes. In this instance the hidden, or latent, process is the underlying regime state,
while the asset returns are the indirect noisy observations that are influenced by these states.
MAIN FEATURES OF THE INDICATOR
The "Advanced HMM - 3 States Complete" indicator is an advanced technical analysis tool that uses Hidden Markov Model (HMM) to identify three main market regimes: BULL, BEAR, and SIDEWAYS.
🎯 KEY FEATURES:
1. HMM-based Trend Detection
3 market states: Bull (0), Bear (1), Sideways (2)
Dynamic probabilities: Calculates probability for each state based on price data
Transition matrix: Models state transitions between regimes
2. Analytical Features
Price volatility: Log returns and standard deviation
Momentum: Rate of Change (ROC)
Volume: Volume ratio vs moving average
Data normalization: Standardizes features to common scale
3. Visual Trading Signals
text
📍 BUY Signals:
- Green upward triangle below bars
- "LONG" label in green
📍 SELL Signals:
- Red downward triangle above bars
- "SHORT" label in red
📍 EXIT Signals:
- Orange X marks when transitioning to sideways
4. Information Display
Probability table (top-right): Shows percentage for each state
State label: Current regime with probability percentages
Chart background color: Reflects dominant market state
5. Automated Alerts
Alerts when new Bull/Bear market detected
Alerts when market transitions to sideways
Configurable TradingView notifications
6. Customizable Parameters
pinescript
length: 100 // Lookback period
smoothing_period: 20 // Probability smoothing
volatility_threshold: 0.5 // Volatility threshold
💡 PRACTICAL APPLICATIONS:
Identify primary trends with quantified probabilities
Entry/exit signals based on state transitions
Risk management during sideways markets
Trend confirmation when combined with other indicators
This indicator is particularly useful for market regime analysis and identifying trend transition points using advanced statistical probability methods.
🔧 TECHNICAL IMPLEMENTATION:
Composite observation: Weighted combination of returns (40%), momentum (30%), and volatility (30%)
Gaussian emission probabilities: Different distributions for each state
Manual HMM updates: Avoids matrix computation limitations in Pine Script
Real-time smoothing: EMA applied to state probabilities
The indicator provides institutional-grade regime detection in a visually intuitive package suitable for both discretionary and systematic traders.
Adaptive Trend 1m ### Overview
The "Adaptive Trend Impulse Parallel SL/TP 1m Realistic" strategy is a sophisticated trading system designed specifically for high-volatility markets like cryptocurrencies on 1-minute timeframes. It combines trend-following with momentum filters and adaptive parameters to dynamically adjust to market conditions, ensuring more reliable entries and risk management. This strategy uses SuperTrend for primary trend detection, enhanced by MACD, RSI, Bollinger Bands, and optional volume spikes. It incorporates parallel stop-loss (SL) and multiple take-profit (TP) levels based on ATR, with options for breakeven and trailing stops after the first TP. Optimized for realistic backtesting on short timeframes, it avoids over-optimization by adapting indicators to market speed and efficiency.
### Principles of Operation
The strategy operates on the principle of adaptive impulse trading, where entry signals are generated only when multiple conditions align to confirm a strong trend reversal or continuation:
1. **Trend Detection (SuperTrend)**: The core signal comes from an adaptive SuperTrend indicator. It calculates upper and lower bands using ATR (Average True Range) with dynamic periods and multipliers. A buy signal occurs when the price crosses above the lower band (from a downtrend), and a sell signal when it crosses below the upper band (from an uptrend). Adaptation is based on Rate of Change (ROC) to measure market speed, shortening periods in fast markets for quicker responses.
2. **Momentum and Trend Filters**:
- **MACD**: Uses adaptive fast and slow lengths. In "Trend Filter" mode (default when "Use MACD Cross" is false), it checks if the MACD line is above/below the signal for long/short. In cross mode, it requires a crossover/crossunder.
- **RSI**: Adaptive period RSI must be above 50 for longs and below 50 for shorts, confirming overbought/oversold conditions dynamically.
- **Bollinger Bands (BB)**: Depending on the mode ("Midline" by default), it requires the price to be above/below the BB midline for longs/shorts, or a breakout in "Breakout" mode. Deviation adapts to market efficiency.
- **Volume Spike Filter** (optional): Entries require volume to exceed an adaptive multiple of its SMA, signaling strong impulse.
3. **Volatility Filter**: Entries are only allowed if current ATR percentage exceeds a historical minimum (adaptive), preventing trades in low-volatility ranges.
4. **Risk Management (Parallel SL/TP)**:
- **Stop-Loss**: Set at an adaptive ATR multiple below/above entry for long/short.
- **Take-Profits**: Three levels at adaptive ATR multiples, with partial position closures (e.g., 51% at TP1, 25% at TP2, remainder at TP3).
- **Post-TP1 Features**: Optional breakeven moves SL to entry after TP1. Trailing SL uses BB midline as a dynamic trail.
- All levels are calculated per trade using the ATR at entry, making them "realistic" for 1m charts by widening SL and tightening initial TPs.
The strategy enters long on buy signals with all filters met, and short on sell signals. It uses pyramid margin (100% long/short) for full position sizing.
Adaptation is driven by:
- **Market Speed (normSpeed)**: Based on ROC, tightens multipliers in volatile periods.
- **Efficiency Ratio (ER)**: Measures trend strength, adjusting periods for trending vs. ranging markets.
This ensures the strategy "adapts" without manual tweaks, reducing false signals in varying conditions.
### Main Advantages
- **Adaptability**: Unlike static strategies, parameters dynamically adjust to market volatility and trend strength, improving performance across ranging and trending phases without over-optimization.
- **Realistic Risk Management for 1m**: Wider SL and tiered TPs prevent premature stops in noisy short-term charts, while partial profits lock in gains early. Breakeven/trailing options protect profits in extended moves.
- **Multi-Filter Confirmation**: Combines trend, momentum, and volume for high-probability entries, reducing whipsaws. The volatility filter avoids flat markets.
- **Debug Visualization**: Built-in plots for signals, levels, and component checks (when "Show Debug" is enabled) help users verify logic on charts.
- **Efficiency**: Low computational load, suitable for real-time trading on TradingView with alerts.
Backtesting shows robust results on volatile assets, with a focus on sustainable risk (e.g., SL at 3x ATR avoids excessive drawdowns).
### Uniqueness
What sets this strategy apart is its **fully adaptive framework** integrating multiple indicators with real-time market metrics (ROC for speed, ER for efficiency). Most trend strategies use fixed parameters, leading to poor adaptation; here, every key input (periods, multipliers, deviations) scales dynamically within bounds, creating a "self-tuning" system. The "parallel SL/TP with 1m realism" adds custom handling for micro-timeframes: tightened initial TPs for quick wins and adaptive min-ATR filter to skip low-vol bars. Unlike generic mashups, it justifies the combination—SuperTrend for trend, MACD/RSI/BB for impulse confirmation, volume for conviction—working synergistically to capture "trend impulses" while filtering noise. The post-TP1 breakeven/trailing tied to BB adds a unique profit-locking mechanism not common in open-source scripts.
### Recommended Settings
These settings are optimized and recommended for trading ASTER/USDT on Bybit, with 1-minute chart, x10 leverage, and cross margin mode. They provide a balanced risk-reward for this volatile pair:
- **Base Inputs**:
- Base ATR Period: 10
- Base SuperTrend ATR Multiplier: 2.5
- Base MACD Fast: 8
- Base MACD Slow: 17
- Base MACD Signal: 6
- Base RSI Period: 9
- Base Bollinger Period: 12
- Bollinger Deviation: 1.8
- Base Volume SMA Period: 19
- Base Volume Spike Multiplier: 1.8
- Adaptation Window: 54
- ROC Length: 10
- **TP/SL Settings**:
- Use Stop Loss: True
- Base SL Multiplier (ATR): 3
- Use Take Profits: True
- Base TP1 Multiplier (ATR): 5.5
- Base TP2 Multiplier (ATR): 10.5
- Base TP3 Multiplier (ATR): 19
- TP1 % Position: 51
- TP2 % Position: 25
- Breakeven after TP1: False
- Trailing SL after TP1: False
- Base Min ATR Filter: 0.001
- Use Volume Spike Filter: True
- BB Condition: Midline
- Use MACD Cross (false=Trend Filter): True
- Show Debug: True
For backtesting, use initial capital of 30 USD, base currency USDT, order size 100 USDT, pyramiding 1, commission 0.1%, slippage 0 ticks, long/short margin 0%.
Always backtest on your platform and use risk management—risk no more than 1-2% per trade. This is not financial advice; trade at your own risk.
Tape (Time and Sales) with CVD📊 Tape (Time and Sales) with CVD & Velocity
Overview
A professional Time and Sales (Tape) indicator that displays real-time order flow data using Cumulative Volume Delta (CVD) to accurately identify buy and sell trades. Features a unique CVD-based Velocity metric to measure order flow intensity.
Key Features
🎯 CVD-Based Trade Detection
- Uses Cumulative Volume Delta to determine true buy/sell trades
- Positive CVD change = Buy orders (hitting the ask)
- Negative CVD change = Sell orders (hitting the bid)
- More accurate than traditional bid/ask comparison methods
⚡ Directional Velocity Metric
- Calculates CVD change rate over a customizable time window (default: 60 seconds)
- Displays the speed of order flow (lots per second)
- Color-coded based on direction:
- Blue: Bullish velocity (buyers in control)
- Red: Bearish velocity (sellers in control)
- Highlights when velocity exceeds your threshold
📋 Real-Time Tape Display
Each row shows:
- Price: Color-coded by tick direction (uptick/downtick)
- Size: Volume with buy/sell background colors
- Time: Customizable format and timezone
- CVD: Running cumulative volume delta value
🎨 Visual Features
- Large print highlighting: Automatically highlights significant orders
- Price tick coloring: See upticks and downticks at a glance
- Configurable colors: Fully customizable color scheme
- Flexible positioning: Place the tape anywhere on your chart
- Invertible display: Choose whether new prints scroll up or down
Settings
CVD Configuration
- Custom timeframe: Choose the resolution for CVD calculation (1S recommended for precision)
- Anchor period: Set the CVD reset period (Daily, Weekly, etc.)
Velocity Settings
- Enable/Disable: Toggle velocity metric on/off
- Period: Time window for velocity calculation (1-60 seconds)
- Precision: Decimal places to display
- Threshold: Set alert level for significant velocity
Tape Customization
- Tape length: Number of rows to display (1-100)
- Min print size: Filter out small trades
- Large size threshold: Define what qualifies as a "large" order
- Size precision: Control decimal places for volume display
Display Options
- Text size: Auto, tiny, small, normal, large, huge
- Position: Top/Middle/Bottom × Left/Center/Right
- Time format: Customize timestamp display (ISO 8601)
- Timezone: Use exchange time or specify custom IANA timezone
- Column visibility: Show/hide Price, Time, or CVD columns
- Invert direction: Reverse tape scroll direction
How to Use
For Scalpers & Day Traders
1. Watch the Velocity metric for sudden spikes in order flow intensity
2. Look for large prints highlighted in yellow - these often indicate institutional activity
3. Monitor the CVD column to see if buyers or sellers are dominating
4. Use price tick colors to spot momentum shifts in real-time
For Order Flow Analysis
- High velocity + large buy orders = Strong bullish pressure
- High velocity + large sell orders = Strong bearish pressure
- Velocity divergence from price = Potential reversal signal
- Consistent buy/sell flow = Trend confirmation
Best Practices
- Use 1S timeframe for most accurate CVD calculations on liquid markets
- Adjust Large Size Min based on the instrument's average volume
- Set Velocity Threshold to filter noise and highlight significant order flow
- Consider using smaller tape length (10-15 rows) for cleaner display
Technical Details
- Uses `ta.requestVolumeDelta()` for precise CVD calculation
- Leverages `request.security_lower_tf()` for sub-bar data access
- Real-time only (no historical replay to ensure data accuracy)
- Optimized performance with single-loop iteration
Requirements
- TradingView Premium, Pro, or Pro+ (required for lower timeframe data access)
- Works best on liquid markets with frequent trades
Notes
- The indicator displays real-time data only and will show "Waiting for real-time data..." until live trades occur
- CVD accuracy depends on the exchange's volume data quality
- Velocity is calculated as absolute value but color-coded by direction
---
*Perfect for order flow traders, tape readers, and anyone who wants to see what's happening beneath the price action in real-time.*
Credits
Original concept modified to use CVD-based buy/sell detection with added directional velocity metric.
---
License: Mozilla Public License 2.0
IPDA Ranges – Pro
### IPDA Ranges – Pro
**Overview**
The **IPDA Ranges – Pro** indicator brings the core concepts of the Interbank Price Delivery Algorithm (IPDA) from ICT (Inner Circle Trader) mentorship to life on TradingView. Inspired by ICT's foundational video on (www.youtube.com), this tool visualizes multi-period price ranges (20, 40, or 60 days) to decode institutional order flow, identify discount/premium zones, and highlight algorithmic price delivery points.
IPDA, as explained by ICT, is the "source code" behind market structure—grading ranges into quadrants to reveal high-probability support/resistance, fair value gaps, and liquidity draws. By anchoring on daily highs/lows, it filters noise, anticipates retracements, and aligns price action with time-based delivery (e.g., during key sessions like 10 AM–2 PM ET). This indicator automates the process, making it easier to spot "permissible" moves without manual charting.
**Key Features**
- **Dynamic Ranges**: Plots customizable IPDA periods (IPDA20, IPDA40, IPDA60) based on daily highest highs and lowest lows. Equilibrium (50% midpoint) acts as the core reference for mean reversion.
- **Quadrant Breakdown**: Divides each range into 25% steps—lower quadrant (deep discount), 25%/75% lines (consequent encroachment edges), and upper quadrant (premium). Optional subquadrants (12.5% steps) for finer granularity.
- **Visual Modes**:
- **Boxes**: Shade discount (below equilibrium) and premium (above) areas for intuitive zoning.
- **Lines**: Clean horizontal lines for highs, lows, equilibrium, and quadrants—ideal for lower timeframes.
- **Mid-Zone Highlight**: Optional shading of the 25%–75% "fair value" zone (customizable color/opacity) to flag balanced delivery areas where bodies often respect levels.
- **Info Table**: Choose from:
- **Table A**: Labels current price location as "Discount" or "Premium" per range (green for mid-zone).
- **Table B**: Shows distance from equilibrium in % (e.g., "52.3%") for precise positioning.
- **Customization**:
- Toggle labels (high/low, quadrants, prices), line styles (solid/dotted/dashed), extensions, and table position.
- Colors for discount/premium, equilibrium, and zones.
- Alerts for mid-zone entry/exit to catch order flow shifts.
- **Performance**: Runs efficiently on any timeframe/symbol, pulling daily data via `request.security` for accuracy.
**How It Works**
1. **Range Calculation**: For each selected period (e.g., IPDA20), it fetches the highest high and lowest low over the past N daily bars. Equilibrium = (High + Low) / 2.
2. **Zoning**:
- **Discount**: Below equilibrium (institutional buying opportunity).
- **Premium**: Above equilibrium (potential selling pressure).
- **Quadrants**: 25% (q1) and 75% (q3) lines mark edges of the "mid-zone," where price often consolidates or traps retail before directional runs.
3. **Plotting**: On the last bar, draws boxes/lines from the range start to current bar. Labels show levels (e.g., "IPDA20 High @ 1.2345").
4. **Usage Example**: On EURUSD daily, enable IPDA20. If price pierces a premium wick's low into the lower quadrant during a bullish shift (per ICT), expect a run to liquidity—use the table's % reading to gauge strength (e.g., <25% = deep discount buy). Transpose to 5-min for entries aligning with FVGs or order blocks.
**Trading Tips**
- **Higher Timeframe Bias**: Use on daily/4H for structure; drop to 1H/15M for entries. Focus on bodies (not wicks) respecting quadrants—wicks signal traps.
- **ICT Alignment**: Pair with PD Arrays (premium/discount wicks) or Market Maker models. In trends, extend to IPDA40/60; ignore extremes unless full reversals occur.
- **Risk Management**: Target liquidity pools at equal highs/lows. Avoid overleveraging—IPDA shines in 7–10 AM ET for optimal delivery. Backtest random 20-day periods to validate.
- **Best For**: Forex, indices (e.g., NAS100), commodities (e.g., Gold). Test on demo first.
Special Thanks to toodegrees for sharing the original base script.
More features to be added.
**Disclaimer**
This indicator is for educational purposes only and does not constitute financial advice. Past performance isn't indicative of future results. Trading involves substantial risk—use at your own discretion. Hypothetical results may not reflect real-market factors like slippage or liquidity. Always consult a licensed advisor.
**Author**: © MadMonkTrading (Mozilla Public License 2.0)
**Version**: Pine Script v5 | Questions? Drop a comment below!
saodisengxiaoyu-lianghua-2.1- This indicator is a modular, signal-building framework designed to generate long and short signals by combining a chosen leading indicator with selectable confirmation filters. It runs on Pine Script version 5, overlays directly on price, and is built to be highly configurable so traders can tailor the signal logic to their market, timeframe, and trading style. It includes a dashboard to visualize which conditions are active and whether they validate a signal, and it outputs clear buy/sell labels and alert conditions so you can automate or monitor trades with confidence.
Core Design
- Leading Indicator: You choose one primary signal generator from a broad list (for example, Range Filter, Supertrend, MACD, RSI, Ichimoku, and many others). This serves as the anchor of the system and determines when a preliminary long or short setup exists.
- Confirmation Filters: You can enable additional filters that validate the leading signal before it becomes actionable. Each “respect…” input toggles a filter on or off. These filters include popular tools like EMA, 2/3 EMA crosses, RQK (Nadaraya Watson), ADX/DMI, Bollinger-based oscillators, MACD variations, QQE, Hull, VWAP, Choppiness Index, Damiani Volatility, and more.
- Signal Expiry: To avoid waiting indefinitely for confirmations, the indicator counts how many consecutive bars the leading condition holds. If confirmations do not align within a defined number of bars, the setup expires. This controls latency and helps reduce late or stale entries.
- Alternating Signals: An optional mode enforces alternation (long must follow short and vice versa), helping avoid repeated entries in the same direction without a meaningful reset.
- Aggregation Logic: The final long/short conditions are formed by combining the leading condition with all selected confirmation filters through logical conjunction. Only if all enabled filters validate the signal (within expiry constraints) does the indicator consider it a confirmed long or short.
- Visualization and Alerts: The script plots buy/sell labels at signal points, provides alert conditions for automation, and displays a compact dashboard summarizing the leading indicator’s status and each confirmation’s pass/fail result using checkmarks.
Leading Indicator Options
- The indicator includes a very large menu of leading tools, each with its own logic to determine uptrend or downtrend impulses. Highlights include:
- Range Filter: Uses a dynamic centerline and bands computed via conditional EMA/SMA and range sizing to define directional movement. It can operate in a default mode or an alternative “DW” mode.
- Rational Quadratic Kernel (RQK): Applies a kernel smoothing model (Nadaraya Watson) to detect uptrends and downtrends with a focus on noise reduction.
- Supertrend, Half Trend, SSL Channel: Classic trend-following tools that derive direction from ATR-based bands or moving average channels.
- Ichimoku Cloud and SuperIchi: Multi-component systems validating trend via cloud position, conversion/base line relationships, projected cloud, and lagging span.
- TSI (True Strength Index), DPO (Detrended Price Oscillator), AO (Awesome Oscillator), MACD, STC (Schaff Trend Cycle), QQE Mod: Momentum and cycle tools that parse direction from crossovers, zero-line behavior, and momentum shifts.
- Donchian Trend Ribbon, Chandelier Exit: Trend and exit tools that can validate breakouts or sustained trend strength.
- ADX/DMI: Measures trend strength and directional movement via +DI/-DI relationships and minimum ADX thresholds.
- RSI and Stochastic: Use crossovers, level exits, or threshold filters to gate entries based on overbought/oversold dynamics or relative strength trends.
- Vortex, Chaikin Money Flow, VWAP, Bull Bear Power, ROC, Wolfpack Id, Hull Suite: A diverse set of directional, momentum, and volume-based indicators to suit different markets and styles.
- Trendline Breakout and Range Detector: Price-behavior filters that confirm signals during breakouts or within defined ranges.
Confirmation Filters
- Each filter is optional. When enabled, it must validate the leading condition for a signal to pass. Examples:
- EMA Filter: Requires price to be above a specified EMA for longs and below for shorts, filtering signals that contradict broader trend or baseline levels.
- 2 EMA Cross and 3 EMA Cross: Enforce moving average cross conditions (fast above slow for long, the reverse for short) or a three-line stacking logic for more stringent trend alignment.
- RQK, Supertrend, Half Trend, Donchian, QQE, Hull, MACD (crossover vs. zero-line), AO (zero line or AC momentum variants), SSL: Each adds its characteristic validation pattern.
- RSI family (MA cross, exits OB/OS zones, threshold levels) plus RSI MA direction and RSI/RSI MA limits: Multiple ways to constrain signals via relative strength behavior and trajectories.
- Choppiness Index and Damiani Volatility: Prevent entries during ranging conditions or insufficient volatility; choppiness thresholds and volatility states gate the trade.
- VWAP, Volume modes (above MA, simple up/down, delta), Chaikin Money Flow: Volume and flow conditions that ensure signals happen in supportive liquidity or accumulation/distribution contexts.
- ADX/DMI thresholds: Demand a minimum trend strength and directional DI alignment to reduce whipsaw trades.
- Trendline Breakout and Range Detector: Confirm that the price is breaking structure or remains within active range consistent with the leading setup.
- By combining several filters you can create strict, conservative entries or looser setups depending on your goals.
Range Filter Engine
- A core building block, the Range Filter uses conditional EMA and SMA functions to compute adaptive bands around a dynamic centerline. It supports two types:
- Type 1: The centerline updates when price exceeds the band thresholds; bands define acceptable drift ranges.
- Type 2: Uses quantized steps (via floor operations) relative to the previous centerline to handle larger moves in discrete increments.
- The engine offers smoothing for range values using a secondary EMA and can switch between raw and averaged outputs. Its hi/lo bands and centerline compose a corridor that defines directional movement and potential breakout confirmation.
Signal Construction
- The script computes:
- leadinglongcond and leadingshortcond : The primary directional signals from the chosen leading indicator.
- longCond and shortCond : Final signals formed by combining the leading conditions with all enabled confirmations. Each confirmation contributes a boolean gate. If a filter is disabled, it contributes a neutral pass-through, keeping the logic intact without enforcing that condition.
- Expiry Logic: The code counts consecutive bars where the leading condition remains true. If confirmations do not line up within the user-defined “Signal Expiry Candle Count,” the setup is abandoned and the signal does not trigger.
- Alternation: An optional state ensures that long and short signals alternate. This can reduce repeated entries in the same direction without a clear reset.
- Finally, longCondition and shortCondition represent the actionable signals after expiry and alternation logic. These drive the label plotting and alert conditions.
Visualization
- Buy and Sell Labels: When longCondition or shortCondition confirm, the script plots annotated labels directly on the chart, making entries easy to see at a glance. The labels use color coding and clear text tags (“long” vs. “short”).
- Dashboard: A table summarizes the status of the leading indicator and all confirmations. Each row shows the indicator label and whether it passed (✔️) or failed (❌) on the current bar. This intensely practical UI helps you diagnose why a signal did or did not trigger, empowering faster strategy iteration and parameter tuning.
- Failed Confirmation Markers: If a setup expires (count exceeds the limit) and confirmations failed to align, the script can mark the chart with a small label and provide a tooltip listing which confirmations did not pass. It’s a helpful audit trail to understand missed trades or prevent “chasing” invalid signals.
- Data Window Values: The script outputs signal states to the data window, which can be useful for debugging or building composite conditions in multi-indicator templates.
Inputs and Parameters
- You control the indicator from a comprehensive input panel:
- Setup: Signal expiry count, whether to enforce alternating signals, and whether to display labels and the dashboard (including position and size).
- Leading Indicator: Choose the primary signal generator from the large list.
- Per-Filter Toggles: For each confirmation, a respect... toggle enables or disables it. Many include sub-options (like MACD type, Stochastic mode, RSI mode, ADX variants, thresholds for choppiness/volatility, etc.) to fine-tune behavior.
- Range Filter Settings: Choose type and behavior; select default vs. DW mode and smoothing. The underlying functions adjust band sizes using ATR, average change, standard deviation, or user-defined scales.
- Because everything is customizable, you can adapt the indicator to different assets, volatility regimes, and timeframes.
Alerts and Automation
- The script defines alert conditions tied to longCondition and shortCondition . You can set these alerts in your chart to trigger notifications or webhook calls for automated execution in external bots. The alert text is simple, and you can configure your own message template when creating alerts in the chart, including JSON payloads for algorithmic integration.
Typical Workflow
- Select a Leading Indicator aligned with your style. For trend following, Supertrend or SSL may be appropriate; for momentum, MACD or TSI; for range/trend-change detection, Range Filter, RQK, or Donchian.
- Add a few key Confirmation Filters that complement the leading signal. For example:
- Pair Supertrend with EMA Filter and RSI MA Direction to ensure trend alignment and positive momentum.
- Combine MACD Crossover with ADX/DMI and Volume Above MA to avoid signals in low-trend or low-liquidity conditions.
- Use RQK with Choppiness Index and Damiani Volatility to only act when the market is trending and volatile enough.
- Set a sensible Signal Expiry Candle Count. Shorter expiry keeps entries timely and reduces lag; longer expiry captures setups that mature slowly.
- Observe the Dashboard during live markets to see which filters pass or fail, then iterate. Tighten or loosen thresholds and filter combinations as needed.
- For automation, turn on alerts for the final conditions and use webhook payloads to notify your trading robot.
Strengths and Practical Notes
- Flexibility: The indicator is a toolkit rather than a single rigid model. It lets you test different combinations rapidly and visualize outcomes immediately.
- Clarity: Labels, dashboard, and failed-confirmation markers make it easy to audit behavior and refine settings without digging into code.
- Robustness: The expiry and alternation options add discipline, avoiding the temptation to enter late or repeatedly in one direction without a reset.
- Modular Design: The logical gates (“respect…”) make the behavior transparent: if a filter is on, it must pass; if it’s off, the signal ignores it. This keeps reasoning clean.
- Avoiding Overfitting: Because you can stack many filters, it’s tempting to over-constrain signals. Start simple (one leading indicator and one or two confirmations). Add complexity only if it demonstrably improves your edge across varied market regimes.
Limitations and Recommendations
- No single configuration is universally optimal. Markets change; tune filters for the instrument and timeframe you trade and revisit settings periodically.
- Trend filters can underperform in choppy markets; likewise, momentum filters can false-trigger in quiet periods. Consider using Choppiness Index or Damiani to gate signals by regime.
- Use expiry wisely. Too short may miss good setups that need a few bars to confirm; too long may cause late entries. Balance responsiveness and accuracy.
- Always consider risk management externally (position sizing, stops, profit targets). The indicator focuses on signal quality; combining it with robust trade management methods will improve results.
Example Configurations
- Trend-Following Setup:
- Leading: Supertrend uptrend for longs and downtrend for shorts.
- Confirmations: EMA Filter (price above 200 EMA for long, below for short), ADX/DMI (trend strength above threshold with +DI/-DI alignment), Volume Above MA.
- Expiry: 3–4 bars to keep entries timely.
- Result: Strong bias toward sustained moves while avoiding weak trends and thin liquidity.
- Mean-Reversion to Momentum Crossover:
- Leading: RSI exits from OB/OS zones (e.g., RSI leaves oversold for long and leaves overbought for short).
- Confirmations: 2 EMA Cross (fast crossing slow in the same direction), MACD zero-line behavior for added momentum validation.
- Expiry: 2–3 bars for responsive re-entry.
- Result: Captures momentum transitions after short-term extremes, with extra confirmation to reduce head-fakes.
- Range Breakout Focus:
- Leading: Range Filter Type 2 or Donchian Trend Ribbon to detect breakouts.
- Confirmations: Damiani Volatility (avoid low-volatility false breaks), Choppiness Index (prefer trend-ready states), ROC positive/negative threshold.
- Expiry: 1–3 bars to act on breakout windows.
- Result: Better alignment to breakout dynamics, gating trades by volatility and regime.
Conclusion
- This indicator is a comprehensive, configurable framework that merges a chosen leading signal with an array of corroborating filters, disciplined expiry handling, and intuitive visualization. It’s designed to help you build high-quality entry signals tailored to your approach, whether that’s trend-following, breakout trading, momentum capturing, or a hybrid. By surfacing pass/fail states in a dashboard and allowing alert-based automation, it bridges the gap between discretionary analysis and systematic execution. With sensible parameter tuning and thoughtful filter selection, it can serve as a robust backbone for signal generation across diverse instruments and timeframes.
Dynamic S/R# Complete Parameter Guide
## 1. Lookback Bars (Default: 500)
- **Function**: Number of historical bars the script analyzes to identify levels
- **Example**: If set to 500, the script examines the last 500 candles
- **Increase when**: Trading long-term, searching for old historical levels
- **Decrease when**: Day trading or short-term trading, viewing only recent levels
- **Recommendation**: 200-300 for day trading, 500-1000 for swing trading
## 2. Min Touches (Default: 3)
- **Function**: Minimum number of touches required for a level to be considered valid
- **Example**: If set to 3, a level with only 2 touches will not be displayed
- **Increase (4-5) when**: You want only very strong and confirmed levels
- **Decrease (2) when**: You want to identify potential levels early
- **Recommendation**: 3 is a balanced value - not too loose, not too strict
## 3. Extrema Type (Default: both)
- **Function**: Which type of extrema to identify
- **Options**:
- **min**: Support levels only (pivot lows)
- **max**: Resistance levels only (pivot highs)
- **both**: Both types
- **When to change**:
- In uptrend looking for support only: select "min"
- In downtrend looking for resistance only: select "max"
## 4. Pivot Window (Default: 5)
- **Function**: How many bars on each side are required to confirm a pivot
- **Technical explanation**: pivot low = price lower than 5 bars before it and 5 bars after it
- **Increase (7-10) when**:
- More significant extrema needed
- Less noise, fewer levels
- Good for higher timeframes
- **Decrease (3-4) when**:
- More sensitivity needed
- More levels wanted
- Good for scalping
- **Important**: Higher value = quality over quantity
## 5. Clustering Sensitivity % (Default: 0.5%)
- **Function**: Percentage deviation allowed to group touches into the same level
- **Example**: If level at $100 and sensitivity 0.5%, touches between $99.5-$100.5 count as same level
- **Increase (1-2%) when**:
- Volatile assets (crypto, small stocks)
- More consolidation of nearby levels
- Fewer levels on chart
- **Decrease (0.2-0.3%) when**:
- Stable assets (indices, forex majors)
- Higher precision needed
- Separation between close levels
- **Recommendation**: Start at 0.5% and adjust per instrument
## 6. Max Levels to Show (Default: 10)
- **Function**: Maximum number of support/resistance lines displayed on chart
- **Selection criteria**: Script prioritizes levels by:
1. Number of touches (more = stronger)
2. Price spread (tighter = more accurate)
3. Recency (most recent touch closer to present)
- **Low value (5-10)**: Clean chart with only strongest levels
- **High value (20-50)**: More options, including weaker levels
## 7. Min Bar Separation (Default: 5)
- **Function**: Minimum distance in bars between two touches of the same type (min or max)
- **Why important**: Prevents double-counting the same extremum
- **Example**: If pivot low at bar 100 and another at bar 103, only one counts
- **Increase (10-20) when**:
- Lower timeframes with much noise
- Avoiding false consolidation
- **Decrease (2-3) when**:
- Higher timeframes
- Identifying quick movements
## 8. Alert Proximity % (Default: 1%)
- **Function**: Distance from level at which to trigger alert
- **Example**: Level at $100, proximity 1% = alert between $99-$101
- **Increase (2-3%) when**:
- Earlier alerts wanted
- More preparation time needed
- May create false alerts
- **Decrease (0.5%) when**:
- More precise alerts wanted
- Stronger confirmation needed
- Less reaction time
- **Recommendation**: 1% works well for most cases
## 9. Show Price Bands (Default: true)
- **Function**: Displays zone around level instead of just a line
- **Zone size**: Plus/minus Clustering Sensitivity %
- **Why useful**:
- Levels are never exact lines
- Zone better represents reality
- Helps identify entries and exits within zone
- **Off**: Cleaner chart with only lines
## 10. Show Info Table (Default: true)
- **Function**: Displays information table in chart corner
- **Table contents**:
- Type: S (Support) / R (Resistance) / N (Neutral)
- Price: Level price
- Touches: Number of touches
- Bars Ago: How many bars since last touch
- **Off**: If you know the levels and want a clean chart
## Recommended Settings by Trading Style:
### Day Trading (Intraday)
```
Lookback Bars: 200-300
Min Touches: 2-3
Pivot Window: 3-5
Sensitivity: 0.3-0.5%
Max Levels: 5-8
```
### Swing Trading (Days-Weeks)
```
Lookback Bars: 500-800
Min Touches: 3-4
Pivot Window: 5-7
Sensitivity: 0.5-1%
Max Levels: 10-15
```
### Position Trading (Months)
```
Lookback Bars: 1000-2000
Min Touches: 4-5
Pivot Window: 7-10
Sensitivity: 1-2%
Max Levels: 8-12
```
**Important tip**: Start with default values and adjust gradually based on the asset and results.
Alerts v6The strategy includes:
✅ EMA-based trend direction (fast vs slow)
✅ RSI filtering for overbought/oversold control
✅ ADX confirmation for strong trend validation
✅ Pullback & BOS detection for precision entries
✅ Per-bar change logic for adaptive entry timing
✅ Session/day gating to control trading hours
✅ JSON alert integration for AI trading bots or webhooks
This script is Pine Script v6 compatible and optimized for automated alert-based trading setups such as AI trading bots, webhook systems, and VPS-linked executions.
Recommended Timeframes: 5m, 15m, 30m
Markets: XAUUSD, FX pairs, indices, and metals
Trend Following Reflectometry🧭 Trend Following Reflectometry (TFR)
Author: Stef Jonker
Version: Pine Script® v6
The Trend Following Reflectometry (TFR) indicator translates market behavior into the language of impedance and signal reflection theory, providing a unique way to measure trend strength, stability, and purity.
🧩 Summary
Trend Following Reflectometry acts as a trend-quality meter, helping traders identify when a trend is strong, efficient, and worth following — or when the market is too noisy to trust.
It blends physics-inspired logic with practical trading insight, offering both a directional oscillator and a trend stability filter in one tool.
⚙️ Concept
Inspired by electrical impedance matching, this tool compares the market’s characteristic impedance (Z₀) — its natural volatility-to-price behavior — with the load impedance (Zₗ), representing current trend momentum.
The interaction between these two produces a reflection coefficient (Gamma) and a VSWR ratio, which reveal how efficiently market trends are transmitting energy (moving smoothly) versus reflecting noise (becoming unstable).
📊 Core Components
Z₀ (Characteristic Impedance): Market baseline, derived from ATR and SMA.
Zₗ (Load Impedance): Trend momentum based on fast and slow EMAs.
Γ (Gamma – Reflection Coefficient): Measures the mismatch between Z₀ and Zₗ.
VSWR (Voltage Standing Wave Ratio): Quantifies trend purity — lower = cleaner trend.
Impedance Oscillator: Combines momentum and reflection to produce directional bias.
⚡ Gamma & VSWR Interpretation
Gamma (Γ) represents the reflection coefficient — how much of the market’s trend energy is being reflected instead of transmitted.
When Gamma is low, the market trend is smooth and efficient, moving with little resistance.
When Gamma is high, the market becomes unstable or overextended, signaling potential turbulence, exhaustion, or reversal pressure.
VSWR (Voltage Standing Wave Ratio) measures trend purity — how clean or distorted the current trend is.
A low VSWR indicates a well-aligned, steady trend that’s likely to continue smoothly.
A high VSWR suggests an unbalanced or noisy market, where trends may struggle to sustain or could soon reverse.
Together, Gamma and VSWR help identify how well the market’s current momentum aligns with its natural behavior — whether the trend is stable and efficient or reflecting instability beneath the surface.
RSI to Price Projection PanelThis indicator calculates the current RSI based on the closing price and projects estimated prices for user-defined RSI target levels. Results are displayed in a table at the top-right corner of the chart.
Multi-Timeframe EMA Trend Dashboard with Volume and RSI Filters═══════════════════════════════════════════════════════════
MULTI-TIMEFRAME EMA TREND DASHBOARD
═══════════════════════════════════════════════════════════
OVERVIEW
This indicator provides a comprehensive view of trend direction across multiple timeframes using the classic EMA 20/50 crossover methodology, enhanced with volume confirmation and RSI filtering. It aggregates trend information from six timeframes into a single dashboard for efficient market analysis.
The indicator is designed for educational purposes and to assist traders in identifying potential trend alignments across different time horizons.
═══════════════════════════════════════════════════════════
FEATURES
═══════════════════════════════════════════════════════════
MULTI-TIMEFRAME ANALYSIS
• Monitors 6 timeframes simultaneously: 1m, 5m, 15m, 1H, 4H, 1D
• Each timeframe analyzed independently using request.security()
• Non-repainting implementation with proper lookahead settings
• Calculates overall trend strength as percentage of bullish timeframes
EMA CROSSOVER SYSTEM
• Fast EMA (default: 20) and Slow EMA (default: 50)
• Bullish: Fast EMA > Slow EMA
• Bearish: Fast EMA < Slow EMA
• Neutral: Fast EMA = Slow EMA (rare condition)
• Visual EMA plots with optional fill area
VOLUME CONFIRMATION
• Optional volume filter for crossover signals
• Compares current volume against moving average (default: 20-period SMA)
• Categorizes volume as: High (>1.5x average), Normal (>average), Low (70), oversold (<30), and neutral zones
• Used in quality score calculation
• Optional display toggle
SUPPORT & RESISTANCE DETECTION
• Automatic detection using highest/lowest over lookback period (default: 50 bars)
• Plots resistance (red), support (green), and mid-level (gray)
• Step-line style for clear visualization
• Optional display toggle
QUALITY SCORING SYSTEM
• Rates trade setups from 1-5 stars
• Considers: MTF alignment, volume confirmation, RSI positioning
• 5 stars: 4+ timeframes aligned + volume confirmed + RSI 50-70
• 4 stars: 4+ timeframes aligned + volume confirmed
• 3 stars: 3+ timeframes aligned
• 2 stars: Exactly 3 timeframes aligned
• 1 star: Other conditions
VISUAL DASHBOARD
• Clean table display (position customizable)
• Color-coded trend indicators (green/red/yellow)
• Extended statistics panel (toggleable)
• Shows: Trends, Strength, Quality, RSI, Volume, Price Distance
═══════════════════════════════════════════════════════════
TECHNICAL SPECIFICATIONS
═══════════════════════════════════════════════════════════
CALCULATIONS
Trend Determination per Timeframe:
• request.security() fetches EMA values with gaps=off, lookahead=off
• Compares Fast EMA vs Slow EMA
• Returns: 1 (bullish), -1 (bearish), 0 (neutral)
Trend Strength:
• Counts number of bullish timeframes
• Formula: (bullish_count / 6) × 100
• Range: 0% (all bearish) to 100% (all bullish)
Price Distance from EMA:
• Formula: ((close - EMA) / EMA) × 100
• Positive: Price above EMA
• Negative: Price below EMA
• Warning when absolute distance > 5%
ANTI-REPAINTING MEASURES
• All request.security() calls use lookahead=barmerge.lookahead_off
• Dashboard updates only on barstate.islast
• Historical bars remain unchanged
• Crossover signals finalize on bar close
═══════════════════════════════════════════════════════════
USAGE GUIDE
═══════════════════════════════════════════════════════════
INTERPRETING THE DASHBOARD
Timeframe Rows:
• Each row shows individual timeframe trend status
• Look for alignment (multiple timeframes same direction)
• Higher timeframes generally more significant
Strength Indicator:
• >66.67%: Strong bullish (4+ timeframes bullish)
• 33.33-66.67%: Mixed/choppy conditions
• <33.33%: Strong bearish (4+ timeframes bearish)
Quality Score:
• Higher stars = better confluence of factors
• 5-star setups have strongest multi-factor confirmation
• Lower scores may indicate weaker or conflicting signals
SUGGESTED APPLICATIONS
Trend Confirmation:
• Check if multiple timeframes confirm current chart trend
• Higher agreement = stronger trend confidence
• Use for position sizing decisions
Entry Timing:
• Wait for EMA crossover on chart timeframe
• Confirm with higher timeframe alignment
• Volume above average preferred
• RSI not in extreme zones
Divergence Detection:
• When lower timeframes diverge from higher
• May indicate trend exhaustion or reversal
• Requires additional confirmation
CUSTOMIZATION
EMA Settings:
• Adjust Fast/Slow lengths for different sensitivities
• Shorter periods = more responsive, more signals
• Longer periods = smoother, fewer signals
• Common alternatives: 10/30, 12/26, 50/200
Volume Filter:
• Enable for higher-quality signals (fewer false positives)
• Disable in always-liquid markets or for more signals
• Adjust MA length based on typical volume patterns
Display Options:
• Toggle EMAs, S/R levels, extended stats as needed
• Choose dashboard position to avoid chart overlap
• Adjust colors for visibility preferences
═══════════════════════════════════════════════════════════
ALERTS
═══════════════════════════════════════════════════════════
AVAILABLE ALERT CONDITIONS
1. Bullish EMA Cross (Volume Confirmed)
2. Bearish EMA Cross (Volume Confirmed)
3. Strong Bullish Alignment (4+ timeframes)
4. Strong Bearish Alignment (4+ timeframes)
5. Trend Strength Increasing (>16.67% jump)
6. Trend Strength Decreasing (>16.67% drop)
7. Excellent Trade Setup (5-star rating)
Alert messages use standard placeholders:
• {{ticker}} - Symbol name
• {{close}} - Current close price
• {{time}} - Bar timestamp
═══════════════════════════════════════════════════════════
LIMITATIONS & CONSIDERATIONS
═══════════════════════════════════════════════════════════
KNOWN LIMITATIONS
• Lower timeframe data may not be available on all symbols
• 1-minute data typically limited to recent history
• request.security() subject to TradingView data limits
• Dashboard requires screen space (may overlap on small screens)
• More complex calculations may affect load time on slower devices
NOT SUITABLE FOR
• Highly volatile/illiquid instruments (many false signals)
• News-driven markets during announcements
• Automated trading without additional filters
• Markets where EMA strategies don't perform well
DOES NOT PROVIDE
• Exact entry/exit prices
• Stop-loss or take-profit levels
• Position sizing recommendations
• Guaranteed profit signals
• Market predictions
═══════════════════════════════════════════════════════════
BEST PRACTICES
═══════════════════════════════════════════════════════════
RECOMMENDED USAGE
✓ Combine with price action analysis
✓ Use appropriate risk management
✓ Backtest on historical data before live use
✓ Adjust settings for specific market characteristics
✓ Wait for higher-quality setups in important trades
✓ Consider overall market context and fundamentals
NOT RECOMMENDED
✗ Using as standalone trading system without confirmation
✗ Trading every signal without discretion
✗ Ignoring risk management principles
✗ Trading without understanding the methodology
✗ Applying to unsuitable markets/timeframes
═══════════════════════════════════════════════════════════
EDUCATIONAL BACKGROUND
═══════════════════════════════════════════════════════════
EMA CROSSOVER STRATEGY
The Exponential Moving Average crossover is a classical trend-following technique:
• Golden Cross: Fast EMA crosses above Slow EMA (bullish signal)
• Death Cross: Fast EMA crosses below Slow EMA (bearish signal)
• Widely used since the 1970s in various markets
• More responsive than SMA due to exponential weighting
MULTI-TIMEFRAME ANALYSIS
Analyzing multiple timeframes helps traders:
• Identify alignment between short and long-term trends
• Reduce false signals from single-timeframe noise
• Understand market context across different horizons
• Make informed decisions about trade duration
VOLUME ANALYSIS
Volume confirmation adds reliability:
• High volume suggests institutional participation
• Low volume signals may indicate false breakouts
• Volume precedes price in many market theories
• Helps distinguish genuine moves from noise
═══════════════════════════════════════════════════════════
TECHNICAL IMPLEMENTATION
═══════════════════════════════════════════════════════════
CODE STRUCTURE
• Organized in clear sections with proper commenting
• Uses explicit type declarations (int, float, bool, color, string)
• Constants defined at top (BULLISH=1, BEARISH=-1, etc.)
• Functions documented with @function, @param, @returns
• Follows PineCoders naming conventions (camelCase variables)
PERFORMANCE OPTIMIZATION
• var keyword for table (created once, not every bar)
• Calculations cached where possible
• Dashboard updates only on last bar
• Minimal redundant security() calls
SECURITY IMPLEMENTATION
• Proper gaps and lookahead parameters
• No future data leakage
• Signals finalize on bar close
• Historical bars remain static
═══════════════════════════════════════════════════════════
VERSION INFORMATION
═══════════════════════════════════════════════════════════
Current Version: 2.0
Pine Script Version: 5
Last Updated: 2024
Developed by: Zakaria Safri
═══════════════════════════════════════════════════════════
SETTINGS REFERENCE
═══════════════════════════════════════════════════════════
EMA SETTINGS
• Fast EMA Length: 1-500 (default: 20)
• Slow EMA Length: 1-500 (default: 50)
VOLUME & MOMENTUM
• Use Volume Confirmation: true/false (default: true)
• Volume MA Length: 1-500 (default: 20)
• Show RSI Levels: true/false (default: true)
• RSI Length: 1-500 (default: 14)
PRICE ACTION FEATURES
• Show Price Distance: true/false (default: true)
• Show Key Levels: true/false (default: true)
• S/R Lookback Period: 10-500 (default: 50)
DISPLAY SETTINGS
• Show EMAs on Chart: true/false (default: true)
• Fast EMA Color: customizable (default: cyan)
• Slow EMA Color: customizable (default: orange)
• EMA Line Width: 1-5 (default: 2)
• Show Fill Between EMAs: true/false (default: true)
• Show Crossover Signals: true/false (default: true)
DASHBOARD SETTINGS
• Position: Top Left/Right, Bottom Left/Right
• Show Extended Statistics: true/false (default: true)
ALERT SETTINGS
• Alert on Multi-TF Alignment: true/false (default: true)
• Alert on Trend Strength Change: true/false (default: true)
═══════════════════════════════════════════════════════════
RISK DISCLAIMER
═══════════════════════════════════════════════════════════
This indicator is provided for educational and informational purposes only. It should not be considered financial advice or a recommendation to buy or sell any security.
IMPORTANT NOTICES:
• Past performance does not indicate future results
• All trading involves risk of capital loss
• No indicator guarantees profitable trades
• Always conduct independent research and analysis
• Use proper risk management and position sizing
• Consult a qualified financial advisor before trading
• The developer assumes no liability for trading losses
By using this indicator, you acknowledge that you understand these risks and accept full responsibility for your trading decisions.
═══════════════════════════════════════════════════════════
SUPPORT & CONTRIBUTIONS
═══════════════════════════════════════════════════════════
FEEDBACK WELCOME
• Constructive comments appreciated
• Bug reports help improve the indicator
• Feature suggestions considered for future versions
• Share your experience to help other users
OPEN SOURCE
This code is published as open source for the TradingView community to:
• Learn from the implementation
• Modify for personal use
• Understand multi-timeframe analysis techniques
If you find this indicator useful, please consider:
• Leaving a thoughtful review
• Sharing with other traders who might benefit
• Following for future updates and releases
═══════════════════════════════════════════════════════════
ADDITIONAL RESOURCES
═══════════════════════════════════════════════════════════
RECOMMENDED READING
• TradingView Pine Script documentation
• PineCoders community resources
• Technical analysis textbooks on moving averages
• Multi-timeframe trading strategy guides
• Risk management principles
RELATED CONCEPTS
• Trend following strategies
• Moving average convergence/divergence
• Multiple timeframe analysis
• Volume-price relationships
• Momentum indicators
═══════════════════════════════════════════════════════════
Thank you for using this indicator. Trade responsibly and continue learning!
═══════════════════════════════════════════════════════════
Squeeze Breakout Strategy [KedArc Quant]Description:
Squeeze Breakout strategy looks for volatility compression (Bollinger Bands inside Keltner Channels = a “squeeze”), then trades the volatility expansion in the direction of a momentum filter.
🧠 How the “Squeeze → Expansion” works
- Markets alternate between quiet (compressed) and active (expanded) phases.
- We call it a squeeze when Bollinger Bands (BB)—which reflect standard deviation around price—shrink inside the Keltner Channels (KC)—which reflect ATR/range.
- This means dispersion (stdev) is small relative to typical range (ATR). Price is coiling; participants are agreeing on value.
- When BB pops back outside KC, the squeeze releases. That’s the first sign that volatility is expanding again.
- A release alone doesn’t tell you direction. That’s why this strategy pairs the release with a momentum filter:
- We estimate momentum using a smoothed linear-regression slope of price (a clean proxy for acceleration).
- If the slope is positive at release, we favor longs; if negative, we favor shorts.
- Optionally, you can require Band Break + Momentum (price closes beyond the BB) for a stricter entry.
- This combination aims to capture the first leg of the range-to-trend transition while avoiding random pokes that often occur during tight consolidations.
💡 Why this is unique
Two entry modes (toggle):
1. Release + Momentum (enter when the squeeze turns off)
2. Band Break + Momentum (enter on a close beyond BB with momentum)
- Momentum = smoothed linear-regression slope, a clean thrust detector that’s less laggy than many oscillators.
- Risk module included: ATR stop, optional 1R partial take-profit, and a Chandelier trailing stop for the runner.
- Practical filters: higher-timeframe EMA trend alignment, volume surge, minimum BB width, and session window—so it adapts across markets/timeframes.
- Backtest-ready: uses TradingView’s `strategy.` framework with commission/slippage controls.
📈 How it helps traders
✅Regime clarity: distinguishes compression vs. expansion so you’re not forcing trades during dead zones.
✅Objective entries: momentum + band logic reduces discretionary “feel” and late chases.
✅Built-in risk plan: stop/targets/trailing defined in inputs—consistent execution across tickers.
✅Adaptable: works across instruments/timeframes; filters let you tailor noise tolerance per market session.
✅Alerts: real-time signals for entry and squeeze release.
✅Not a Mash-Up / Original Work
✅Fully authored in Pine Script v6; no external libraries or copied logic blocks.
✅Uses well-known, documented formulas (BB, KC, ATR, LinReg slope) combined into a new rule set (two entry modes + momentum + structured exits).
✅Code and parameters are transparent and adjustable; the script stands alone.
🧩 Formulas (core)
Bollinger Bands
# Basis = `SMA(close, bbLen)`
# Upper/Lower = `Basis ± bbMult × stdev(close, bbLen)`
# Width% = `(Upper − Lower) / Basis × 100`
Keltner Channels
# Basis = `EMA(close, kcLen)`
# Upper/Lower = `Basis ± kcMult × ATR(kcATR)`
Squeeze state
# ON: `BB_Upper < KC_Upper` and `BB_Lower > KC_Lower`
# Release: `squeeze_on ` and `not squeeze_on`
Momentum (this script)
# `lin = linreg(close, momLen, 0)`
# `mom = SMA( lin − lin , momSmoothing )`
# Long bias when `mom > 0`; short bias when `mom < 0`.
⚙️ Inputs
Compression
`bbLen`, `bbMult` — BB length & std-dev multiplier
`kcLen`, `kcATR`, `kcMult` — KC lengths & ATR multiplier
`Entry Mode` — Release + Momentum, Band Break + Momentum, or Either
Momentum
`momLen`, `momSmoothing`
Filters (optional)
`Use HTF Trend Filter` + `HTF Timeframe` + `HTF EMA Length`
`Require Volume Surge` (`volLen`, `volMult`)
`Avoid Ultra-Low Vol` (`Min BB Width %`)
`Session` window
Risk / Exits
`ATR Length`, `ATR Stop Multiplier`
`Take Profit at 1R` (with Partial 50%)
`Chandelier` (`chLen`, `chMult`)
Optional `Time Stop (bars)`
🎯 Entry & Exit Rules
Entry (choose one mode):
1. Release + Momentum (default)
Long: on the bar the squeeze releases and `mom > 0`, passing all enabled filters.
Short: on the bar the squeeze releases and `mom < 0`, passing filters.
2. Band Break + Momentum
Long: `close > BB_Upper` and `mom > 0`, with filters.
Short: `close < BB_Lower` and `mom < 0`, with filters.
Initial Stop
ATR-based: `Stop Distance = atrMult × ATR(atrLen)` from entry.
Targets & Runner
TP1 at 1R (optional): take 50% at `entry + 1R` (long) / `entry − 1R` (short).
Runner: remaining position trails a Chandelier stop:
Long trail = `highest(high, chLen) − chMult × ATR`
Short trail = `lowest(low, chLen) + chMult × ATR`
Optional Time Stop: close the trade after N bars in position.
Labels on chart
“Long” / “Short” = entry signals.
“L-TP1 / S-TP1” = partial exits at 1R.
“L-Runner / S-Runner” = trailing-stop exits of the runner.
Alerts
Provided for Long Entry, Short Entry, and Squeeze Release.
💬 How to use
1. Choose your market/timeframe (e.g., NSE 5–15m intraday, 60m–Daily for swing).
2. If you prefer cleaner trends, enable the HTF EMA filter (e.g., 240m/1D).
3. For intraday, consider Band Break + Momentum with Volume Surge and a small Min BB Width.
4. Adjust ATR/Chandelier multipliers to fit your risk tolerance and instrument.
Abbreviations
BB – Bollinger Bands
KC – Keltner Channels
ATR – Average True Range
SMA / EMA – Simple/Exponential Moving Average
HTF – Higher Timeframe
R – Risk unit (equal to the initial stop distance)
⚠️ Disclaimer
This script is for educational purposes only. Past performance ≠ future returns. Always paper trade first. Options trading carries high risk — manage exposure responsibly.
RSI Divergence Strategy v6 What this does
Detects regular and hidden divergences between price and RSI using confirmed RSI pivots. Adds RSI@pivot entry gates, a normalized strength + volume filter, optional volume gate, delayed entries, and transparent risk management with rigid SL and activatable trailing. Visuals are throttled for clarity and include a gap-free horizontal RSI gradient.
How it works (simple)
🧮 RSI is calculated on your selected source/period.
📌 RSI pivots are confirmed with left/right lookbacks (lbL/lbR). A pivot becomes final only after lbR bars; before that, it can move (expected).
🔎 The latest confirmed pivot is compared against the previous confirmed pivot within your bar window:
• Regular Bullish = price lower low + RSI higher low
• Hidden Bullish = price higher low + RSI lower low
• Regular Bearish = price higher high + RSI lower high
• Hidden Bearish = price lower high + RSI higher high
💪 Each divergence gets a strength score that multiplies price % change, RSI change, and a volume ratio (Volume SMA / Baseline Volume SMA).
• Set Min divergence strength to filter tiny/noisy signals.
• Turn on the volume gate to require volume ratio ≥ your threshold (e.g., 1.0).
🎯 RSI@pivot gating:
• Longs only if RSI at the bullish pivot ≤ 30 (default).
• Shorts only if RSI at the bearish pivot ≥ 70 (default).
⏱ Entry timing:
• Immediate: on divergence confirm (delay = 0).
• Delayed: after N bars if RSI is still valid.
• RSI-only mode: ignore divergences; use RSI thresholds only.
🛡 Risk:
• Rigid SL is placed from average entry.
• Trailing activates only after unrealized gain ≥ threshold; it re-anchors on new highs (long) or new lows (short).
What’s NEW here (vs. the reference) — and why you may care
• Improved pivots + bar window → fewer early/misaligned signals; cleaner drawings.
• RSI@pivot gates → entries aligned with true oversold/overbought at the exact decision bar.
• Normalized strength + volume gate → ignore weak or low-volume divergences.
• Delayed entries → require the signal to persist N bars if you want more confirmation.
• Rigid SL + activatable trailing → trailing engages only after a cushion, so it’s less noisy.
• Clutter control + gradient → readable chart with a smooth RSI band look.
Suggested starting values (clear ranges)
• RSI@pivot thresholds: LONG ≤ 30 (oversold), SHORT ≥ 70 (overbought).
• Min divergence strength:
0.0 = off
3–6 = moderate filter
7–12 = strict filter for noisy LTFs
• Volume gate (ratio):
1.0 = at least baseline volume
1.2–1.5 = strong-volume only (fewer but cleaner signals)
• Pivot lookbacks:
lbL 1–2, lbR 3–4 (raise lbR to confirm later and reduce noise)
• Bar window (between pivots):
Min 5–10, Max 30–60 (increase Min if you see micro-pivots; increase Max for wider structures)
• Risk:
Rigid SL 2–5% on liquid majors; 5–10% on higher-volatility symbols
Trailing activation 1–3%, trailing 0.5–1.5% are common intraday starts
Plain-text examples
• BTCUSDT 1h → RSI 9, lbL 1, lbR 3, Min strength 5.0, Volume gate 1.0, SL 4.5%, Trail on 2.0%, Trail 1.0%.
• SPY 15m → RSI 8, lbL 1, lbR 3, Min strength 7.0, Volume gate 1.2, SL 3.0%, Trail on 1.5%, Trail 0.8%.
• EURUSD 4h → RSI 14, lbL 2, lbR 4, Min strength 4.0, Volume gate 1.0, SL 2.5%, Trail on 1.0%, Trail 0.5%.
Notes & limitations
• Pivot confirmation means the newest candidate pivot can move until lbR confirms it (expected).
• Results vary by timeframe/symbol/settings; always forward-test.
• Educational tool — no performance or profit claims.
Credits
• RSI by J. Welles Wilder Jr. (1978).
• Reference divergence script by eemani123:
• This version by tagstrading 2025 adds: improved pivot engine, RSI@pivot gating, normalized strength + optional volume gate, delayed entries, rigid SL and activatable trailing, and a gap-free RSI gradient.
NY Session Divisions⭐NY Session Divisions - Professional Trading Session Manager
NY Session Divisions is an advanced trading indicator that professionally segments the New York trading day into precise sessions, providing institutional-grade market structure analysis with smart breakout detection and comprehensive filtering systems.
✨ KEY FEATURES
🕒 8 Professional Trading Sessions
- US Overnight Range (03:30-11:50)
- NY Pre-Open (16:45-17:00)
- NY First Session ORB (17:00-17:15)
- Premarket Range - Recommended by Mahdi Salari*
- NY Midday Range
- NY 2nd Pre-Open
- 2nd Session ORB
- US After Hours ORB
🎯 Advanced Trading Strategies
- School Run Strategy (SRS) by Tom Hougaard - Breakout-focused approach
- Anti-SRS Strategy - Range-trading methodology
- Dual Strategy System - Combine breakout and range trading for maximum flexibility
🔔 Smart Alert System
- Multi-timeframe confirmation
- Heiken Ashi candle validation
- Customizable alert conditions
- Sound notifications with detailed messages
- Post-close confirmation to avoid false signals
🛡️ Professional Filter Stack
- Ichimoku Baseline
- Divergence Detection - Advanced market analysis
- EMA 200 Filter - Trend alignment
- Ichimoku Baseline - Market structure
- ATR Filter - Volatility validation
- RSI Filter - Momentum confirmation
🎨 Advanced Visualization
- Clean session range displays
- Professional Heiken Ashi candles
- Smart breakout markers (Small/Tiny for signal strength)
- Take Profit lines with ATR-based calculations
- Customizable colors and opacity
🏆 WHY TRADERS LOVE THIS INDICATOR
✅ For Breakout Traders
- Precise session boundary detection
- Clean breakout signals with confirmation
- Multiple filter validation
✅ For Range Traders
- Clear session range identification
- Anti-SRS strategy for range-bound markets
- Support/Resistance level tracking
✅ For Professional Traders
- Institutional-grade session management
- Comprehensive filtering system
- Multi-timeframe analysis
- Customizable risk management
⚡ QUICK START GUIDE
Basic Setup (2 Minutes)
1. Enable Sessions** - Choose 1-2 sessions to start
2. Set Alerts - Configure your preferred notification method
3. Apply Filters - Enable EMA 200 and Ichimoku for starters
Advanced Configuration
- Combine SRS + Anti-SRS for comprehensive strategy
- Use multiple divergence filters for confirmation
- Customize TP lines based on your risk profile
- Drawing 1st and 2nd Session Close lines
PROFESSIONAL TIPS
Session Selection Strategy
- Start with Session 1 (US Overnight) for overall market trend identification
- Add Session 3 (NY First ORB) for opening momentum
- Use Session 4 (Premarket) for the best perfomance of the breakout strategy
Filter Optimization
- Conservative : EMA 200 + Ichimoku Baseline
- Balanced : Add ATR filter for volatility check 0.8 is enough
- Aggressive : Enable all filters for maximum confirmation but the number of signal and performance will decrease
Risk Management
- Use TP lines for automatic profit targets
- Combine with proper position sizing
- Always use stop losses
🔧 TECHNICAL SPECIFICATIONS
- Platform : TradingView Pine Script v6
- Markets : All US trading instruments (ES, NQ, YM, CL, etc.)
- Timeframes : 1min to Daily
- Auto DST Handling : Yes
- Real-time Processing : Yes
📊 PERFORMANCE FEATURES
- Zero Repaint - All signals confirmed after candle close
- Multi-Timeframe - Works across all chart timeframes
- Resource Optimized - Efficient calculation methods
- User Customizable - Complete control over all parameters
- Consistent Performance - Reliable session-based signals
- Professional Grade - Institutional-level analysis tools
- Continuous Updates - Regular improvements and enhancements
- Community Supported - Active user community and support
🔄 KEEP UPDATED
Click the Favorite Star ⭐ to receive update notifications and stay current with new features and improvements!
Professional traders don't guess - they analyze. NY Session Divisions gives you the analytical edge.
Happy Trading! 📈
Created with precision for serious traders
DISCLAIMER
This indicator is for educational and informational purposes only. It should not be considered as financial advice. Always practice proper risk management and test strategies in demo accounts before live trading. Past performance does not guarantee future results.
Supersonic Volatility & Momentum IndicatorChange/update the setting as per your trading requirements!
Puell Multiple Variants [OperationHeadLessChicken]Overview
This script contains three different, but related indicators to visualise Bitcoin miner revenue.
The classical Puell Multiple : historically, it has been good at signaling Bitcoin cycle tops and bottoms, but due to the diminishing rewards miners get after each halving, it is not clear how you determine overvalued and undervalued territories on it. Here is how the other two modified versions come into play:
Halving-Corrected Puell Multiple : The idea is to multiply the miner revenue after each halving with a correction factor, so overvalued levels are made comparable by a horizontal line across cycles. After experimentation, this correction factor turned out to be around 1.63. This brings cycle tops close to each other, but we lose the ability to see undervalued territories as a horizontal region. The third variant aims to fix this:
Miner Revenue Relative Strength Index (Miner Revenue RSI) : It uses RSI to map miner revenue into the 0-100 range, making it easy to visualise over/undervalued territories. With correct parameter settings, it eliminates the diminishing nature of the original Puell Multiple, and shows both over- and undervalued revenues correctly.
Example usage
The goal is to determine cycle tops and bottoms. I recommend using it on high timeframes, like monthly or weekly . Lower than that, you will see a lot of noise, but it could still be used. Here I use monthly as the example.
The classical Puell Multiple is included for reference. It is calculated as Miner Revenue divided by the 365-day Moving Average of the Miner Revenue . As you can see in the picture below, it has been good at signaling tops at 1,3,5,7.
The problems:
- I have to switch the Puell Multiple to a logarithmic scale
- Still, I cannot use a horizontal oversold territory
- 5 didn't touch the trendline, despite being a cycle top
- 9 touched the trendline despite not being a cycle top
Halving-Corrected Puell Multiple (yellow): Multiplies the Puell Multiple by 1.63 (a number determined via experimentation) after each halving. In the picture below, you can see how the Classical (white) and Corrected (yellow) Puell Multiples compare:
Advantages:
- Now you can set a constant overvalued level (12.49 in my case)
- 1,3,7 are signaled correctly as cycle tops
- 9 is correctly not signaled as a cycle top
Caveats:
- Now you don't have bottom signals anymore
- 5 is still not signaled as cycle top
Let's see if we can further improve this:
Miner Revenue RSI (blue):
On the monthly, you can see that an RSI period of 6, an overvalued threshold of 90, and an undervalued threshold of 35 have given historically pretty good signals.
Advantages:
- Uses two simple and clear horizontal levels for undervalued and overvalued levels
- Signaling 1,3,5,7 correctly as cycle tops
- Correctly does not signal 9 as a cycle top
- Signaling 4,6,8 correctly as cycle bottoms
Caveats:
- Misses two as a cycle bottom, although it was a long time ago when the Bitcoin market was much less mature
- In the past, gave some early overvalued signals
Usage
Using the example above, you can apply these indicators to any timeframe you like and tweak their parameters to obtain signals for overvalued/undervalued BTC prices
You can show or hide any of the three indicators individually
Set overvalued/undervalued thresholds for each => the background will highlight in green (undervalued) or red (overvalued)
Set special parameters for the given indicators: correction factor for the Corrected Puell and RSI period for Revenue RSI
Show or hide halving events on the indicator panel
All parameters and colours are adjustable
EMA Crossover Signals [LummiCrypto]Handsome, just turn on the buy and sell alerts.
English Instruction
How to Use the EMA Crossover Signals Indicator
This TradingView Pine Script generates BUY and SELL signals based on the crossover of two Exponential Moving Averages (EMAs) with user-selectable lengths (9, 20, 50, 100, or 200). BUY signals occur when the first EMA crosses above the second EMA, and SELL signals occur when the first EMA crosses below the second EMA. Signals are visualized as tiny green triangles (BUY) below the bar and red triangles (SELL) above the bar. Alerts are set up using alertcondition() for compatibility with Telegram notifications.
1. Add the Script to TradingView
Open TradingView and go to the Pine Editor (bottom of the screen).
Copy and paste the Pine Script into the editor.
Click “Add to Chart” to apply the indicator to your chart.
2. Configure EMA Lengths
Double-click the indicator name (“EMA Crossover Signals”) on the chart to open its settings.
In the settings, select the “First EMA Length” and “Second EMA Length” from the dropdown menus. Options are 9, 20, 50, 100, or 200.
Note: Choose different lengths for the two EMAs (e.g., 9 and 20) to ensure crossovers can occur. Setting both to the same length will prevent signals.
Click “OK” to save the settings.
3. Set Up Alerts in TradingView
Click the “Alert” button (bell icon) at the top of TradingView.
In the alert creation window:
Select “EMA Crossover Signals” as the condition.
Choose either “BUY Signal” or “SELL Signal” from the condition dropdown.
Keep the default message (e.g., “EMA Crossover: BUY Signal at {{close}}”) or customize it if needed.
Set the frequency to “Once Per Bar Close” to avoid duplicate alerts.
Name the alert, e.g., “EMA Buy Alert” or “EMA Sell Alert”.
Repeat the process to create separate alerts for BUY and SELL signals if desired.
Click “Create” to activate the alert.
4. Connect Alerts to Telegram
To send BUY and SELL signals to Telegram, you need to link TradingView alerts to a Telegram bot or channel. Here are the options:
Option 1: Webhook Setup
Create a Telegram bot using BotFather in Telegram and obtain the bot token.
Set up a webhook server (e.g., using Python, Node.js, or a service like Heroku) to receive TradingView alerts and forward them to Telegram.
In the TradingView alert settings, enable “Webhook URL” and enter your server’s URL (e.g., your-server.com).
Configure your server to send the alert message to Telegram using the Telegram Bot API (e.g., api.telegram.org).
Option 2: Third-Party Service
Use a service like Zapier or IFTTT to connect TradingView alerts to Telegram.
Set up a zap with TradingView as the trigger (via webhook) and Telegram as the action to send messages to your chat or channel.
Follow the service’s instructions to link your Telegram bot and specify the destination chat or channel.
Option 3: TradingView’s Telegram Integration (if available)
If TradingView offers direct Telegram integration in your region, follow their official guide to link your Telegram account and configure alerts to send messages directly.
5. Test the Alerts
Create test alerts for both BUY and SELL signals to ensure they work correctly.
Verify that messages (e.g., “EMA Crossover: BUY Signal at 50000”) appear in your Telegram chat or channel.
Check that the signals (green triangles for BUY, red triangles for SELL) appear correctly on the chart.
Инструкция на русском
Как использовать индикатор EMA Crossover Signals
Этот Pine Script для TradingView генерирует сигналы на покупку (BUY) и продажу (SELL) на основе пересечения двух экспоненциальных скользящих средних (EMA) с длинами, выбираемыми пользователем (9, 20, 50, 100 или 200). Сигнал BUY появляется, когда первая EMA пересекает вторую EMA снизу вверх, а сигнал SELL — когда первая EMA пересекает вторую EMA сверху вниз. Сигналы отображаются в виде маленьких зеленых треугольников (BUY) под свечой и красных треугольников (SELL) над свечой. Для уведомлений в Telegram используются alertcondition().
1. Добавление скрипта в TradingView
Откройте TradingView и перейдите в редактор Pine (внизу экрана).
Скопируйте и вставьте Pine Script в редактор.
Нажмите «Добавить на график», чтобы применить индикатор.
2. Настройка длин EMA
Дважды щелкните по названию индикатора («EMA Crossover Signals») на графике, чтобы открыть настройки.
В настройках выберите «First EMA Length» (Длина первой EMA) и «Second EMA Length» (Длина второй EMA) из выпадающих меню. Варианты: 9, 20, 50, 100, 200.
Важно: Выберите разные длины для двух EMA (например, 9 и 20), чтобы сигналы пересечения были возможны. Если выбрать одинаковые длины, сигналы не будут генерироваться.
Нажмите «ОК», чтобы сохранить настройки.
3. Настройка алертов в TradingView
Нажмите на кнопку «Алерт» (значок колокольчика) вверху TradingView.
В окне создания алерта:
Выберите «EMA Crossover Signals» в качестве условия.
Выберите «BUY Signal» или «SELL Signal» из выпадающего списка условий.
Оставьте сообщение по умолчанию (например, «EMA Crossover: BUY Signal at {{close}}») или настройте его по желанию.
Установите частоту «Только при закрытии бара», чтобы избежать дублирования алертов.
Задайте имя алерта, например, «EMA Buy Alert» или «EMA Sell Alert».
Повторите процесс, чтобы создать отдельные алерты для сигналов BUY и SELL, если нужно.
Нажмите «Создать», чтобы активировать алерт.
4. Подключение алертов к Telegram
Чтобы отправлять сигналы BUY и SELL в Telegram, необходимо связать алерты TradingView с ботом или каналом Telegram. Варианты:
Вариант 1: Настройка вебхука
Создайте бота в Telegram с помощью BotFather и получите токен бота.
Настройте сервер вебхука (например, с использованием Python, Node.js или сервиса Heroku), чтобы принимать алерты от TradingView и отправлять их в Telegram.
В настройках алерта TradingView включите «Webhook URL» и укажите URL вашего сервера (например, your-server.com).
Настройте сервер для отправки сообщений в Telegram через Telegram Bot API (например, api.telegram.org).
Вариант 2: Сторонний сервис
Используйте сервисы, такие как Zapier или IFTTT, для связи алертов TradingView с Telegram.
Настройте задачу (zap), где TradingView будет триггером (через вебхук), а Telegram — действием для отправки сообщений в ваш чат или канал.
Следуйте инструкциям сервиса для подключения бота Telegram и указания чата или канала.
Вариант 3: Прямая интеграция TradingView с Telegram (если доступно)
Если TradingView поддерживает прямую интеграцию с Telegram в вашем регионе, следуйте их официальной инструкции для подключения вашего аккаунта Telegram и настройки отправки сообщений.
5. Тестирование алертов
Создайте тестовые алерты для сигналов BUY и SELL, чтобы убедиться, что они работают корректно.
Проверьте, что сообщения (например, «EMA Crossover: BUY Signal at 50000») появляются в вашем чате или канале Telegram.
Убедитесь, что сигналы (зеленые треугольники для BUY, красные треугольники для SELL) корректно отображаются на графике.
JOPA Channel (Dual-Volumed) v1 [JopAlgo]JOPA Channel (Dual-Volumed) v1
Short title: JOPAV1 • License: MPL-2.0 • Provider: JopAlgo
We have developed our own, first channel-based trading indicator and we’re making it available to all traders. The goal was a channel that breathes with the tape—built on a volume-weighted backbone—so the outcome stays lively instead of static. That led to the JOPA Channel.
All important features (at a glance)
In one line: A Rolling-VWAP channel whose width adapts with two volumes (RVOL + dollar-flow), adds order-flow asymmetry (OBV tilt) and regime awareness (Efficiency Ratio), and frames risk with outer containment bands from residual extremes—so you see fair value, momentum, and exhaustion in one view.
Feature list
Rolling VWAP centerline: Tracks where volume traded (fair value).
Dual-volume width: Bands expand/contract with relative volume and value traded (price×volume).
OBV tilt: Upper/lower widths skew toward the side actually pushing.
Regime adapter (ER): Tighter in trend, wider in chop—automatically.
Outer containment rails: Residual-extreme ceilings/floors, smoothed + margin.
20% / 80% guides: 20% light blue (discount), 80% light red (premium).
Squeeze dots (optional): Orange circles below candles during compression.
Non-repainting: Uses rolling sums and past-only math; no lookahead.
Default visual in this release
Containment rails + fill: ON (stepline, medium).
Inner Value rails + fill: Rails OFF (stepline, thin), fill ON (drawn only if rails are shown).
20% & 80% guides: ON (dashed, thin; 20% light blue, 80% light red).
Squeeze dots: OFF by default (orange circles when enabled).
What you see on the chart
RVWAP (centerline): Your compass for fair value.
Inner Value Bands (optional): Tight rails for breakouts and pullback timing.
Outer Containment Bands (default ON): High-confidence ceilings/floors for targets and fades.
20% / 80% guides: Quick read of “where in the channel” price is sitting.
Squeeze dots (optional): Volatility compression heads-up (no text labels).
Non-repainting note: The indicator does not revise closed bars. Forecast-Lock uses linear regression to extrapolate 1–3 bars ahead without using future data.
How to use it
Core reads (works on any timeframe)
Bias: Above a rising RVWAP → long bias; below a falling RVWAP → short bias.
Breakouts (momentum): Close beyond an Inner Value rail with RVOL ≥ threshold (alert provided).
Reversions (fades): Tag Outer Containment, stall, then close back inside → expect mean reversion toward RVWAP.
20/80 timing:
At/above 80% (light red) → premium/exhaustion risk; trim longs or consider fades if RVOL cools.
At/below 20% (light blue) → discount/exhaustion risk; trim shorts or consider longs if RVOL cools.
Squeeze clusters: When dots bunch up, expect a range break; use the Breakout alert as confirmation.
Playbooks by trading style
Day Trading (1–5m)
Setup: Keep the chart clean (Containment ON, Value rails OFF). Toggle Inner Value ON when hunting a breakout or timing a pullback.
Pullback Long: Dip to RVWAP / Lower Value with sub-threshold RVOL, then a close back above RVWAP → long.
Stop: Just beyond Lower Containment or the pullback swing.
Targets (1:1:1): ⅓ at RVWAP, ⅓ at Upper Value, ⅓ trail toward Upper Containment.
Breakout Long: After a squeeze cluster, take the Breakout Long alert (close > Upper Value, RVOL ≥ min). If no retest, demand the next bar holds outside.
Range Fade: Only when RVWAP is flat and dots cluster; short Upper Containment → RVWAP (mirror for longs at the lower rail).
Intraday (15m–1H)
HTF compass: Take bias from 4H.
Pullback Long: “Touch & reclaim” of RVWAP while RVOL cools; enter on the reclaim close or break of that candle’s high.
Breakout: Run Inner Value ON; act on Breakout alerts (RVOL gate ≈ 1.10–1.15 typical).
Avoid low-probability fades against the 4H slope unless RVWAP is flat.
Swing (4H–1D)
Continuation: In uptrends, buy pullbacks to RVWAP / Lower Value with sub-threshold RVOL; scale at Upper Containment.
Adds: Post-squeeze Breakout Long adds; trail on RVWAP or Lower Value.
Fades: Prefer when RVWAP flattens and price oscillates between containments.
Position (1D+)
Framework: Daily RVWAP slope + position within containment.
Add rule: Each reclaim of RVWAP after a dip is an add; trim into Upper Containment or near 80% light red.
Sizing: Containment distance is larger—size down and trail on RVWAP.
Inputs & Settings (complete)
Core
Source: Price input for RVWAP.
Rolling VWAP Length: Window of the centerline (higher = smoother).
Volume Baseline (RVOL): SMA window for relative volume.
Inner Value Bands (volatility-based width)
k·StdDev(residuals), k·ATR, k·MAD(residuals): Blend three measures into base width.
StdDev / ATR / MAD Lengths: Lookbacks for each.
Two-Volume Fusion
RVOL Exponent: How aggressively width responds to relative volume.
Dollar-Flow Gain: Adds push from price×volume (value traded).
Dollar-Flow Z-Window: Standardization window for dollar-flow.
Asymmetry (Order-Flow Tilt)
Enable Tilt (OBV): Lets flow skew upper/lower widths.
Tilt Strength (0..1): Gain applied to OBV slope z-score.
OBV Slope Z-Window: Window to standardize OBV slope.
Regime Adapter
Efficiency Ratio Lookback: Measures trend vs chop.
ER Width Min/Max: Maps ER into a width factor (tighter in trend, wider in chop).
Band Tracking (inner value rails)
Tracking Mode:
Base: Pure base rails.
Parallel-Lock: Smooth RVWAP & width; track in parallel.
Slope-Lock: Adds a fraction of recent slope (momentum-friendly).
Forecast-Lock: 1–3 bar extrapolation via linreg (non-repainting on closed bars).
Attach Strength (0..1): Blend tracked rails vs base rails.
Tracking Smooth Length: EMA smoothing of RVWAP and width.
Slope Influence / Forecast Lead Bars: Gains for the chosen mode.
Outer Containment Bands
Show Containment Bands: Master toggle (default ON).
Residual Extremes Lookback: Highest/lowest residual window.
Extreme Smoothing (EMA): Stability on extreme lines.
Margin vs inner width: Extra padding relative to smoothed inner width.
Squeeze & Alerts
Squeeze Window / Threshold: Width vs average; at/under threshold = dot (when enabled).
Min RVOL for Breakout: Required RVOL for breakout alerts.
Style (defaults in this release)
Inner Value rails: OFF (stepline, thin).
Inner & Containment fills: ON.
Containment rails: ON (stepline, medium).
20% / 80% guides: ON — 20% light blue, 80% light red, dashed, thin.
Squeeze dots: OFF by default (orange circles below candles when enabled).
Practical templates (copy/paste into a plan)
Momentum Breakout
Context: Squeeze cluster near RVWAP; Inner Value ON.
Trigger: Breakout Long (close > Upper Value & RVOL ≥ min).
Stop: Below Lower Value (tight) or below RVWAP (safer).
Targets (1:1:1): ⅓ Value → ⅓ Containment → ⅓ trail on RVWAP.
Pullback Continuation
Context: Uptrend; dip to RVWAP / Lower Value with cooling RVOL.
Trigger: Close back above RVWAP or break of reclaim candle’s high.
Stop: Just outside Lower Containment or pullback swing.
Targets: RVWAP → Upper Value → Upper Containment.
Containment Reversion (range)
Context: RVWAP flat; repeated containment tags.
Trigger: Stall at containment, then close back inside.
Stop: A step beyond that containment.
Target: RVWAP; runner only if RVOL stays muted.
Alerts included
DVWAP Breakout Long / Short (Value Bands)
Top Zone / Bottom Zone (20% / 80% guides)
Tip: On lower TFs, act on Breakout alerts with higher-TF bias (e.g., trade 5–15m in the direction of 1H/4H RVWAP slope/position).
Best practices
Let RVWAP be the compass; if unsure, wait until price picks a side.
Respect RVOL; low-RVOL breaks are prone to fail.
Use guides for timing, not certainty. Pair 20/80 zones with flow context.
Start with defaults; change one knob at a time.
Common pitfalls
Fading every containment touch → only fade when RVWAP is flat or RVOL cools.
Over-tuning inputs → the defaults are robust; small tweaks go a long way.
Fighting the higher timeframe on low TFs → expensive habit.
Footer — License & Publishing
License: Mozilla Public License 2.0 (MPL-2.0). You may modify and redistribute; keep this file under MPL and provide source for this file.
Originality: © 2025 JopAlgo. No third-party code reused; Pine built-ins and common formulas only.
Publishing: Keep this header/description intact when releasing on TradingView. Avoid promotional links in the public script text.
Liquidaciones BTCUSDT.PAllows you to manually record liquidation prices for both short and long positions, which are then displayed on the chart:
Orange: Short liquidations
Blue: Long liquidations
Optionally, a specific liquidation price can be highlighted to indicate higher-volume liquidations
Note: All liquidation prices must be entered manually.
GT Bands + Pivot + RSI [Tom Strict 2SD + Dashboard Clean]Here’s the English explanation of the indicator you just installed — “GT Bands + Pivot + RSI ” — written clearly and directly 👇
🔹 1. Core Idea
This indicator finds high-probability reversals — moments when price overextends beyond volatility boundaries and then snaps back.
It combines:
Bollinger Bands (2 standard deviations)
RSI Overbought/Oversold levels
EMA Trend Filter
Pivot confirmation
In plain English:
When price pierces outside the 2σ Bollinger Band and then closes back inside, with RSI confirming exhaustion and EMA trend alignment — the indicator fires a BUY or SELL signal.
🔹 2. Signal Logic
For a BUY:
Price dips below the lower 2σ band (dn2)
Closes back inside the band (above dn1)
RSI ≤ 30
EMA Fast > EMA Slow (uptrend confirmation)
Price above EMA Mid (trend filter)
For a SELL:
Price spikes above the upper 2σ band (up2)
Closes back inside the band (below up1)
RSI ≥ 70
EMA Fast < EMA Slow (downtrend confirmation)
Price below EMA Mid (trend filter)
All conditions must be met before a signal appears — that’s why it’s very accurate (not noisy).
🔹 3. Non-Repainting
It uses ta.pivothigh / ta.pivotlow with rightBars = 2, meaning it waits for 2 confirming candles before confirming a pivot.
✅ Once the signal appears, it never disappears or repaints afterward.
🔹 4. Take Profit & Stop Loss
It automatically calculates TP1, TP2, TP3, and SL levels using ATR (Average True Range):
Level Formula Description
TP1 Entry ± (0.8 × ATR) First take profit
TP2 Entry ± (1.2 × ATR) Second take profit
TP3 Entry ± (1.6 × ATR) Final target
SL Beyond recent swing ± (0.4 × ATR) Safety stop
ATR adapts to volatility, so the distances scale automatically with market conditions.
🔹 5. Dashboard (Top-Right Corner)
Shows the latest trade direction (BUY/SELL)
Displays Entry, TP1–TP3, and SL levels
Trend background color changes:
🟢 Green = Uptrend 🔴 Red = Downtrend ⚪ Gray = Sideways
This gives a live status view of your current trade context.