Hammer Breakout (Adjustable RR)Hammer candle detection and strat for back testing.
diamond indicates a detected hammer candle, the position is entered at the hammer candle close.
Stop loss below the hammer candle wick.
Adjustbale rr based on the distance to the stop (bottom of wick)
Pattern grafici
ICT Premium/Discount Zones [Exponential-X]Premium/Discount Zones - Visual Market Structure Tool
Overview
This indicator helps traders visualize premium and discount price zones based on recent market structure. It automatically identifies swing highs and lows within a specified lookback period and divides the price range into three key areas: Premium Zone, Equilibrium, and Discount Zone.
What This Indicator Does
The script continuously monitors price action and calculates:
Highest High and Lowest Low within the lookback period
Equilibrium Level - the midpoint between the swing high and low
Premium Zone - the area from equilibrium to the swing high (typically viewed as relatively expensive price levels)
Discount Zone - the area from the swing low to equilibrium (typically viewed as relatively cheap price levels)
Core Calculation Method
The indicator uses pivot point logic to identify significant swing highs and lows based on the pivot strength parameter. It then calculates the highest high and lowest low over the specified lookback period. The equilibrium is computed as the arithmetic mean of these two extremes, creating a fair value reference point.
The zones are dynamically updated as new price data becomes available, ensuring the visualization remains relevant to current market conditions.
Key Features
Dynamic Zone Detection
Automatically adjusts zones based on recent price action
Uses customizable lookback period for flexibility across different timeframes
Employs pivot strength parameter to filter out minor price fluctuations
Visual Clarity
Color-coded zones for easy identification (red for premium, green for discount)
Optional equilibrium line display
Adjustable zone label placement
Customizable color schemes to match your charting preferences
Alert Capabilities
Alerts when price enters the premium zone
Alerts when price enters the discount zone
Alerts when price returns to equilibrium
Helps traders monitor key zone interactions without constant chart watching
Customization Options
Adjustable lookback period (5-500 bars)
Configurable pivot strength for swing detection (1-20 bars)
Control over box extension into the future
Toggle labels and equilibrium line on/off
Full color customization for all visual elements
How to Use This Indicator
Setup
Add the indicator to your chart
Adjust the lookback period to match your trading timeframe (shorter for intraday, longer for swing trading)
Set pivot strength to filter out noise (higher values for major swings, lower for more frequent updates)
Customize colors and labels to your preference
Interpretation
Premium Zone: Price trading here may indicate potential resistance or selling opportunities when aligned with other technical factors
Discount Zone: Price trading here may indicate potential support or buying opportunities when aligned with other technical factors
Equilibrium: Acts as a fair value reference point where price often consolidates or reacts
Trading Applications
This tool works well when combined with other forms of analysis such as:
Trend identification indicators
Volume analysis
Support and resistance levels
Price action patterns
Market structure analysis
Important Considerations
This indicator identifies zones based purely on historical price data
Premium and discount zones are relative to the recent lookback period
The effectiveness varies across different market conditions and timeframes
Should be used as part of a comprehensive trading strategy, not in isolation
Past price structure does not guarantee future price behavior
Technical Details
Calculation Method
Uses Pine Script's ta.pivothigh() and ta.pivotlow() functions for swing detection
Employs ta.highest() and ta.lowest() for range calculation
Updates dynamically with each new bar
Draws zones using box objects for clear visual representation
Performance Optimization
Efficiently manages box and line objects to minimize resource usage
Uses conditional plotting to reduce unnecessary calculations
Limited to essential visual elements for chart clarity
Timeframe Compatibility
This indicator works on all timeframes but the recommended settings vary:
1-5 minute charts: Lookback period 10-20, Pivot strength 3-5
15-60 minute charts: Lookback period 20-50, Pivot strength 5-10
Daily charts: Lookback period 50-100, Pivot strength 10-15
Weekly charts: Lookback period 20-50, Pivot strength 5-10
Adjust these values based on the volatility of your specific instrument.
Limitations and Considerations
What This Indicator Does NOT Do
Does not provide buy or sell signals on its own
Does not predict future price movements
Does not account for fundamental factors or market events
Does not guarantee profitability or accuracy
Market Condition Awareness
In strong trending markets, price may remain in premium or discount zones for extended periods
During ranging conditions, price typically oscillates between zones more predictably
High volatility can cause frequent zone recalculations
Low volatility may result in narrow zones with limited practical use
Risk Considerations
Premium and discount are relative concepts, not absolute values
What appears as a discount zone may continue lower in a downtrend
What appears as a premium zone may continue higher in an uptrend
Always use proper risk management and position sizing
Consider multiple timeframe analysis for context
Version Information
This indicator is written in Pine Script v6, ensuring compatibility with the latest TradingView features and optimal performance.
Final Notes
This tool is designed to enhance your market analysis by providing a clear visual representation of premium and discount price zones. It should be used as one component of a well-rounded trading approach that includes proper risk management, multiple forms of analysis, and realistic expectations about market behavior.
The concept of premium and discount zones is rooted in auction market theory and the idea that price oscillates around fair value. However, traders should understand that these zones are interpretive tools based on historical data and do not constitute trading advice or predictions about future price action.
Remember to backtest any strategy using this indicator on historical data before applying it to live trading, and always trade responsibly within your risk tolerance.
Disclaimer: The information provided by this indicator is for educational and informational purposes only. It does not constitute financial advice, investment advice, trading advice, or any other sort of advice. Always conduct your own research and consult with qualified financial professionals before making trading decisions.
Position Trdaing Lines (2 entries + live PnL)Position Trading Lines (2 entries + live PnL) is a utility script designed to visually manage a manual position on the chart, with clear TP/SL levels and real-time profit & loss.
The script does not place orders. It is meant to help you simulate / track an existing or planned position.
Features
• Up to 2 trades on the same symbol
• Each trade has:
• Direction: Long / Short
• Position size (lot)
• Entry price
• Take Profit (T.Profit) price
• Stop Loss (S.Loss) price
• Entry shift in bars from the last candle (to align with past or future entries)
• Visual lines on the price chart
• Horizontal line at the entry price
• Horizontal line at Take Profit
• Horizontal line at Stop Loss
• Informative labels
• Entry label showing: direction, size and @ entry price
• TP and SL labels showing:
• T.Profit / S.Loss
• position size
• @ price
• estimated PnL at that level
• If both trades share the same TP or SL price, a single combined label is shown with the total size and total PnL.
• Commissions
• Global commission input (percentage over notional).
• Commission is included in all PnL calculations.
• Live PnL label
• Real-time combined PnL of the active trades, updated on the last bar.
• Color changes with sign (green for profit, red for loss).
• Selective PnL for Trade 2
• Trade 2 has a switch: “Count PnL in total”.
• You can keep Trade 2 visible on the chart but exclude it from the combined PnL until it is actually active.
This tool is useful for discretionary traders who want a clean visual representation of their position, R:R, and projected outcomes directly on the chart, without relying on the broker’s position panel.
Trend zooming boxThis script clearly find trend.
You will be able to find areas where you get large impulsive moves in history easily. Not too much to describe.
Adaptive 2-Pole Trend Bands [supfabio]Adaptive 2-Pole Trend Bands is a volatility-aware trend filtering indicator designed to identify the dominant market direction while providing dynamic reference zones around price.
Instead of relying on traditional moving averages, this indicator uses a two-pole digital filter to smooth price action while maintaining responsiveness. Around this central trend line, a multi-band structure based on ATR is applied to help traders evaluate pullbacks, extensions, and potential exhaustion areas within a trend.
Core Concept
The indicator is built around three key ideas:
Digital Trend Filtering
Volatility-Adjusted Bands
Trend Persistence Measurement
These components work together to separate meaningful price movement from noise and to provide context for how far price has moved relative to recent volatility.
Two-Pole Trend Filter
At its core, the indicator uses a two-pole smoothing filter, which produces a cleaner trend curve than common moving averages.
Compared to standard averages, this approach:
Reduces market noise
Produces smoother transitions
Responds faster to genuine trend changes
Avoids excessive lag in trending markets
The result is a trend line that represents the structural direction of price, rather than short-term fluctuations.
Adaptive Multi-Band System
Around the central trend filter, the indicator plots four independent volatility-based bands, each derived from the Average True Range (ATR).
Each band represents a different degree of price extension:
Band 1: Shallow pullbacks and minor reactions
Band 2: Moderate extensions within a trend
Band 3: Strong directional moves
Band 4: Extreme extensions relative to recent volatility
Because the bands are ATR-based, they automatically adapt to changing market conditions, expanding during high volatility and contracting during calmer periods.
This makes the indicator suitable for both slow and fast markets without manual recalibration.
Trend State Detection
The color of the central filter dynamically reflects trend persistence, not just direction:
Sustained upward movement highlights bullish conditions
Sustained downward movement highlights bearish conditions
Transitional phases are visually distinct, helping identify regime changes
This logic is based on how long price has maintained directional behavior, reducing sensitivity to isolated candles or short-lived spikes.
Practical Applications
This indicator can be used as:
A trend filter for discretionary or systematic strategies
A context tool to evaluate pullbacks versus overextension
A risk reference to avoid entries in extreme price zones
A confirmation layer when combined with price action or momentum tools
It performs consistently across different asset classes, including futures, cryptocurrencies, forex, indices, and equities.
Configuration
Key parameters such as filter length, damping factor, and band multipliers are fully configurable, allowing traders to adapt the indicator to different timeframes and trading styles.
Important Notes
This indicator does not predict future price movement
It does not generate guaranteed buy or sell signals
Best results are achieved when used in combination with sound risk management and additional confirmation tools
Past behavior does not imply future performance
Disclaimer
This indicator is provided for educational and analytical purposes only and should not be considered financial advice.
Se quiser, posso:
Criar uma versão resumida para a primeira linha da publicação
Ajustar o texto para um tom mais técnico ou mais comercial
Traduzir para português mantendo o inglês como idioma principal
Revisar o título para SEO dentro da Biblioteca Pública
Golden hour 1130 1230 Session LinesGolden Hour 11:30–12:30 Session Lines
Overview :
Calculate the session high and low between 11:30 AM and 12:30 PM and mark the lines.
Trading Rule
Once the price breaks either side (high or low), it will continue to move further in that direction.
Session Time : 11:30 AM – 12:30 PM
Key Levels : Session High & Session Low
Strategy : Breakout continuation in the direction of the break
ORB + FVG A+ PRO (All-in-One) [QQQ]Configurable ORB + FVG + filters (VIX, ORB range, relative volume) + A+ PRO (retest at the FVG edge + rejection) + anti-fakeout + orange reminder “CONFIRM POC/HVN (Volume Profile)” right when the A+ signal appears
Regime EngineRegime Engine
Overview
Regime Engine is a market regime detection system that classifies price action into bullish, bearish, or neutral states using weighted exponential moving average analysis. Once the regime is identified, the indicator generates buy and sell signals based on Donchian channel breakouts, filtered by ADX trend strength and RSI momentum conditions.
The Money Line
The core of regime detection is the Money Line, a weighted combination of two exponential moving averages. By default, the short EMA (8 periods) receives 60% weight while the long EMA (24 periods) receives 40% weight. This weighting allows the Money Line to be more responsive than a simple long-period average while remaining smoother than a short-period average alone.
The Money Line changes color based on the current regime: green for bullish, red for bearish, and yellow for neutral. This provides immediate visual feedback about the market state.
Regime Classification
The indicator determines market regime by comparing the relative positions of the short and long EMAs while also considering RSI levels to avoid classifying overbought or oversold conditions as trend states.
Bullish regime is identified when the short EMA is above the long EMA and RSI is not in overbought territory. This combination suggests upward momentum that is not yet exhausted.
Bearish regime is identified when the short EMA is below the long EMA and RSI is not in oversold territory. This indicates downward momentum with room to continue.
Neutral regime applies when the EMAs are close together or RSI conditions prevent trend classification. The indicator provides two optional methods for enhanced neutral detection.
Neutral Zone Detection
Markets often transition through periods where trend direction is unclear. The indicator offers two complementary methods for detecting these neutral zones.
The slope method examines the rate of change of the Money Line relative to ATR. When the Money Line is moving slowly (slope below a tolerance threshold), the market is classified as neutral regardless of EMA positioning.
The EMA distance method calculates the percentage distance between the short and long EMAs. When they are within a specified percentage of each other, the EMAs are considered too close to reliably indicate direction.
Either or both methods can be enabled, and if either triggers, the regime is classified as neutral.
Donchian Channel Signals
Buy and sell signals are generated when price interacts with the Donchian channel boundaries. The Donchian channel plots the highest high and lowest low over a lookback period (default 20 bars), offset by one bar to prevent repainting.
Buy signals trigger when price touches or breaks below the lower Donchian band, indicating a potential support level. Sell signals trigger when price touches or breaks above the upper Donchian band, indicating potential resistance.
An optional setting requires the close to confirm the break rather than just the wick, providing more conservative signal generation.
ADX Trend Strength Filter
The Average Directional Index filters signals to ensure they occur during trending conditions. When enabled, signals only fire if ADX exceeds the threshold (default 24), confirming that the market has sufficient directional momentum for breakout trades to succeed.
The indicator uses Wilder's original smoothing method for ADX calculation, providing the traditional interpretation of trend strength values.
RSI Momentum Filter
RSI provides additional signal filtering to ensure entries occur at favorable momentum levels. Buy signals require RSI to be at or below the oversold threshold (default 30), indicating potential exhaustion of selling pressure. Sell signals require RSI to be at or above the overbought threshold (default 70), suggesting exhaustion of buying pressure.
These filters can be disabled for traders who prefer unfiltered Donchian breakout signals.
BBWP Volatility Monitoring
Bollinger Band Width Percentile measures current volatility relative to its historical range. The indicator calculates BB width and ranks it against the specified lookback period (default 252 bars, approximately one trading year).
BBWP above 70% indicates elevated volatility, which may signal trend acceleration or potential reversals. BBWP below 30% indicates compressed volatility, often preceding significant moves. The information panel displays the current BBWP reading with color coding to highlight these conditions.
Signal Cooldown
To prevent signal clustering during extended breakout periods, a configurable cooldown prevents new signals of the same type for a specified number of bars after each signal. This ensures each signal represents a distinct trading opportunity.
Visual Components
The Donchian channel can display shaded bands between the upper and lower boundaries. The shading color reflects the current regime: green for bullish, magenta for bearish, and blue for neutral. This provides at-a-glance context for where price is trading within its recent range.
An ADX strength bar at the bottom of the chart uses color coding: white for weak trend (ADX below 15), orange for ranging (ADX 15-24), and blue for trending (ADX above 24). This matches the trend strength display in the information panel.
Price labels appear at signal locations showing the signal type and entry price. Labels are automatically cleaned up after reaching a configurable history limit to maintain chart performance.
Signal candles are highlighted in blue, making it easy to identify exactly which bars generated signals when reviewing historical performance.
Information Panel
A compact table displays key metrics: current regime bias, trend strength classification, BBWP volatility reading, RSI level, and ADX value. Each metric is color-coded to highlight favorable or unfavorable conditions.
The panel can be positioned at any corner or middle edge of the chart. An alternative label-based display anchored to the chart is also available for those who prefer that format.
Trend Persistence Option
By default, the regime is recalculated on every bar. An optional persistence mode changes this behavior so that the regime only changes on EMA crossovers. This reduces regime flipping during choppy conditions but may delay regime recognition during gradual trend changes.
How to Use
Monitor the Money Line color and information panel for current regime. In bullish regimes, focus on buy signals at the lower Donchian band as potential pullback entries. In bearish regimes, focus on sell signals at the upper band as potential short entries or exit points.
Use the ADX strength indicator to gauge signal reliability. Signals during trending conditions (blue ADX bar) have historically higher success rates than signals during ranging conditions (orange bar) or weak trends (white bar).
Watch BBWP for volatility context. Low BBWP readings suggest a significant move may be developing, while high readings indicate the current move may be overextended.
The combination of regime awareness, Donchian breakout signals, and ADX/RSI filtering provides a structured approach to identifying trading opportunities across different market conditions.
Settings Guidance
The default settings work well for cryptocurrency and forex markets on intraday timeframes. For stocks or longer timeframes, consider increasing the EMA periods and Donchian lookback. The ADX threshold can be adjusted based on the typical ADX range for the traded instrument.
The RSI filter levels can be relaxed (higher oversold, lower overbought) for more signals or tightened for higher-quality but less frequent signals. The cooldown period should be adjusted based on timeframe, with shorter timeframes typically requiring longer cooldown periods.
Hammer Strategy (CLOSE ON NEXT BAR) [WORKING]Adjustable hammer and inverted hammer candle
Ham? INV? is the hammer
Entry on HAM, INV OR HAM?, INV? close next bar
Capitulation Detector StrategyA multi-factor capitulation detector designed to identify exhaustion points in extended trends. It focuses on fading capitulation moves after multi-leg trends with extreme volume and price extension.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE CONCEPT
Capitulation occurs when the last holders give up — panic selling into lows or euphoric buying into highs. These moments create asymmetric opportunities because:
Sentiment becomes maximally skewed
Weak hands are flushed out
Price deviates far from equilibrium
The "fuel" for continuation is exhausted
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE 6 FACTORS
Trend Persistence — Price stays on one side of 38 EMA for 12+ bars, confirming a sustained directional move
Acceleration — Price stays on one side of 5 EMA for 3+ bars, showing the move is accelerating into exhaustion
Volume Spike — Current bar volume ≥ 2x the 20-bar average
Body Expansion — Candle body ≥ 1.5x average, showing conviction/panic in the move
Extension — Price is 2+ ATR away from the 38 EMA, indicating overextension from equilibrium
Multi-Leg Structure — At least 3 consecutive lower lows (for longs) or higher highs (for shorts)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SIGNAL LOGIC
Bullish Capitulation: 4+ factors align + price below 38 EMA + down candle + volume spike
Bearish Capitulation: 4+ factors align + price above 38 EMA + up candle + volume spike
The strategy enters counter-trend, fading the exhaustion move.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EXIT OPTIONS
ATR-based stop loss (default: 2 ATR)
ATR-based take profit (default: 3 ATR)
Optional trailing stop
Time filter for session-specific trading
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BEST PRACTICES
Works best on liquid instruments with clean trends
More reliable after 3+ legs in the trend
Higher conviction when daily AND intraday timeframes align
"The bigger and more extended, the better"
Consider VWAP as additional confirmation (not coded here)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS GUIDE
Min Score: Increase for fewer, higher-quality signals
Volume Spike Multiplier: 2x; increase for stricter filter
Extension ATR: Higher values = more overextended setups only
Trend Bars Min: Higher values = longer established trends required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALERTS
Bullish Capitulation (potential long)
Bearish Capitulation (potential short)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DISCLAIMER
This is a counter-trend strategy — inherently higher risk than trend-following. Always use proper position sizing and risk management. Backtest thoroughly on your specific instruments and timeframes.
Ahmed Gold Signals - 5M LIVE (Frequent)📈 Gold (XAUUSD) Trading Signals – Precision-Based Strategy
Our Gold signals are built on pure price action, not random indicators or guesswork.
🔍 How our signals are generated
We focus on:
🧲 Liquidity Sweeps
Identifying when price grabs stop-losses above highs or below lows and then reverses
📊 Clear trend direction using EMA 50 & EMA 200
✅ Strong confirmation candles after the sweep
🎯 Entries only in the direction of the trend to increase accuracy
🔵 BUY Signals
Bullish market structure
Price sweeps liquidity below recent lows
Strong bullish confirmation candle closes
➡️ High-probability BUY setup
🔴 SELL Signals
Bearish market structure
Price sweeps liquidity above recent highs
Strong bearish confirmation candle closes
➡️ High-probability SELL setup
⏱️ Timeframe
5-minute chart (5M)
Fast, precise signals ideal for scalping Gold
🛡️ Risk Management
Stop loss placed beyond the liquidity sweep
Clear take-profit targets
Risk-to-reward typically 1:2 or better
⚠️ Important Notes
We do not trade every move
We wait for confirmation
Quality over quantity — always
Ripster Clouds + Saty Pivot + RVOL + Trend1. Ripster EMA Clouds (local + higher timeframe)
Local timeframe (your chart TF):
Plots up to 5 EMA clouds (8/9, 5/12, 34/50, 72/89, 180/200 – configurable).
Each cloud is:
One short EMA and one long EMA.
A filled band between them.
Color logic:
Cloud is bullish when short EMA > long EMA (green/blue-ish tone).
Bearish when short EMA < long EMA (red/orange/pink tone).
You can choose:
EMA vs SMA,
Whether to show the lines,
Per-cloud toggles.
MTF Clouds:
Two higher-timeframe EMA clouds:
Cloud 1: 50/55
Cloud 2: 20/21
Computed on a higher TF (default D, but configurable).
Show as thin lines + transparent bands.
Used for:
Visual higher-TF trend,
Optional signal filter (MTF must agree for trades).
2. Saty Pivot Ribbon (time-warped EMAs)
This is basically your Saty Pivot Ribbon integrated:
Uses a “Time Warp” setting to overlay EMAs from another timeframe.
EMAs:
Fast, Pivot, Slow (defaults 8 / 21 / 34).
Clouds:
Fast cloud between fast & pivot EMAs.
Slow cloud between pivot & slow EMAs.
Bullish/bearish colors are distinct from Ripster colors.
Optional highlights:
Can highlight fast/pivot/slow lines separately.
Conviction EMAs:
13 and 48 EMAs (configurable).
When fast conviction EMA crosses over/under slow:
You get triangle arrows (bullish/bearish conviction).
Bias candles:
If enabled, candles are recolored based on:
Price vs Bias EMA,
Candle up/down/doji,
So you see bullish/bearish “bias” directly in candle colors.
3. DTR vs ATR panel (range vs average)
In a small table panel (bottom-center by default):
Computes higher-TF ATR (default 14, TF auto D/W/M, smoothing type selectable).
Measures current range (high–low) on that TF.
Displays:
DTR: X vs ATR: Y Z% (+/-Δ% vs prev)
Where:
Z% = current range / ATR * 100.
Δ% = change vs previous bar’s Z%.
Background color:
Greenish for low move (<≈70%),
Red for high move (≥≈90%),
Yellow in between,
Slightly dimmed when price is below bias EMA.
This tells you: “Is today an average, quiet, or explosive day compared to normal?”
4. SMA Divergence panel
Separate histogram & line panel:
Fast and slow SMAs (default 14 & 30).
Computes price divergence vs SMA in %:
% above/below slow SMA,
% above/below fast SMA.
Shows:
Slow SMA divergence as a semi-transparent column,
Fast SMA divergence as a solid column on top,
EMA of the slow divergence (trend line) colored:
Blue when rising,
Orange/red when falling.
Static upper/lower bands with fill, plus optional zero line.
This gives you a feel for how stretched price is vs its anchors.
5. RVOL table (relative volume)
Small 3×2 table (bottom-right by default):
Inputs:
Average length (default 50 bars),
Optionally show previous candle RVOL.
Calculates:
RVOL now = volume / avg(volume N bars) * 100,
RVOL prev,
RVOL momentum (now – prev) for data window only.
Table columns:
Candle Vol,
RVOL (Now),
RVOL (Prev).
Colors:
200% → “high RVOL” color,
100–200% → “medium RVOL” color,
<100% → “low RVOL” color,
Slightly dimmer if price is below bias EMA.
This is used both visually and optionally as a signal filter (e.g., only trade when RVOL ≥ threshold).
6. Trend Dashboard (Price + 34/50 + 5/12)
Top-right trend box with 3 rows:
Price Action row:
Uses either Bias EMA or custom EMA on close to say:
Bullish (close > trend EMA),
Bearish (close < trend EMA),
Flat.
Ripster 34/50 Cloud row:
Uses 34/50 EMAs: bullish if 34>50, bearish if 34<50.
Ripster 5/12 Cloud row:
Uses 5/12 EMAs: bullish if 5>12, bearish if 5<12.
Then it does a vote:
Counts bullish votes (Price, 34/50, 5/12),
Counts bearish votes,
Depending on mode:
Majority (2 of 3) or Strict (3 of 3).
Output:
Overall Bullish / Bearish / Sideways.
You also get an optional label on the chart like
Overall: Bullish trend with color, and an optional background tint (green/red for bull/bear).
7. VWAP + Buy/Sell Signals
VWAP is plotted as a white line.
Fast “trend” cloud mid: average of 5 & 12 EMAs.
Slow “trend” cloud mid: average of 34 & 50 EMAs.
Buy condition:
5/12 crosses above 34/50 (bullish cloud flip),
Price > VWAP,
Optional filter: MTF Cloud 1 bullish (50/55 on higher TF),
Optional filter: RVOL >= threshold.
Sell condition:
5/12 crosses below 34/50,
Price < VWAP,
Optional same filters but bearish.
When conditions are met:
Plots BUY triangle up below price (distinct teal/green tone).
Plots SELL triangle down above price (distinct magenta/orange tone).
Alert conditions are defined for:
BUY / SELL signals,
Overall Bullish / Bearish / Sideways change,
MTF Cloud 1 trend flips.
8. Data Window metrics
For easy backtesting / inspection via TradingView’s data window, it exposes:
DTR% (Current) and DTR% Momentum,
RVOL% (Now), RVOL% (Prev), RVOL% Momentum.
TL;DR – What does this script do for you?
It turns your chart into a multi-framework trend and momentum dashboard:
Ripster EMA clouds for short/medium trend & S/R.
Saty Ribbon for higher-TF pivot structure and conviction.
RVOL + DTR/ATR for context (is this a big and well-participated move?).
SMA divergence panel for overextension/stretch.
A compact trend table that tells you Price vs 34/50 vs 5/12 in one glance.
Buy/Sell markers + alerts when:
short-term Ripster trend (5/12) flips over/under medium (34/50),
price agrees with VWAP,
plus optional filters (MTF trend and / or RVOL).
Basically: it’s a trend + confirmation + context system wrapped into one indicator, with most knobs configurable in the settings.
Ichimoku + VWAP + OBV + ATR Full System (NQ Daytrade)Extended Indicator Description
Ichimoku + VWAP + OBV + ATR Full System is a rule-based intraday trading indicator designed specifically for NQ day trading, focusing on trend alignment, participation confirmation, and volatility-aware execution.
This indicator does not rely on a single signal or crossover. Instead, it integrates multiple market dimensions into one structured framework to help traders identify high-probability trend continuation scenarios while avoiding low-quality, range-bound conditions.
System Philosophy
The core idea of this system is simple:
trade only when trend, price location, volume, and volatility are aligned.
Each component plays a specific role and is not meant to be used in isolation. The indicator works best when all conditions reinforce the same directional bias.
Component Breakdown
Ichimoku Cloud
Used to define the primary market structure and directional bias. The system favors trades only when price action aligns clearly above or below the cloud, helping filter out indecisive or transitional phases.
VWAP
Acts as a session-based equilibrium reference. Price position and distance relative to VWAP are used to confirm whether the market is trending with intent rather than reverting to the mean.
OBV (On-Balance Volume)
Provides participation and flow confirmation. OBV helps validate whether price movement is supported by volume, reducing the likelihood of false breakouts or weak trend signals.
ATR (Average True Range)
Used as a volatility filter and risk-awareness tool. ATR conditions help the system avoid low-volatility environments and support more realistic expectations for intraday movement.
Trade Logic Overview
The system is designed around trend-following pullbacks, not prediction or counter-trend trading.
When trend structure is established and confirmed by VWAP positioning and OBV behavior, pullback zones within the trend become areas of interest. ATR conditions ensure that trades are taken only when sufficient movement potential exists.
Rather than generating frequent signals, the system prioritizes selectivity and clarity, making it suitable for disciplined day traders who value context over quantity.
Intended Use
This indicator is built for:
NQ intraday and day trading
Trend continuation and pullback strategies
Traders who prefer structured, confirmation-based systems
Lower to mid intraday timeframes such as 3-minute, 5-minute, and 15-minute charts
Important Notes
This is not an automated trading system and does not provide guaranteed results. The indicator is designed as a decision-support tool to assist with market context, directional bias, and trade timing. Risk management, execution, and position sizing remain the responsibility of the user.
롱/숏 삼각형 시그널
동그라미 청산 시그널
VWAP 밴드 기반 방향성
OBV 보조지표
이름 (Name)
BTC Scalping Signal – VWAP + OBV
짧은 설명 (Short Description)
VWAP 밴드와 OBV를 기반으로 방향성, 진입·청산 시그널을 제공하는 스캘핑 지표입니다.
긴 설명 (Long Description)
이 지표는 BTC 단기 스캘핑을 위해 설계된 것으로, 특히 15분봉 환경에 최적화되어 있습니다.
VWAP 밴드의 위치와 추세 판별 로직을 기반으로 롱·숏 진입 신호를 제공합니다.
OBV 모멘텀을 보조 필터로 사용하여 돌파 및 되돌림 가능성을 판단합니다.
시장 변동성이 축소되거나 평균회귀 신호가 감지될 때 청산 시그널을 표시합니다.
삼각형(진입), 원형(청산) 등 직관적 시각 요소를 통해 빠른 의사결정을 지원합니다.
MoneyLine CipherMoneyLine Cipher
Overview
MoneyLine Cipher is a trend-following indicator designed to identify high-probability entry and exit points by combining multiple technical analysis methods into a unified signal system. The indicator adapts its behavior based on current market conditions, becoming more aggressive in strong trends and more conservative in choppy or uncertain markets.
Core Concept: The Money Line
At the heart of this indicator is the Money Line, a linear regression line that acts as a dynamic center of price action. Unlike a simple moving average, linear regression fits a straight line through recent prices using least-squares methodology, providing a smoother representation of the underlying trend direction. The slope of this line determines whether the market is in a bullish, bearish, or neutral state.
Dynamic Envelope Bands
The indicator plots upper and lower bands around the Money Line using Average True Range (ATR) as the volatility measure. What makes these bands unique is their adaptive multiplier system. When the ADX (Average Directional Index) indicates a strong trend, the bands automatically widen to accommodate larger price swings and avoid premature exits. In ranging or weak trend conditions, the bands contract to provide tighter entry and exit zones. This dynamic adjustment helps the indicator perform consistently across different market environments.
Trend State Detection
The indicator classifies market conditions into five distinct states: Strong Uptrend, Uptrend, Neutral, Downtrend, and Strong Downtrend. This classification uses three complementary methods working together.
First, the Directional Movement Index (DMI) measures the spread between positive and negative directional indicators. A large positive spread suggests bullish momentum, while a large negative spread indicates bearish pressure.
Second, On-Balance Volume (OBV) confirms whether volume supports the indicated trend direction. For a Strong Uptrend classification, OBV must be rising above its moving average, confirming that buying pressure backs the price movement.
Third, ADX must exceed a minimum threshold for Strong trend classifications, ensuring that only genuinely trending markets receive the Strong designation.
Signal Generation
Buy and sell signals are generated using Fisher Transform and Aroon indicators, but with a crucial enhancement: the trigger thresholds adjust dynamically based on the current trend state.
The Fisher Transform converts price data into a Gaussian normal distribution, making turning points easier to identify. In a Strong Uptrend, the buy threshold relaxes (making buys easier to trigger) while the sell threshold tightens (making sells harder to trigger). This allows traders to stay in winning positions longer during favorable conditions. The opposite applies in downtrends, where the system becomes quick to exit and reluctant to enter long positions.
The Aroon indicator measures how recently price made a new high or low within the lookback period. Combined with Fisher Transform, this dual-confirmation approach reduces false signals that might occur when using either indicator alone.
Band touches also generate signals. When price reaches the lower band, a potential buy zone is identified. When price reaches the upper band, a potential sell zone is flagged.
Cascade Protection System
A key feature is the built-in protection against averaging down into a losing position. The system tracks consecutive buy signals and limits them to a configurable maximum (default: 3). After reaching this limit, no additional buy signals are generated until a sell signal resets the counter. This prevents the common mistake of repeatedly buying during a sustained decline.
Additionally, the indicator monitors Bollinger Band Width Percentile (BBWP), which measures current volatility relative to historical volatility. When BBWP exceeds a threshold (indicating a volatility spike often associated with sharp moves), buy signals are temporarily frozen. This protects against entering during panic selloffs or blow-off tops.
Extreme Move Detection
Sometimes price moves so aggressively that it penetrates the bands by an unusual amount. The indicator detects these extreme moves and can generate signals even during normal cooldown periods. The logic is that an extreme band penetration represents a significant overextension that warrants attention regardless of recent signal history. These extreme signals are visually distinguished from regular signals.
RSI Divergence
The indicator includes RSI divergence detection as an additional confirmation tool. When price makes a lower low but RSI makes a higher low (bullish divergence), it suggests weakening downside momentum and a potential reversal. Bearish divergence (price higher high, RSI lower high) warns of potential tops. Both regular and hidden divergences are detected and marked on the chart.
Signal Cooldown
To prevent overtrading and signal clustering, a configurable cooldown period prevents new signals for a set number of bars after each signal. This spacing ensures that each signal represents a distinct trading opportunity rather than repeated triggers on the same price movement.
Visual Display
The indicator provides a comprehensive information panel showing current trend state, BBWP status, consecutive buy count, ADX reading, Fisher and Aroon values, cooldown status, and current dynamic thresholds. An ADX bar at the bottom of the chart provides quick visual reference for trend strength and direction using color coding.
Signal labels display the entry or exit price along with the current buy count (for buy signals), helping traders track their position sizing.
How to Use
In uptrending markets, look for buy signals near the lower band, particularly when the trend state shows Uptrend or Strong Uptrend. These represent pullback opportunities within an established trend.
In downtrending markets, the indicator naturally reduces buy signals and increases sell sensitivity, helping traders avoid catching falling knives.
In neutral or ranging conditions, signals from both directions are generated with moderate thresholds, suitable for mean-reversion trading within the bands.
Monitor the BBWP and consecutive buy counter in the info panel. If BBWP shows "FROZEN" or the buy counter approaches the maximum, exercise additional caution with new long entries.
Settings Guidance
The default settings are optimized for 5-minute cryptocurrency charts but can be adjusted for other timeframes and assets. Key parameters to consider adjusting include the Money Line length (shorter for more responsive, longer for smoother), ATR multiplier range (wider bands reduce signals but improve accuracy), and the various threshold values for trend classification.
RSI Multi-Timeframe TableHow the RSI Multi-Timeframe Table Indicator Works
This indicator displays a table showing the RSI (14) from multiple timeframes at the same time.
It helps you quickly see whether the RSI is in overbought or oversold zones across different periods (1m, 5m, 15m, 30m, 1h, 4h, and 1D).
Below is a clear explanation of how each part works:
1) Timeframes Used
The indicator analyzes the RSI from the following timeframes:
1 minute (1m)
5 minutes (5m)
15 minutes (15m)
30 minutes (30m)
1 hour (1h)
4 hours (4h)
1 day (1D)
Each row of the table represents one of these timeframes.
2) How the RSI Is Retrieved
For each timeframe, the script uses the request.security() function to fetch the RSI(14) value from that specific timeframe, even if your current chart is set to a different one.
Example: On a 1h chart, you can still see the RSI from 1m, 5m, 30m, etc.
3) Table Structure
The table appears in the top-right corner and contains 8 columns:
TF – shows the timeframe name
RSI – shows the RSI value with two decimal places
10 – marks if RSI is ≤ 10
20 – marks if RSI is ≤ 20
30 – marks if RSI is ≤ 30
70 – marks if RSI is ≥ 70
80 – marks if RSI is ≥ 80
90 – marks if RSI is ≥ 90
The extreme levels (10, 20, 80, 90) help identify possible reversal zones.
4) Markings in the Table
When a condition is true, a ● circle appears in the corresponding cell.
Examples:
If the 5m RSI is ≤ 20, a circle appears in the 20 column for the 5m row.
If the 1H RSI is ≥ 80, a circle appears in the 80 column for the 1H row.
Colors also help interpretation:
Red for strong oversold levels (≤10)
Orange and yellow for intermediate levels
Green, teal, and blue for overbought levels
5) Alerts
The indicator includes four built-in alerts:
RSI ≤ 10
RSI ≤ 20
RSI ≥ 80
RSI ≥ 90
These alerts use the RSI from the current chart timeframe.
To enable them:
Open Alerts in TradingView
Click Create Alert
Select the indicator
Choose the alert you want
Confirm
6) Purpose of This Indicator
It is useful for:
Quickly checking market strength across multiple timeframes
Identifying when several periods are overbought or oversold
Avoiding trades against market momentum
Helping confirm potential reversal points
Summary
This indicator creates a table that shows RSI values from multiple timeframes and visually highlights overbought or oversold conditions in each one.
It also includes ready-to-use alerts for the most extreme RSI levels.
Ichimoku Kijun OPTIMISED FOR 15MIN EURUSDWhen to Enter a Trade (The Kijun Bounce)
We only enter when the market is clearly trending and we get a good pullback to the Kijun-sen (the red line).
Market Quality Check (Anti-Chop):
The price must be completely outside the Ichimoku Cloud (Kumo). This ensures we are not trading in a choppy, sideways market.
Buy (Long) Entry:
The price (low of the candle) drops down and touches the Kijun-sen (red line).
The candle then closes above the Kijun-sen, confirming the trend is holding and the bounce is real.
Sell (Short) Entry:
The price (high of the candle) rises up and touches the Kijun-sen (red line).
The candle then closes below the Kijun-sen, confirming the downtrend is holding and the rejection is real.
How to Manage Risk and Exit
We use a fixed profit target (Take Profit) and a dynamic Stop Loss (Trailing Stop) that follows the Kijun-sen.
Risk per Trade:
We risk 1.0 percent of the total account equity per trade.
The initial Stop Loss distance is limited to 1.0 times the ATR, and is strictly capped at 1.0 percent of the price to prevent any single catastrophic loss.
Take Profit (TP):
The fixed profit target is set to a 1.5 Risk to Reward ratio (1.5 R:R) . This means the profit target is 1.5 times the size of the initial stop loss.
Stop Loss (SL):
The Stop Loss is a Trailing Stop that automatically moves with the Kijun-sen (red line).
The Stop Loss will trail slightly below the Kijun-sen for a Buy trade, and slightly above the Kijun-sen for a Sell trade, protecting profits dynamically as the trend continues.
Understanding the Trade Signals
🟢🟡 The Round Dots (Entry Signals)
The small, round dots are placed directly on the candle where the strategy decided to enter a trade. The color tells you the direction:
Lime Green Dot: Signals a confirmed Long (Buy) Entry. This happens on the candle where the price successfully bounced off the Kijun-sen (red line) and closed higher, and the market was outside the Kumo (the cloud).
Red Dot: Signals a confirmed Short (Sell) Entry. This happens on the candle where the price was successfully rejected by the Kijun-sen (red line) and closed lower, and the market was outside the Kumo.
⬆️⬇️ The Arrows (Exit Signals)
The arrows appear at the exact price level where the trade was closed (exited). The direction of the arrow indicates where the exit occurred relative to the market action, but the color is more important for determining the result:
Exit Arrow (Often Green/Red): This signals a trade was closed for one of two reasons:
Take Profit (Limit Hit): The trade moved in your favor and hit the fixed 1.5 R:R profit target. This is a successful, profitable exit.
Stop Loss (Trailing Stop Hit): The market reversed against the position, and the trade was closed by the dynamic Kijun-sen Trailing Stop. This is a risk-controlled loss or a break-even exit.
The size of these arrows is the default setting used by the strategy.exit() function in Pine Script to clearly mark the exit price on the chart.
In Summary
The dots tell you when to get in (Entry) based on the Kijun Reversion rule, and the arrows tell you when you got out (Exit) due to hitting either the target profit or the trailing stop loss.
Density Zones (GM Crossing Clusters) + QHO Spin FlipsINDICATOR NAME
Density Zones (GM Crossing Clusters) + QHO Spin Flips
OVERVIEW
This indicator combines two complementary ideas into a single overlay: *this combines my earlier Geometric Mean Indicator with the Quantum Harmonic Oscillator (Overlay) with additional enhancements*
1) Density Zones (GM Crossing Clusters)
A “Density Zone” is detected when price repeatedly crosses a Geometric Mean equilibrium line (GM) within a rolling lookback window. Conceptually, this identifies regions where the market is repeatedly “snapping” across an equilibrium boundary—high churn, high decision pressure, and repeated re-selection of direction.
2) QHO Spin Flips (Regression-Residual σ Breaches)
A “Spin Flip” is detected when price deviates beyond a configurable σ-threshold (κ) from a regression-based equilibrium, using normalized residuals. Conceptually, this marks excursions into extreme states (decoherence / expansion), which often precede a reversion toward equilibrium and/or a regime re-scaling.
These two systems are related but not identical:
- Density Zones identify where equilibrium crossings cluster (a “singularity”/anchor behavior around GM).
- Spin Flips identify when price exceeds statistically extreme displacement from the regression equilibrium (LSR), indicating expansion beyond typical variance.
CORE CONCEPTS AND FORMULAS
SECTION A — GEOMETRIC MEAN EQUILIBRIUM (GM)
We define two moving averages:
(1) MA1_t = SMA(close_t, L1)
(2) MA2_t = SMA(close_t, L2)
We define the equilibrium anchor as the geometric mean of MA1 and MA2:
(3) GM_t = sqrt( MA1_t * MA2_t )
This GM line acts as an equilibrium boundary. Repeated crossings are interpreted as high “equilibrium churn.”
SECTION B — CROSS EVENTS (UP/DOWN)
A “cross event” is registered when the sign of (close - GM) changes:
Define a sign function s_t:
(4) s_t =
+1 if close_t > GM_t
-1 if close_t < GM_t
s_{t-1} if close_t == GM_t (tie-breaker to avoid false flips)
Then define the crossing event indicator:
(5) crossEvent_t = 1 if s_t != s_{t-1}
0 otherwise
Additionally, the indicator plots explicit cross markers:
- Cross Above GM: crossover(close, GM)
- Cross Below GM: crossunder(close, GM)
These provide directional visual cues and match the original Geometric Mean Indicator behavior.
SECTION C — DENSITY MEASURE (CROSSING CLUSTER COUNT)
A Density Zone is based on the number of cross events occurring in the last W bars:
(6) D_t = Σ_{i=0..W-1} crossEvent_{t-i}
This is a “crossing density” score: how many times price has toggled across GM recently.
The script implements this efficiently using a cumulative sum identity:
Let x_t = crossEvent_t.
(7) cumX_t = Σ_{j=0..t} x_j
Then:
(8) D_t = cumX_t - cumX_{t-W} (for t >= W)
cumX_t (for t < W)
SECTION D — DENSITY ZONE TRIGGER
We define a Density Zone state:
(9) isDZ_t = ( D_t >= θ )
where:
- θ (theta) is the user-selected crossing threshold.
Zone edges:
(10) dzStart_t = isDZ_t AND NOT isDZ_{t-1}
(11) dzEnd_t = NOT isDZ_t AND isDZ_{t-1}
SECTION E — DENSITY ZONE BOUNDS
While inside a Density Zone, we track the running high/low to display zone bounds:
(12) dzHi_t = max(dzHi_{t-1}, high_t) if isDZ_t
(13) dzLo_t = min(dzLo_{t-1}, low_t) if isDZ_t
On dzStart:
(14) dzHi_t := high_t
(15) dzLo_t := low_t
Outside zones, bounds are reset to NA.
These bounds visually bracket the “singularity span” (the churn envelope) during each density episode.
SECTION F — QHO EQUILIBRIUM (REGRESSION CENTERLINE)
Define the regression equilibrium (LSR):
(16) m_t = linreg(close_t, L, 0)
This is the “centerline” the QHO system uses as equilibrium.
SECTION G — RESIDUAL AND σ (FIELD WIDTH)
Residual:
(17) r_t = close_t - m_t
Rolling standard deviation of residuals:
(18) σ_t = stdev(r_t, L)
This σ_t is the local volatility/width of the residual field around the regression equilibrium.
SECTION H — NORMALIZED DISPLACEMENT AND SPIN FLIP
Define the standardized displacement:
(19) Y_t = (close_t - m_t) / σ_t
(If σ_t = 0, the script safely treats Y_t = 0.)
Spin Flip trigger uses a user threshold κ:
(20) spinFlip_t = ( |Y_t| > κ )
Directional spin flips:
(21) spinUp_t = ( Y_t > +κ )
(22) spinDn_t = ( Y_t < -κ )
The default κ=3.0 corresponds to “3σ excursions,” which are statistically extreme under a normal residual assumption (even though real markets are not perfectly normal).
SECTION I — QHO BANDS (OPTIONAL VISUALIZATION)
The indicator optionally draws the standard σ-bands around the regression equilibrium:
(23) 1σ bands: m_t ± 1·σ_t
(24) 2σ bands: m_t ± 2·σ_t
(25) 3σ bands: m_t ± 3·σ_t
These provide immediate context for the Spin Flip events.
WHAT YOU SEE ON THE CHART
1) MA1 / MA2 / GM lines (optional)
- MA1 (blue), MA2 (red), GM (green).
- GM is the equilibrium anchor for Density Zones and cross markers.
2) GM Cross Markers (optional)
- “GM↑” label markers appear on bars where close crosses above GM.
- “GM↓” label markers appear on bars where close crosses below GM.
3) Density Zone Shading (optional)
- Background shading appears while isDZ_t = true.
- This is the period where the crossing density D_t is above θ.
4) Density Zone High/Low Bounds (optional)
- Two lines (dzHi / dzLo) are drawn only while in-zone.
- These bounds bracket the full churn envelope during the density episode.
5) QHO Bands (optional)
- 1σ, 2σ, 3σ shaded zones around regression equilibrium.
- These visualize the current variance field.
6) Regression Equilibrium (LSR Centerline)
- The white centerline is the regression equilibrium m_t.
7) Spin Flip Markers
- A circle is plotted when |Y_t| > κ (beyond your chosen σ-threshold).
- Marker size is user-controlled (tiny → huge).
HOW TO USE IT
Step 1 — Pick the equilibrium anchor (GM)
- L1 and L2 define MA1 and MA2.
- GM = sqrt(MA1 * MA2) becomes your equilibrium boundary.
Typical choices:
- Faster equilibrium: L1=20, L2=50 (default-like).
- Slower equilibrium: L1=50, L2=200 (macro anchor).
Interpretation:
- GM acts like a “center of mass” between two moving averages.
- Crosses show when price flips from one side of equilibrium to the other.
Step 2 — Tune Density Zones (W and θ)
- W controls the time window measured (how far back you count crossings).
- θ controls how many crossings qualify as a “density/singularity episode.”
Guideline:
- Larger W = slower, broader density detection.
- Higher θ = only the most intense churn is labeled as a Density Zone.
Interpretation:
- A Density Zone is not “bullish” or “bearish” by itself.
- It is a condition: repeated equilibrium toggling (high churn / high compression).
- These often precede expansions, but direction is not implied by the zone alone.
Step 3 — Tune the QHO spin flip sensitivity (L and κ)
- L controls regression memory and σ estimation length.
- κ controls how extreme the displacement must be to trigger a spin flip.
Guideline:
- Smaller L = more reactive centerline and σ.
- Larger L = smoother, slower “field” definition.
- κ=3.0 = strong extreme filter.
- κ=2.0 = more frequent flips.
Interpretation:
- Spin flips mark when price exits the “normal” residual field.
- In your model language: a moment of decoherence/expansion that is statistically extreme relative to recent equilibrium.
Step 4 — Read the combined behavior (your key thesis)
A) Density Zone forms (GM churn clusters):
- Market repeatedly crosses equilibrium (GM), compressing into a bounded churn envelope.
- dzHi/dzLo show the envelope range.
B) Expansion occurs:
- Price can release away from the density envelope (up or down).
- If it expands far enough relative to regression equilibrium, a Spin Flip triggers (|Y| > κ).
C) Re-coherence:
- After a spin flip, price often returns toward equilibrium structures:
- toward the regression centerline m_t
- and/or back toward the density envelope (dzHi/dzLo) depending on regime behavior.
- The indicator does not guarantee return, but it highlights the condition where return-to-field is statistically likely in many regimes.
IMPORTANT NOTES / DISCLAIMERS
- This indicator is an analytical overlay. It does not provide financial advice.
- Density Zones are condition states derived from GM crossing frequency; they do not predict direction.
- Spin Flips are statistical excursions based on regression residuals and rolling σ; markets have fat tails and non-stationarity, so σ-based thresholds are contextual, not absolute.
- All parameters (L1, L2, W, θ, L, κ) should be tuned per asset, timeframe, and volatility regime.
PARAMETER SUMMARY
Geometric Mean / Density Zones:
- L1: MA1 length
- L2: MA2 length
- GM_t = sqrt(SMA(L1)*SMA(L2))
- W: crossing-count lookback window
- θ: crossing density threshold
- D_t = Σ crossEvent_{t-i} over W
- isDZ_t = (D_t >= θ)
- dzHi/dzLo track envelope bounds while isDZ is true
QHO / Spin Flips:
- L: regression + residual σ length
- m_t = linreg(close, L, 0)
- r_t = close_t - m_t
- σ_t = stdev(r_t, L)
- Y_t = r_t / σ_t
- spinFlip_t = (|Y_t| > κ)
Visual Controls:
- toggles for GM lines, cross markers, zone shading, bounds, QHO bands
- marker size options for GM crosses and spin flips
ALERTS INCLUDED
- Density Zone START / END
- Spin Flip UP / DOWN
- Cross Above GM / Cross Below GM
SUMMARY
This indicator treats the Geometric Mean as an equilibrium boundary and identifies “Density Zones” when price repeatedly crosses that equilibrium within a rolling window, forming a bounded churn envelope (dzHi/dzLo). It also models a regression-based equilibrium field and triggers “Spin Flips” when price makes statistically extreme σ-excursions from that field. Used together, Density Zones highlight compression/decision regions (equilibrium churn), while Spin Flips highlight extreme expansion states (σ-breaches), allowing the user to visualize how price compresses around equilibrium, releases outward, and often re-stabilizes around equilibrium structures over time.
Optimized BTC Mean Reversion (RSI 20/65)📈 Optimized BTC Mean Reversion (RSI 20/65)
Optimized BTC Mean Reversion (RSI 20/65) is a rule-based trading strategy designed to capture mean-reversion moves in strong market structures, primarily optimized for Bitcoin, but adaptable to other liquid cryptocurrencies.
The strategy combines RSI extremes, Stochastic momentum, and EMA trend filtering to identify high-probability reversal zones while maintaining strict risk management.
🔍 Strategy Logic
This system focuses on entering trades when price temporarily deviates from equilibrium, while still respecting the broader trend.
✅ Long Conditions
RSI below 20 (oversold)
Stochastic below 25
Price trading above the 200 EMA (or within a controlled deviation)
Designed to buy sharp pullbacks in bullish conditions
❌ Short Conditions
RSI above 65 (overbought)
Stochastic above 75
Price trading below the 200 EMA
Designed to sell relief rallies in bearish conditions
🛡 Risk Management
Fixed Stop Loss: 4%
Fixed Take Profit: 6%
Risk/Reward: 1 : 1.5
No pyramiding (single position at a time)
Full equity position sizing (adjustable)
All exits are predefined at entry, ensuring consistency and emotional discipline.
📊 Indicators Used
200 EMA – Trend direction filter
RSI (14) – Mean-reversion trigger (20 / 65 levels)
Stochastic Oscillator – Momentum confirmation
👁 Visual Features
EMA plotted directly on chart
Real-time Stop Loss, Take Profit, and Entry Price lines
Clear long/short entry markers
Works on all timeframes (optimized for intraday and swing trading)
🔔 Alerts
Long entry alerts
Short entry alerts
(Perfect for automation or discretionary execution)
⚠️ Disclaimer
This strategy is intended for educational and research purposes only. Past performance does not guarantee future results. Always test on a demo account and adjust risk parameters to your own trading plan.
MNO_2Step_Strategy_MOU_KAKU (Publish-Clear)//@version=5
strategy("MNO_2Step_Strategy_MOU_KAKU (Publish-Clear)", overlay=true, pyramiding=0,
max_labels_count=500, max_lines_count=500,
initial_capital=100000,
default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// =========================
// Inputs
// =========================
emaSLen = input.int(5, "EMA Short (5)")
emaMLen = input.int(13, "EMA Mid (13)")
emaLLen = input.int(26, "EMA Long (26)")
macdFast = input.int(12, "MACD Fast")
macdSlow = input.int(26, "MACD Slow")
macdSignal = input.int(9, "MACD Signal")
macdZeroTh = input.float(0.2, "MOU: MACD near-zero threshold", step=0.05)
volLookback = input.int(5, "Volume MA days", minval=1)
volMinRatio = input.float(1.3, "MOU: Volume ratio min", step=0.1)
volStrong = input.float(1.5, "Strong volume ratio (Breakout/KAKU)", step=0.1)
volMaxRatio = input.float(3.0, "Volume ratio max (filter)", step=0.1)
wickBodyMult = input.float(2.0, "Pinbar: lowerWick >= body*x", step=0.1)
pivotLen = input.int(20, "Resistance lookback", minval=5)
pullMinPct = input.float(5.0, "Pullback min (%)", step=0.1)
pullMaxPct = input.float(15.0, "Pullback max (%)", step=0.1)
breakLookbackBars = input.int(5, "Pullback route: valid bars after break", minval=1)
// --- Breakout route (押し目なし初動ブレイク) ---
useBreakoutRoute = input.bool(true, "Enable MOU Breakout Route (no pullback)")
breakConfirmPct = input.float(0.3, "Break confirm: close > R*(1+%)", step=0.1)
bigBodyLookback = input.int(20, "Break candle body MA length", minval=5)
bigBodyMult = input.float(1.2, "Break candle: body >= MA*mult", step=0.1)
requireCloseNearHigh = input.bool(true, "Break candle: close near high")
closeNearHighPct = input.float(25.0, "Close near high threshold (% of range)", step=1.0)
allowMACDAboveZeroInstead = input.bool(true, "Breakout route: allow MACD GC above zero instead")
// 表示
showEMA = input.bool(true, "Plot EMAs")
showMouLabels = input.bool(true, "Show MOU/MOU-B labels")
showKakuLabels = input.bool(true, "Show KAKU labels")
showDebugTbl = input.bool(true, "Show debug table (last bar)")
showStatusLbl = input.bool(true, "Show status label (last bar always)")
locChoice = input.string("Below Bar", "Label location", options= )
lblLoc = locChoice == "Below Bar" ? location.belowbar : location.abovebar
// =========================
// 必ず決済が起きる設定(投稿クリア用)
// =========================
enableTPSL = input.bool(true, "Enable TP/SL")
tpPct = input.float(2.0, "Take Profit (%)", step=0.1, minval=0.1) // ←投稿クリア向けに近め
slPct = input.float(1.0, "Stop Loss (%)", step=0.1, minval=0.1) // ←投稿クリア向けに近め
maxHoldBars = input.int(30, "Max bars in trade (force close)", minval=1)
entryMode = input.string("MOU or KAKU", "Entry trigger", options= )
// ✅ 保険:トレード0件を避ける(投稿クリア用)
// 1回でもクローズトレードができたら自動で沈黙
publishAssist = input.bool(true, "Publish Assist (safety entry if 0 trades)")
// =========================
// EMA
// =========================
emaS = ta.ema(close, emaSLen)
emaM = ta.ema(close, emaMLen)
emaL = ta.ema(close, emaLLen)
plot(showEMA ? emaS : na, color=color.new(color.yellow, 0), title="EMA 5")
plot(showEMA ? emaM : na, color=color.new(color.blue, 0), title="EMA 13")
plot(showEMA ? emaL : na, color=color.new(color.orange, 0), title="EMA 26")
emaUpS = emaS > emaS
emaUpM = emaM > emaM
emaUpL = emaL > emaL
goldenOrder = emaS > emaM and emaM > emaL
above26_2days = close > emaL and close > emaL
baseTrendOK = (emaUpS and emaUpM and emaUpL) and goldenOrder and above26_2days
// =========================
// MACD
// =========================
= ta.macd(close, macdFast, macdSlow, macdSignal)
macdGC = ta.crossover(macdLine, macdSig)
macdUp = macdLine > macdLine
macdNearZero = math.abs(macdLine) <= macdZeroTh
macdGCAboveZero = macdGC and macdLine > 0 and macdSig > 0
macdMouOK = macdGC and macdNearZero and macdUp
macdBreakOK = allowMACDAboveZeroInstead ? (macdMouOK or macdGCAboveZero) : macdMouOK
// =========================
// Volume
// =========================
volMA = ta.sma(volume, volLookback)
volRatio = volMA > 0 ? (volume / volMA) : na
volumeMouOK = volRatio >= volMinRatio and volRatio <= volMaxRatio
volumeStrongOK = volRatio >= volStrong and volRatio <= volMaxRatio
// =========================
// Candle patterns
// =========================
body = math.abs(close - open)
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
pinbar = (lowerWick >= wickBodyMult * body) and (lowerWick > upperWick) and (close >= open)
bullEngulf = close > open and close < open and close >= open and open <= close
bigBull = close > open and open < emaM and close > emaS and (body > ta.sma(body, 20))
candleOK = pinbar or bullEngulf or bigBull
// =========================
// Resistance / Pullback route
// =========================
res = ta.highest(high, pivotLen)
pullbackPct = res > 0 ? (res - close) / res * 100.0 : na
pullbackOK = pullbackPct >= pullMinPct and pullbackPct <= pullMaxPct
brokeRes = ta.crossover(close, res )
barsSinceBreak = ta.barssince(brokeRes)
afterBreakZone = (barsSinceBreak >= 0) and (barsSinceBreak <= breakLookbackBars)
pullbackRouteOK = afterBreakZone and pullbackOK
// =========================
// Breakout route (押し目なし初動ブレイク)
// =========================
breakConfirm = close > res * (1.0 + breakConfirmPct / 100.0)
bullBreak = close > open
bodyMA = ta.sma(body, bigBodyLookback)
bigBodyOK = bodyMA > 0 ? (body >= bodyMA * bigBodyMult) : false
rng = math.max(high - low, syminfo.mintick)
closeNearHighOK = not requireCloseNearHigh ? true : ((high - close) / rng * 100.0 <= closeNearHighPct)
mou_breakout = useBreakoutRoute and baseTrendOK and breakConfirm and bullBreak and bigBodyOK and closeNearHighOK and volumeStrongOK and macdBreakOK
mou_pullback = baseTrendOK and volumeMouOK and candleOK and macdMouOK and pullbackRouteOK
mou = mou_pullback or mou_breakout
// =========================
// KAKU (Strict): 8条件 + 最終三点
// =========================
cond1 = emaUpS and emaUpM and emaUpL
cond2 = goldenOrder
cond3 = above26_2days
cond4 = macdGCAboveZero
cond5 = volumeMouOK
cond6 = candleOK
cond7 = pullbackOK
cond8 = pullbackRouteOK
all8_strict = cond1 and cond2 and cond3 and cond4 and cond5 and cond6 and cond7 and cond8
final3 = pinbar and macdGCAboveZero and volumeStrongOK
kaku = all8_strict and final3
// =========================
// Entry (strategy)
// =========================
entrySignal = entryMode == "KAKU only" ? kaku : (mou or kaku)
canEnter = strategy.position_size == 0
newEntryKaku = canEnter and kaku and entrySignal
newEntryMouB = canEnter and (not kaku) and mou_breakout and entrySignal
newEntryMou = canEnter and (not kaku) and mou_pullback and entrySignal
// --- Publish Assist(保険エントリー) ---
// 条件が厳しすぎて「トレード0件」だと投稿時に警告が出る。
// closedtradesが0の間だけ、軽いEMAクロスで1回だけ拾う(その後は沈黙)。
assistFast = ta.ema(close, 5)
assistSlow = ta.ema(close, 20)
assistEntry = publishAssist and strategy.closedtrades == 0 and canEnter and ta.crossover(assistFast, assistSlow)
// 実エントリー
if newEntryKaku or newEntryMouB or newEntryMou or assistEntry
strategy.entry("LONG", strategy.long)
// ラベル(視認)
if showMouLabels and newEntryMou
label.new(bar_index, low, "猛(IN)", style=label.style_label_up, color=color.new(color.lime, 0), textcolor=color.black)
if showMouLabels and newEntryMouB
label.new(bar_index, low, "猛B(IN)", style=label.style_label_up, color=color.new(color.lime, 0), textcolor=color.black)
if showKakuLabels and newEntryKaku
label.new(bar_index, low, "確(IN)", style=label.style_label_up, color=color.new(color.yellow, 0), textcolor=color.black)
if assistEntry
label.new(bar_index, low, "ASSIST(IN)", style=label.style_label_up, color=color.new(color.aqua, 0), textcolor=color.black)
// =========================
// Exit (TP/SL + 強制クローズ)
// =========================
inPos = strategy.position_size > 0
tpPx = inPos ? strategy.position_avg_price * (1.0 + tpPct/100.0) : na
slPx = inPos ? strategy.position_avg_price * (1.0 - slPct/100.0) : na
if enableTPSL
strategy.exit("TP/SL", from_entry="LONG", limit=tpPx, stop=slPx)
// 最大保有バーで強制決済(これが「レポート無し」回避の最後の保険)
var int entryBar = na
if strategy.position_size > 0 and strategy.position_size == 0
entryBar := bar_index
if strategy.position_size == 0
entryBar := na
forceClose = inPos and not na(entryBar) and (bar_index - entryBar >= maxHoldBars)
if forceClose
strategy.close("LONG")
// =========================
// 利確/損切/強制クローズのラベル
// =========================
closedThisBar = (strategy.position_size > 0) and (strategy.position_size == 0)
avgPrev = strategy.position_avg_price
tpPrev = avgPrev * (1.0 + tpPct/100.0)
slPrev = avgPrev * (1.0 - slPct/100.0)
hitTP = closedThisBar and high >= tpPrev
hitSL = closedThisBar and low <= slPrev
// 同一足TP/SL両方は厳密に判断できないので、表示は「TP優先」で簡略(投稿ギリギリ版)
if hitTP
label.new(bar_index, high, "利確", style=label.style_label_down, color=color.new(color.lime, 0), textcolor=color.black)
else if hitSL
label.new(bar_index, low, "損切", style=label.style_label_up, color=color.new(color.red, 0), textcolor=color.white)
else if closedThisBar and forceClose
label.new(bar_index, close, "時間決済", style=label.style_label_left, color=color.new(color.gray, 0), textcolor=color.white)
// =========================
// Signals (猛/猛B/確)
// =========================
plotshape(showMouLabels and mou_pullback and not kaku, title="MOU_PULLBACK", style=shape.labelup, text="猛",
color=color.new(color.lime, 0), textcolor=color.black, location=lblLoc, size=size.tiny)
plotshape(showMouLabels and mou_breakout and not kaku, title="MOU_BREAKOUT", style=shape.labelup, text="猛B",
color=color.new(color.lime, 0), textcolor=color.black, location=lblLoc, size=size.tiny)
plotshape(showKakuLabels and kaku, title="KAKU", style=shape.labelup, text="確",
color=color.new(color.yellow, 0), textcolor=color.black, location=lblLoc, size=size.small)
// =========================
// Alerts
// =========================
alertcondition(mou, title="MNO_MOU", message="MNO: MOU triggered")
alertcondition(mou_breakout, title="MNO_MOU_BREAKOUT", message="MNO: MOU Breakout triggered")
alertcondition(mou_pullback, title="MNO_MOU_PULLBACK", message="MNO: MOU Pullback triggered")
alertcondition(kaku, title="MNO_KAKU", message="MNO: KAKU triggered")
alertcondition(assistEntry, title="MNO_ASSIST_ENTRY", message="MNO: ASSIST ENTRY (publish safety)")
// =========================
// Status label(最終足に必ず表示)
// =========================
var label status = na
if showStatusLbl and barstate.islast
label.delete(status)
statusTxt =
"MNO RUNNING " +
"ClosedTrades: " + str.tostring(strategy.closedtrades) + " " +
"BaseTrend: " + (baseTrendOK ? "OK" : "NO") + " " +
"MOU: " + (mou ? "YES" : "no") + " (猛=" + (mou_pullback ? "Y" : "n") + " / 猛B=" + (mou_breakout ? "Y" : "n") + ") " +
"KAKU: " + (kaku ? "YES" : "no") + " " +
"VolRatio: " + (na(volRatio) ? "na" : str.tostring(volRatio, format.mintick)) + " " +
"Pull%: " + (na(pullbackPct) ? "na" : str.tostring(pullbackPct, format.mintick)) + " " +
"Pos: " + (inPos ? "IN" : "OUT")
status := label.new(bar_index, high, statusTxt, style=label.style_label_left, textcolor=color.white, color=color.new(color.black, 0))
// =========================
// Debug table(最終足のみ)
// =========================
var table t = table.new(position.top_right, 2, 14, border_width=1, border_color=color.new(color.white, 60))
fRow(_name, _cond, _r) =>
bg = _cond ? color.new(color.lime, 70) : color.new(color.red, 80)
tx = _cond ? "OK" : "NO"
table.cell(t, 0, _r, _name, text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(t, 1, _r, tx, text_color=color.white, bgcolor=bg)
if showDebugTbl and barstate.islast
table.cell(t, 0, 0, "MNO Debug", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(t, 1, 0, "", text_color=color.white, bgcolor=color.new(color.black, 0))
fRow("BaseTrend", baseTrendOK, 1)
fRow("MOU Pullback", mou_pullback, 2)
fRow("MOU Breakout", mou_breakout, 3)
fRow("Break confirm", breakConfirm, 4)
fRow("Break big body", bigBodyOK, 5)
fRow("Break close high", closeNearHighOK, 6)
fRow("Break vol strong", volumeStrongOK, 7)
fRow("Break MACD", macdBreakOK, 8)
fRow("KAKU all8", all8_strict, 9)
fRow("KAKU final3", final3, 10)
fRow("AssistEntry", assistEntry, 11)
fRow("ClosedTrades>0", strategy.closedtrades > 0, 12)






















