Liquidity Hunter + ShortLiquidity Hunter + Short
Version with Short Trade Signals by Cihan Culha
This indicator is based on the original Liquidity Hunter by ChartPrime (MPL 2.0 license).
It detects potential Long and Short liquidity hunts by analyzing candle body, wick percentages, ATR bands, and slope direction.
Features:
Long signals (original) based on lower wick, body %, slope, and ATR bands
Short signals (added) based on upper wick, body %, negative slope, and ATR bands
Target (TP), Stop Loss (SL), CHOCH, and BOS levels plotted dynamically
Visual boxes highlight potential liquidity zones
Risk/Reward (RR) configurable via input
Usage Notes:
This modified version adds Short trade signals while preserving the original Long logic
Original author ChartPrime is credited; modifications by Cihan Culha
Adjust Body %, Wick %, and RR multiplier to suit your trading timeframe and style
For educational purposes; always use proper risk management
Indicators and strategies
London Killzone High/Low (live → lock & extend @07:59 UTC-5)London Killzone High/Low (live → lock & extend @07:59 UTC-5)London Killzone High/Low (live → lock & extend @07:59 UTC-5)
Tokyo Session High/Low (live → lock & extend @02:59 UTC-5)Tokyo Session High/Low (live → lock & extend @02:59 UTC-5)Tokyo Session High/Low (live → lock & extend @02:59 UTC-5)
NY KZ High/Low (live → lock @10:00 UTC-5)NY KZ High/Low (live → lock @10:00 UTC-5) NY KZ High/Low (live → lock @10:00 UTC-5)
bar color changeThis Pine v5 code allows you to distinguish between candles on the chart. The body/wick/frame of the "live" candle that hasn't yet closed is colored white. When a live candle is present, the body of the immediately preceding candle is colored green with offset = -1. All other candles remain gray (#2e2e2e). plotcandle fixes the wick/frame so that the live and previous candles are selected when following the trend. If there are other conflicting scripts, the most recently added one quickly takes precedence.
neeson CME Gaps CompleteCME Gap Detection & Trading Signals Indicator
Originality & Unique Features
This indicator represents a sophisticated approach to CME gap analysis by combining multiple innovative features not found in standard gap indicators:
Dual Visualization System:
Traditional gap boxes that precisely mark the price void between Friday's close and Monday's open
Intelligent bar coloring that instantly identifies gap days through color differentiation
Comprehensive Time Analysis:
Tracks gaps for up to 4 years, providing unprecedented historical context
Maintains gap memory even through chart reloads and timeframe changes
Advanced Signal Generation:
Real-time gap fill detection with customizable threshold levels
Integrated alert system for both new gap formations and gap fill completions
Functionality & Implementation
Core Detection Mechanism
The indicator automatically identifies CME weekend gaps by comparing Friday's closing price with Monday's opening price. When a significant price discontinuity is detected (configurable threshold), it triggers the visualization and tracking system.
Visual Components:
Gap Boxes: Semi-transparent colored rectangles (green for bullish gaps, red for bearish gaps) that precisely cover the price gap area between Friday's close and Monday's open
Extension Lines: Projection lines that extend from gap boundaries into future price action, helping traders visualize potential support/resistance levels
Bar Coloring: Automatic color coding where gap bars are highlighted (green/red) while normal trading bars appear gray, creating immediate visual distinction
Signal Generation:
Buy Signals: Triggered when bearish gaps are filled (price moves upward through the gap zone)
Sell Signals: Activated when bullish gaps are filled (price moves downward through the gap zone)
Smart Thresholds: Configurable fill percentage (0.1%-5.0%) to avoid false signals from minor price fluctuations
Technical Implementation
The script employs sophisticated array management to track multiple gaps simultaneously while maintaining optimal performance. Each gap stores:
Price boundaries (top/bottom)
Gap type (bullish/bearish)
Detection timestamp
Volume data (for potential future analysis)
Fill status
The automatic cleanup system removes gaps older than the configured maximum age (1-10 years) to prevent memory overload while preserving relevant historical context.
Usage Instructions
Basic Operation
Apply to Chart: Add the indicator to any cryptocurrency or futures chart
Automatic Detection: The script automatically scans for Monday openings relative to Friday closes
Visual Analysis: Observe colored bars for gap days and corresponding gap boxes
Configuration Options
Gap Detection Settings:
Show CME Gaps: Enable/disable the entire detection system
Max Gap Age: Set how long to track gaps (1-10 years)
Only Weekend Gaps: Focus exclusively on CME weekend gaps
Visual Customization:
Bullish/Bearish Gap Colors: Customize gap box appearance
Extension Lines: Control projection line visibility and length
Bar Coloring: Toggle bar color differentiation
Trading Signals:
Show Trading Signals: Enable/disable buy/sell alerts
Gap Fill Threshold: Set sensitivity for gap fill detection
Enable Alerts: Activate platform notifications
Trading Strategy Integration
Gap Fill Strategy:
Monitor for gap fill completion signals
Enter positions in the direction of the fill (buy on bearish gap fills, sell on bullish gap fills)
Use extension lines as potential profit targets or stop-loss levels
Support/Resistance Identification:
Historical gaps often act as future support/resistance
Use the 4-year gap memory to identify key price levels
Combine with other technical analysis tools for confirmation
Core Calculation Philosophy
Market Psychology Foundation
The indicator operates on the well-established market principle that "gaps tend to fill." This phenomenon stems from:
Market Memory: Traders remember significant price discontinuities and often trade to close them
Liquidity Gaps: Gaps represent areas of low liquidity that markets naturally seek to revisit
Psychological Levels: Round numbers and significant price levels often coincide with gap boundaries
Statistical Edge
By systematically tracking gaps across extended timeframes (up to 4 years), the indicator provides:
Probability Assessment: Historical gap fill rates help assess current gap fill probabilities
Risk Management: Clear visual boundaries for stop-loss placement and position sizing
Time Analysis: Understanding how quickly different types of gaps tend to fill
Adaptive Detection
The algorithm incorporates:
Dynamic Thresholds: Configurable sensitivity to ignore insignificant gaps
Multi-Timeframe Awareness: Consistent performance across different chart timeframes
Market Condition Adaptation: Automatic adjustment to varying volatility environments
This comprehensive approach transforms simple gap detection into a sophisticated trading tool that combines visual clarity, historical context, and actionable signals for improved trading decisions.
GMH : Tech Bubble Good Morning Holding
Simulating How to Ride the Bubble — and Jump Out Before the Crash
Be careful! Most simulation results show that this strategy sometimes underperforms a simple buy-and-hold, because it gives away positions during deep retracements and buys back at higher thresholds.
Humans often struggle with cutting losses. When the pain becomes too much, they lose the confidence needed to execute even a reasonable strategy.
But in terms of mentality, this approach reduces long-term portfolio volatility. It helps investors feel more at peace, especially during real market crashes like the tech bubble in 2021.
How to use : Select TimeFrame 4HR on trading view
PLANBXPRESS PSYCHOLOGICAL LEVEL ENTRY MODELThis Indicator merges multiple professional trading concepts into one visual tool — helping traders identify momentum shifts, entry zones, and daily trading plans with volume confirmation.
It automatically detects trend direction, generates dynamic take-profit & stop-loss levels, and overlays key daily reference points such as VWAP, pivot, support, and resistance zones based on ATR and trend context.
⚙️ Main Components
1️⃣ Signal System
Detects trend bias using SMA-based logic.
Generates entry price, TP1–TP3, and SL dynamically from recent impulse ranges.
Updates signals automatically when trend bias changes or previous targets are hit.
Visual levels are drawn directly on the chart.
2️⃣ Volume Analysis
Compares current volume against a moving average (SMA).
Classifies volume as:
🟢 Strong (above 1.5× average)
🟡 Average
🔴 Weak (below 0.8× average)
Displays the current volume strength and trend bias in an on-chart table.
3️⃣ Auto Day Plan
Uses multi-timeframe ATR calculations to define:
Support / Resistance zones
Pivot & Balance areas
Daily VWAP
Auto Targets (ATR-based expansion levels)
Adapts automatically to selected base timeframe (1H, 4H, or Daily).
4️⃣ Trend Context
Dual EMA system (50 & 200) to confirm bullish/bearish structure.
Aligns expected direction with VWAP & pivot location for context-aware bias.
🎯 What You Get on Chart
📈 Automatic LONG/SHORT signals
🎯 TP1, TP2, TP3, and SL levels
📊 Volume strength meter
🧭 VWAP, pivot, support/resistance & balance zones
🎨 Clean visual layout for intraday and swing traders
🧩 Inputs
Parameter Description
lenImpulse Impulse range length
smaLen SMA length for trend bias
levelRatio SL/TP ratio multiplier
volLen Volume SMA length
baseTF Base timeframe for zones/VWAP
atrMult1 / atrMult2 ATR multipliers for target levels
fwdBars Extension range for future projection
💡 How to Use
Add the script to your chart and choose your preferred timeframe.
Observe signal direction (📈 LONG / 📉 SHORT) and TP/SL levels.
Confirm entries when:
Trend aligns with VWAP direction, and
Volume category shows Strong or Average.
Use Auto Day Plan levels (pivot, balance, VWAP) as intraday reaction zones.
Sessions High & Low LevelsAutomatically plots high & low levels for multiple sessions. Clear session structure for intraday traders using price action, liquidity concepts, or session-based strategies.
Automatically plots the High & Low, for sessions such as London, New York, and Asia, with full customization for any custom session or timezone. These levels extend forward and adapt in real time, giving you a clear view of session-based structure and liquidity behavior.
Perfect for traders using ICT concepts, session narratives, or intraday market structure. Session ranges often act as key liquidity pools, breakout zones, and directional guides, this tool makes them easy to see at a glance.
Features:
Auto-plots High & Low for NY, London, and Asia sessions (customizable)
Fully customizable session times, colors, labels, and visibility options
Works across any assets
TRADE ORBIT:MULTI ALMA INDICATORThis indicator plots multiple ALMAs (5, 9, 21, 34, 50, 55W, 89, 144, 233) to show trend direction across all time horizons.
ALMA 9 is color-changing and acts as the main signal line.
Lower ALMAs show short-term momentum, while higher ALMAs reveal long-term trend structure.
The Weekly ALMA 55 provides higher-timeframe confirmation, helping filter false signals and maintain trades aligned with the major trend.
SureTradeFX VWAP VWAP (Volume Weighted Average Price) is a volume-weighted average price over a specific period. Traders and institutions use it to see the “true” price based on both price and traded volume, not just price alone.
Trilok saini EMA Pullback + MACD + ADX Strategy📌 HA Double EMA Pullback + MACD + ADX Strategy — Description
This strategy combines Heikin Ashi candles, Double EMA pullbacks, MACD momentum filtering, and ADX trend-strength confirmation to generate high-probability trend-continuation signals.
It is designed to avoid choppy markets and focus only on strong trending conditions.
🔥 Key Features
1️⃣ Heikin Ashi Trend Analysis
Heikin Ashi candles are calculated on the selected timeframe.
They smooth out market noise to highlight clear bullish or bearish trends.
Trend direction is displayed in a live info table.
2️⃣ Double EMA Pullback Logic
The main signal engine of this strategy:
Buy conditions
Price crosses above EMA 20
EMA 20 > EMA 50 (confirming uptrend)
A pullback is detected using the back-step (price was above EMA earlier)
MACD + ADX filters approve the trade
Sell conditions
Price crosses below EMA 20
EMA 20 < EMA 50 (confirming downtrend)
Pullback confirmation based on earlier price action
MACD + ADX filters approve the trade
This logic focuses on trend continuation instead of reversal setups.
3️⃣ MACD Momentum Filter
Buy signals appear only when MACD histogram is positive (green).
Sell signals appear only when MACD histogram is negative (red).
Prevents entries during weak or directionless momentum.
4️⃣ ADX Trend Strength Filter
Signals are blocked when ADX is below the selected threshold.
Ensures trades happen only in strong trending markets, reducing false signals.
5️⃣ Visual Enhancements
Clean Heikin Ashi candles with customizable colors
Optional regular candles for comparison
EMA overlays on HA candles
Buy/Sell labels with customizable text
Info table showing:
Trend direction
HA close
Regular close
EMA values
ADX reading
Active filters
🎯 Ideal Use Cases
Trend-following traders
Swing traders
Intraday traders who want filtered signals
Anyone wanting fewer false signals in sideways markets
⚠️ Disclaimer
This script is for educational and research purposes only.
Past performance does not guarantee future results. Always backtest and use proper risk management.
BC_Monthly Strength ArmorV0001Monthly Strength Armor – Institutional-Grade Monthly Structure & Real-Time Momentum
A non-repainting, multi-timeframe indicator that delivers clean, professional-grade monthly levels and real-time strength analysis — from 1-minute to monthly charts.
Core Features
PMH / PML Rays
True Previous Month High & Low, drawn once per month from the first trading day, extending infinitely right. Glued to price — survives scroll, zoom, and timeframe changes.
RVOL (Relative Volume)
Current month volume vs. average of prior months.
>1.5 → Orange (high conviction)
<1.0 → Gray (stealth mode)
ATR%
Monthly volatility as % of price.
>3% → Red (explosive)
<1.5% → Gray (consolidation)
Strength Score (0–100)
Combines:
Price position in monthly range (40%)
Trend state (HH/HL or LL/LH) (30%)
RVOL (30%)
→ ≥70 = Bullish Armor | ≤30 = Bearish Armor
Bar Coloring & Background Tint
Instant visual bias: Green (bullish), Red (bearish), Gray (neutral).
Proximity Triangles
▲ near PMH | ▼ near PML → breakout/bounce alerts.
Right-Edge Labels
Clean, stacked display: PMH, PML, RVOL, ATR%, Score — always visible.
Multi-Session VWAP (NY, London, Asia) + HOD/LOD BandsMulti-Session VWAP (NY, London, Asia) + HOD/LOD Bands
Adaptive Trend & Momentum [ATM] - All-in-One Confirmation Tired of Cluttered Charts and Conflicting Signals? This All-in-One Indicator is Your Solution.
The Adaptive Trend & Momentum (ATM) indicator is a powerful, next-generation trading tool designed to eliminate chart clutter and provide clear, high-conviction signals. Instead of using multiple conflicting indicators, the ATM system combines trend, momentum, and volatility into a single, cohesive, and adaptive framework. It automatically adjusts to changing market conditions, giving you a reliable edge in any environment.
This is not just another moving average crossover. It is a complete trading system that helps you identify the trend, confirm its strength, and time your entries with precision.
Key Features
•
Adaptive Moving Average (AMA): The core of the system. The AMA automatically adjusts its length based on market volatility (using the Average True Range). It becomes faster and more responsive in volatile markets to catch moves early, and smoother in calm markets to avoid noise and false signals.
•
Dynamic Volatility Bands: These bands expand and contract based on market volatility, providing a dynamic map of support and resistance. They are crucial for identifying pullback opportunities and setting effective stop-loss levels.
•
Integrated Momentum Oscillator: A smoothed RSI-based oscillator that runs in a separate pane. It is designed to confirm the signals from the main chart. The oscillator and its histogram are color-coded to show whether bullish or bearish momentum is in control, giving you an instant read on market strength.
•
Clear Consensus Signals: The ATM indicator provides four distinct, easy-to-read signals directly on your chart:
•
STRONG BUY: The highest-conviction signal, appearing when the trend is bullish, momentum is bullish, and the price has pulled back to a strategic entry zone near the AMA.
•
BUY: A standard confirmation signal when both trend and momentum are aligned to the upside.
•
STRONG SELL: The highest-conviction short signal, appearing when the trend is bearish, momentum is bearish, and the price has rallied to a strategic entry zone.
•
SELL: A standard confirmation signal when both trend and momentum are aligned to the downside.
•
Real-Time Dashboard: A convenient on-chart table that provides a complete overview of the market at a glance. It shows the current adaptive length, trend direction, momentum status, consensus signal, and volatility percentage, so you always know what the indicator is thinking.
How It Works: The Adaptive Engine
The magic of the ATM indicator lies in its adaptive engine. Traditional moving averages use a fixed length (e.g., 50-period MA), which can be too slow in a fast market or too sensitive in a choppy one. The ATM’s Adaptive Moving Average solves this by dynamically adjusting its calculation period in real-time:
When volatility increases, the AMA shortens its length to react more quickly to price changes. When volatility decreases, it lengthens its period to smooth out noise and prevent false signals.
This adaptive nature ensures that the indicator remains relevant and effective across different assets and timeframes, from scalping to swing trading.
How to Use This Indicator: A Simple Trading Strategy
The ATM indicator is designed for clarity and ease of use. Here is a basic framework for trading with it:
For Long (Buy) Positions:
1.
Identify the Trend: Wait for the Adaptive Moving Average (AMA) line to turn green, indicating a confirmed uptrend.
2.
Confirm with Momentum: Check that the momentum oscillator is above 50 and preferably rising, confirming bullish strength.
3.
Find Your Entry: The best entry is a "STRONG BUY" signal. This tells you that the price has pulled back to a value area within the uptrend, offering a high-probability entry. A standard "BUY" signal can also be used, but the conviction is higher on "STRONG" signals.
4.
Set Your Stop-Loss: A logical place for a stop-loss is just below the lower volatility band.
5.
Take Profit: Consider taking profits when an opposing "SELL" or "STRONG SELL" signal appears, or when the price reaches a key resistance level.
For Short (Sell) Positions:
1.
Identify the Trend: Wait for the Adaptive Moving Average (AMA) line to turn red, indicating a confirmed downtrend.
2.
Confirm with Momentum: Check that the momentum oscillator is below 50 and preferably falling, confirming bearish strength.
3.
Find Your Entry: The best entry is a "STRONG SELL" signal. This indicates the price has rallied to a resistance area within the downtrend, offering a prime shorting opportunity. A standard "SELL" signal can also be used.
4.
Set Your Stop-Loss: A logical place for a stop-loss is just above the upper volatility band.
5.
Take Profit: Consider taking profits when an opposing "BUY" or "STRONG BUY" signal appears, or when the price reaches a key support level.
Customization and Settings
The indicator is fully customizable to fit your trading style and the asset you are trading. You can adjust:
•
AMA Settings: Control the base length and the volatility multiplier to make the indicator more or less sensitive.
•
Momentum Settings: Adjust the RSI length and smoothing for the oscillator.
•
Volatility Bands: Change the multiplier to widen or narrow the bands.
•
Visuals: Toggle signals, labels, and the dashboard on or off, and customize all colors to your preference.
Summary
The Adaptive Trend & Momentum (ATM) indicator is more than just a tool; it is a complete system for making more confident trading decisions. By adapting to the market and combining trend, momentum, and volatility, it provides a clear, uncluttered, and powerful view of price action.
Add it to your chart today and experience the clarity of adaptive trading!
Disclaimer: This indicator is a tool for technical analysis and should not be considered financial advice. Trading involves risk, and you should always use proper risk management. Past performance is not indicative of future results. Practice on a demo account before trading with real capital.
Keywords: Adaptive, Moving Average, Trend, Momentum, Volatility, RSI, Bands, Signal, Confirmation, All-in-One, System, Strategy, ATR, Volatility, Dashboard, Alert
古诗缠论-10.2版ChanLun---gushi
Strokes (笔): Identifies the foundational directional movements (upward and downward strokes) that form the basis of all price action.
Segments (线段): Automatically combines strokes into more significant trend structures, representing a complete directional move.
Pivots / Centers (中枢): Detects and draws "pivots," which are overlapping price ranges created by three consecutive segments. Pivots are the core of the theory, representing market equilibrium or consolidation zones. The interaction of price with these pivots is crucial for analysis.
Buy & Sell Points (买卖点): Automatically identifies and labels the three distinct types of trading signals according to the theory:
1st Type Buy/Sell Points: Based on MACD divergence after a trend creates a new price high or low. These are primary trend-reversal signals.
2nd Type Buy/Sell Points: The first pullback after a 1st Type signal that does not create a new price extreme. These are confirmation entry points for a new trend.
3rd Type Buy/Sell Points: The first pullback that occurs after price leaves a pivot area without re-entering it. These signals confirm the continuation of the current trend.
Dashboard: A clean on-screen panel displays key statistics, including the number of strokes, segments, and pivots identified, as well as the current trend direction and the last trading signal detected.
HoneG_ローソク足着色v3ザオプションのワンタッチ取引向けに作ったけど、
汎用的に使えるローソク足ツールver3です
全13通貨毎の平均実体サイズを元に色強度を変更、かつ、
実体比率100%の足は、進行方向に▲マークが出ます。
今のところ5秒~1分足に対応しています。(5分は未対応)
※標準搭載ローソク足の色は無色にしておいてください。
Originally created for one-touch trading on The Option,
this is a versatile candlestick tool ver3.
It adjusts color intensity based on the average real body size for all 13 currencies,
and displays a ▲ mark on candles with a 100% real body ratio in the direction of the trend.
Currently supports 5-second to 1-minute timeframes. (5-minute not supported)
※Please set the standard candlestick color to transparent.
Bar RangeI use this to complement the daily ATR bars. It is interesting to see how much the stock has actually moved vs the ATR movement.
LiquiBreak — Semi-Automatic Breakout, Gap & Trend-Filter StrategLiquiBreak is a semi-automatic breakout + gap detection strategy that combines pivots, a volatility filter and an optional Supertrend direction check to generate entry signals. It can optionally place take-profit and stop-loss orders in points. Use it to highlight high-probability breakout/gap setups and to automate exits when you want — otherwise treat its signals as trade alerts that require your confirmation.
📌 LiquiBreak — Semi-Automatic Breakout, Gap & Trend Strategy
1. Overview
1. LiquiBreak is a semi-automatic breakout + gap strategy designed to catch high-quality moves with volatility confirmation.
2. Uses pivot-based support/resistance , gap detection , Supertrend filtering , and optional automatic TP/SL in points .
3. Works on all assets and timeframes, especially effective on XAUUSD, Indices, Crypto and FX pairs .
---
2. What This Script Detects
1. Breakouts above resistance and below support during strong volatility.
2. Bullish & bearish gap patterns confirmed with momentum sequences.
3. Dynamic volatility zones based on normalized ATR ranges.
4. Optional Supertrend trend direction for filtering bad signals.
5. Automatic TP/SL orders when enabled.
---
3. Recommended Indicators to Combine With
To increase accuracy and reduce false breakouts:
1. Supertrend (included) – best for trend direction.
2. EMA 9/21 or EMA 20/50 – confirms trend strength & pullbacks.
3. RSI or Stoch RSI – avoid overbought/oversold breakouts.
4. VWAP – institutional bias & fair value zones.
5. CPR / Pivot Points – confluence with breakout levels.
6. MACD – trend confirmation on higher timeframe.
7. Volume Profile (optional) – find breakout liquidity zones.
These indicators help filter low-quality signals without affecting the script’s core logic.
---
4. Key Features
1. Volatility-based pivot support & resistance .
2. Reliable breakout confirmation using real-time volatility strength.
3. Strong gap pattern detection with ATR threshold.
4. Optional Supertrend confirmation for safer entries.
5. Point-based Take Profit / Stop Loss .
6. Toggle on/off: Longs, Shorts, TP, SL .
7. Semi-automatic execution — not fully automated.
8. Clean, optimized structure for stability and speed.
---
5. Inputs / Settings
1. Pivot / Levels Period – defines structural S/R levels.
2. Volatility Filter (%) – prevents low-quality signals.
3. TP Points – automatic take-profit target.
4. SL Points – automatic stop-loss.
5. Enable TP / Enable SL – full exit control.
6. Allow Long / Allow Short – direction control.
7. Supertrend Filter – filter weak counter-trend trades.
---
6. How to Use the Strategy
1. Select timeframe & tune pivot/volatility settings.
2. Enable/disable automatic TP/SL based on your style.
3. Turn ON Supertrend for safer trend-based trades.
4. Confirm signals using EMA, RSI, VWAP, Volume or CPR.
5. Watch for high-volatility breakouts near key levels.
6. Use multiple timeframe analysis for stronger confirmation.
---
7. Important Warning (User Must Monitor Trades)
⚠ This script is NOT a fully automatic bot.
1. You MUST monitor the chart while using this strategy.
2. You MUST manually close trades if market conditions change.
3. Auto TP/SL helps, but during news events or fast markets, slippage may occur.
4. Treat this script as a signal + entry assistant , not a fire-and-forget system.
---
8. Best Practices
1. Works best on XAUUSD, NAS100, BTC, ETH, EURUSD .
2. Avoid major news unless experienced.
3. Increase volatility filter during choppy markets.
4. Use M15–H1 for clean breakouts; M5 for scalping.
5. For beginners: keep TP/SL enabled for safety.
6. Backtest first → then paper trade → then live trade.
---
9. Disclaimer
1. For educational and research purposes only .
2. Not financial advice.
3. User is fully responsible for their trades and risk.
4. Past performance does not guarantee future results.
Enhanced Oversold | 超跌信号 + 历史统计 + 模拟入出场 (v2.4)Enhanced Oversold | Oversold Signal + Historical Stats + Simulated Entries/Exits (v2.4) – Release Notes (EN)
1. Overview
This script is an advanced “buy-the-dip” toolkit for US stocks and ETFs. It detects rare, deep intraday selloffs on fundamentally strong names, then simulates a three-tier entry strategy around the event and tracks different exit paths.
The goal is to answer three questions:
* When did similar crashes happen in the past?
* How would a disciplined laddered entry have performed?
* How long did it take for price to recover under different exit rules?
2. Core idea
* Define an 8-hour “crash” relative to a robust reference price yBase = min(previous-day VWAP, previous close).
* Combine this with short-term RSI and 15m Z-score filters to avoid “random noise” dips.
* Filter out regime-level risk (index / sector crash, volatility spikes, liquidity stress, bad long-term trend).
* When a valid oversold event appears, simulate staged entries (E1/E2/E3) and exits, then record everything into a historical table and JSON for external analysis.
3. Signal logic (summary)
* Timeframe: designed for 15m / 5m charts, using US RTH session 09:30–16:00.
* Crash trigger (must all be true):
* 8h drawdown from yBase ≤ fixed threshold (default −6%) and the 8h low is recent within N×15m bars.
* RSI(1h) below an oversold level (default < 30).
* 15m return Z-score ≤ threshold (default ≤ −1.5) over a configurable window.
* Optional filters:
* Circuit breaker: SPY + sector ETF + VIX/VIX3M + VVIX conditions to avoid market-wide panic regimes.
* Liquidity stress: SPY 1h “stress index” (ATR/price, intraday range vs volume, and VIX Z-score) normalised to 0–100, with a user threshold.
* Shape filter: only accept “A-type” healthy long-term trend set-ups (6m / 12m performance vs VWAP/EMA and daily 200SMA slope).
4. Simulated entries (E1 / E2 / E3)
* E1: first ladder price anchored to the first RTH after the event, with optional “same-day RTH” entry if the event happens during RTH.
* E2: only becomes valid from the next RTH day onward, and only if the new RTH low breaks the E1-execution-day low. The target depth is based on E1 discount × (1+α).
* E3: only after E2, on a different day (not the E1 “anchor” day). Depth is based on the max discount of E1/E2 × (1+β).
* Stair and cap rules:
* A minimum tick step between ladders, adjustable in ticks.
* Optional cap so that every entry price must be below a multiple of the event price.
* Optional “chase on first RTH bar”: if nothing fills on the first RTH bar, prices can be lifted once toward the intraday low, while keeping ladder spacing and cap constraints.
* All actual fills are simulated against bar lows. The script records:
* Whether E1/E2/E3 filled.
* Actual execution prices.
* Average entry price and the entry sequence string (e.g. “13”, “123”).
5. Exit logic and timing metrics
Two exit rules are tracked in parallel:
* Exit Ref: exit when close returns to yBase.
* Exit Open+Y%: exit when close reaches min(event close, first post-event open) × (1+Y%).
For each event the script records:
* t_ref_d: days from event to first touch of yBase.
* tY_d: days until Open+Y% level is reached.
* tUp_d: days until price turns “bullish again” (RTH VWAP ≥ previous daily VWAP and close > previous close).
* tLow_d: days until the minimum price between event and t_ref (or end of window) is reached.
* lowToRef: that minimum price.
* ddMinPct: maximum drawdown (in %) from average entry to lowToRef.
Additional intraday stats for the first RTH after the event:
* dayFirstLow: low of the first RTH bar from the chosen statistics start.
* rthLow: overall RTH low of that day.
* eqFirst: whether the overall low equals the first-bar low.
* postDipAvg: average close after the daily low is formed (equal-weighted).
6. Historical table on chart
* The on-chart table shows up to maxRows events, most recent first.
* Columns include:
* Date, 8h drawdown, yBase, stress, circuit conditions, shape (A/B/C).
* Entry sequence and actual execution prices.
* Average entry price.
* Exit prices and PnL (in % and absolute) for both exit modes.
* Timing metrics (t_ref, tY, tUp, tLow).
* Min price to t_ref, max drawdown vs average entry.
* First RTH low, day RTH low, equality flag, post-dip average, and market flag (US/HK).
The table is only redrawn on bar close to reduce CPU load.
7. Liquidity stress pane
* Optional lower pane that plots the SPY-based liquidity stress index (0–100).
* Components (all on 60m SPY/VIX data):
* rvZ: Z-score of ATR/price.
* rpvZ: Z-score of intraday range divided by volume.
* vixZ: Z-score of VIX.
* Stress index = 50 + 10 × (rvZ + rpvZ + vixZ), clipped to .
* A horizontal line marks the current filter threshold.
8. Webhook JSON outputs
The indicator can send three types of alerts via alert():
* Signal
* Emitted only when a new oversold event fires.
* Contains ticker, market flag, event time, drop8h, RSI1h, Z15, yBase, shape, circuit reason, and stress.
* History
* Emitted when requested, containing a full snapshot of the latest event:
* All key metrics used in the table, including absolute PnL for both exit modes, timing metrics, drawdown stats, and post-dip averages.
* HistoryAll
* Compressed bulk export of all events as a compact JSON object:
* Short keys (d, dr8, yb, st, c, sh, e, px, avg, xr, pr, absR, xy, py, absY, tr, ty, tu, tl, l2r, dd, fl, rl, eq, pavg).
* Numbers rounded to 3 decimals to reduce payload size.
* Because TradingView enforces a payload size limit, HistoryAll is automatically split into multiple chunks (up to ~3200 characters each).
* When HistoryAll is selected and a manual “dump all” flag is turned on, the script will emit multiple alerts on the same bar until all chunks are sent.
9. What is new in v2.3
Compared with previous versions, v2.3 adds:
* Deeper risk metrics:
* Tracking of the minimum price until recovery (lowToRef) and its timing (tLow_d).
* Max drawdown vs average entry (ddMinPct) for each event.
* E1-execution-day RTH low tracking, used to decide whether later days truly “make a new low” before adding E2.
* Absolute PnL fields:
* absRef and absOY for both exit modes, calculated using user-defined share/contract sizes for E1/E2/E3.
* More compact and robust HistoryAll:
* Short-key JSON objects, 3-decimal numeric formatting, chunked output suitable for 3rd-party storage and analysis.
* Performance optimisations:
* Array length normalisation is done once per bar instead of inside the per-event loop.
* Table rendering only happens on bar close, and no longer clears the whole grid every bar.
* Same-day RTH pricing for event-day entries is restricted to the latest event only, reducing redundant work on historical events.
10. Usage notes and disclaimer
* Recommended canvas: 15m or 5m chart, US stocks / ETFs, with RTH session set to 09:30–16:00.
* For stable operation on TradingView’s servers, avoid extremely large lookback windows and oversized history tables if your symbol has very long history.
* This script is for educational and research purposes only.
* It is not financial advice and does not guarantee profitability. Always combine it with your own risk management, fundamental research, and market context.






















