古诗缠论-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.
Candlestick analysis
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.
Previous Day OHLC with Fib LevelThe Previous Day OHLC indicator is designed to help traders identify key price levels from the previous trading session. These levels often act as important zones of support, resistance, and market reaction points during the current day’s price action.
This indicator automatically plots the Previous Day’s Open, High, Low, and Close on any intraday timeframe, making it a powerful tool for day traders, scalpers, and swing traders who rely on market structure and session behavior.
PLANBXPRESS ENTRYThe Combined Signal + Auto Day Plan + Volume 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.
300/200 EMA Spread HeatmapHighlights the difference between 300 and 200 EMA to indicated potential over extensions in breakout structures.
ICT Trading SuiteThe ICT Trading Suite is a complete price-action toolkit designed for traders who follow ICT concepts such as Fair Value Gaps (FVGs), Order Blocks (OBs), Supply & Demand Zones, Market Structure pivots, Liquidity Zones, and Moving Averages.
This indicator combines multiple institutional concepts into a single clean, optimized, high-performance script — allowing you to see the market the same way smart money does.
Each module can be toggled on/off to match your personal strategy.
🔥 FEATURE SET
1️⃣ Moving Averages (Fully Customisable)
5 MA slots
Multiple MA types: EMA, SMA, RMA, WMA, HMA, VWMA
Custom colours & visibility toggles
Supports all timeframes
Ideal for bias recognition and trend filtering.
2️⃣ Fair Value Gaps (FVG) – ICT 3-Candle Model
The script detects bullish and bearish FVGs using the classic ICT logic:
Bullish FVG → high < low
Bearish FVG → low > high
Features:
Automatic gap detection
Custom colours for up/down FVGs
CE (consequent encroachment) line
Optional deletion when filled
Extend FVGs dynamically
Lookback days filter
FVG blocks automatically update until price fills the imbalance.
3️⃣ Supply & Demand Zones (Swing-Based)
Built from confirmed swing highs/lows using ta.pivothigh and ta.pivotlow.
Features:
ATR-based zone thickness
Zone overlap filtering
Auto-cleaning oldest zones
POI (Point of Interest) marker
3 types of arrays:
Supply zone boxes
Demand zone boxes
POI midline boxes
Zones extend 100 bars by default and update dynamically.
Zones are deleted instantly when price breaks them (converted into BOS behavior).
4️⃣ Smart Money Order Blocks (Simple Engulfing Pattern)
OBs are detected using the classic engulfing model:
Bullish OB
Bearish candle → Engulfed by bullish candle where
close > high
Bearish OB
Bullish candle → Engulfed by bearish candle where
close < low
Each OB stores:
Original top/bottom
Current top/bottom
POI line (optional)
Engulfing candle structure
Mitigation state
Features:
Dynamic boundaries (OB shrinks as price mitigates)
POI line update
Automatic deletion (or recolour) when completely mitigated
Limit how many OBs stay on chart
Support for adding HTF OBs later
This creates very clean and very accurate ICT order blocks.
5️⃣ Liquidity / Vector Zones (Volume-Spread Analysis)
A built-in PVSRA-style logic marks areas of institutional activity.
Vector candles detected using:
Volume ≥ 200% of average
Or candle spread × volume ≥ highest in last 10 bars
Medium-volume vectors (150%) also included
Colour-coded zones extend to the right
Auto-cleanup once price clears the zone
Useful for detecting areas where algorithms (MMXs) aggressively buy/sell.
6️⃣ Pivot Levels
Multiple pivot methods supported:
Traditional
Fibonacci
Woodie
Classic
DM
Camarilla
Features:
Auto / Daily / Weekly / Monthly / Quarterly / Yearly pivots
Dynamic line extension
Labels with prices
Custom colours
Only draws selected pivot levels
Efficient matrix-based pivot system
💎 TECHNICAL EXCELLENCE
✔ Pine Script v6
✔ Efficient arrays & memory handling
✔ Clean dynamic updates
✔ Max-performance structure
✔ Modular design (each component can be toggled)
✔ Integrates all ICT concepts in one tool
🎯 Who Is This Indicator For?
Perfect for:
ICT Traders
Smart Money / Institutional Traders
Day Traders & Scalpers
Swing Traders using OB/FVG
Liquidity hunters
Market structure based traders
Volume-spread or PVSRA focused traders
This combines multiple institutional concepts without cluttering the chart.
🏆 Final Notes
This is a true all-in-one institutional suite, replacing up to 8 separate indicators.
Designed for precision, clarity, and professional price-action workflow.
Fibonacci 3H Personalizada - NYIndicador desenvolvido para tracar fibos a cada 3 horas. utilizar para confluencia
5m FVGs Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
First Historical Candle Date daily intervalIndicator that displays a first historical candle on daily interval as a table at a top-right corner
Quantile Support & ResistanceThis indicator plots dynamic support and resistance zones based on quantile logic — a statistically grounded method for identifying structural price boundaries.
Support Level: The price below which only a small percentage of lows fall (default: 10%). This approximates a strong demand zone.
Resistance Level: The price above which only a small percentage of highs rise (default: 10%). This approximates a strong supply zone.
Volatility-Adaptive: Levels adjust automatically to changing market conditions using a configurable lookback window.
Quantile Interpolation: Uses sorted price data and fractional indexing to estimate percentile thresholds with precision.
This tool is ideal for traders who want to visualize statistically significant price zones without relying on subjective drawing or fixed levels. It pairs well with breakout strategies, retest logic, and compression overlays.
ORB Pro SuiteOverview
ORB Pro with Filters + Debug Overlay is an advanced Opening Range Breakout indicator designed for precision intraday trading. It defines a configurable ORB window, automatically builds the breakout range, and triggers long or short signals only when all active filters align. The script also includes a built-in debug overlay that explains why each breakout is accepted or blocked, allowing traders to fine-tune entries with transparency.
What Makes It Unique
• Modular filter stack – close-confirmation vs. instant breaks, retest confirmation with adjustable tolerance %, volume-spike and EMA-trend filters, ORB-size range, session cutoff, and cooldown logic.
• Non-blocking debug overlay – inline or corner display of the exact rejection reason (“Too late,” “Low volume,” “Trend mismatch,” etc.).
• Fully customizable visuals – choose shaded, outline, or line-only ORB styles; set opacity, border color, and right-edge offset so the box never hides current candles.
• Integrated reversal engine – detects doji, hammer, and engulfing structures within a time-filtered window and optional VWAP/EMA confluence.
How It Works
During the defined opening window (default 9:30 – 9:45 NY), the indicator records the session high and low.
After the box closes, it looks for breakouts confirmed by candle close or retest (per user settings).
Each signal passes through range, volume, trend, time-delay, and session filters before printing.
Visual stop-loss / take-profit levels appear for reference using either R:R multiples or fixed %.
The optional reversal layer marks short-term exhaustion zones for counter-scalp setups.
Usage Guidelines
• Apply to standard candlestick charts (not Heikin Ashi, Renko, or Range).
• Select your local ORB start / end time, then enable or disable filters based on your playbook.
• Use the “Outline only” or “Corner table” debug modes for a cleaner chart.
• The script provides visual and alert-based confirmations only; it does not execute orders or backtest performance.
Inputs at a Glance
– ORB window (start/end time)
– Close-confirm toggle
– Retest tolerance %
– Volume SMA length
– EMA length for trend filter
– Min/Max range % filter
– Cooldown bars and session cutoff
– Visual R:R ratio or fixed SL/TP %
– Box style, opacity, border width / color
– Debug overlay mode (inline or table) and leader lines
Notes & Disclaimers
• This script is for analysis and educational purposes only. It does not constitute financial advice or guarantee performance.
• Signals are calculated on completed bars without lookahead.
• Invite-only access ensures version integrity and controlled distribution.
© Trades with B – Original development in Pine v6. Reuse of this code requires explicit permission from the author.
Candle Countdown TimerThis Pine Script indicator displays a real-time countdown timer for the current candlestick on a TradingView chart. It helps traders monitor how much time remains before the current candle closes, which is especially useful for timing entries or exits in fast-moving markets.
🔧 Key Features:
• Time Calculation: Computes the remaining time in the current bar
• Dynamic Label Display: Shows the countdown as a label beside the active candle, updating every tick.
YCGH Company Fundamental BriefCompany Fundamental Brief Indicator
This Pine Script indicator provides an at-a-glance fundamental analysis dashboard directly on your TradingView chart. It automatically fetches and displays essential financial metrics from FactSet, eliminating the need to switch between charts and financial statements.
No.2 DeadwoodDeadwood AJC Turtle strong arm
waffles
tacos
lettuce
all of the above is needed to understand
Live Bar = White (Body+Wick), Others = #2e2e2eThis script turns all candles gray, except for the last bar, which is the candle that hasn't closed and whose price is changing live. It makes that candle white so you can always spot the last candle on the chart more clearly. Enjoy!
Current Session H/L — EvolvingTrack the current session high and low as it's formed. Lines are projected back to previous sessions and forward in time. Bot projections are adjustable.
YCGH ATH DrawdownHow the Indicator Measures Drawdown from ATH
The indicator continuously tracks and calculates the percentage decline from the all-time high (ATH) using a systematic approach.
ATH Tracking Mechanism
Dynamic ATH Calculation: The script maintains a persistent variable that stores the highest price ever reached. On each bar, it compares the current high with the stored ATH using ath := math.max(ath, high), updating the ATH whenever a new peak is reached.
YCGH Drawdown PercentilesWhat This Indicator Does?
The Drawdown Percentiles indicator tracks how far below the all-time high (ATH) a stock or asset is currently trading, then displays statistical percentiles of historical drawdowns in a customizable table.
Percentile Analysis: It collects up to 5,000 historical bars of drawdown data, sorts them, and calculates user-selected percentiles (default: 10th, 30th, 50th) to show where current drawdowns rank historically.
Visual Display: A table shows each percentile threshold with color-coded drawdown values, helping you quickly assess whether the current drawdown is typical or extreme compared to historical patterns.
Practical Use Cases
Risk Assessment: Identify if current drawdowns fall within normal ranges or represent extreme conditions requiring position adjustments.
Entry/Exit Timing: Use percentile rankings to time entries during historically shallow drawdowns (better conditions) and reduce exposure during deep drawdowns.
Strategy Comparison: Compare drawdown patterns across different assets or trading strategies to evaluate risk-adjusted performance.
QQQ SR Pro.MARIA VICTORIAthis script is thinking to help traders to avoid false breakdown on resistant or support. try to improve enter en exist trading in any time frame, as well.
Slippage Liquidity IndicatorSlippage's Proprietary Indicator - find and mark out resting liquidity before NY Market Open.






















