超趨勢策略 (中文)-Caelusif ta.change(direction) < 0
strategy.entry("My Long Entry Id", strategy.long)
if ta.change(direction) > 0
strategy.entry("My Short Entry Id", strategy.short)
Indikator dan strategi
AO Divergence RCT PRO//@description=This indicator, AO Divergence Pro, is a powerful tool designed to automatically identify and plot both classic and hidden divergences on the Awesome Oscillator (AO). Divergences occur when the price action and the oscillator move in opposite directions, often signaling a potential shift in market momentum.
//
// --- Key Features ---
// 1. Regular (Classic) Divergence Detection: This feature identifies potential trend reversals.
// - A **Bullish Regular Divergence** (labeled 'R') is found when the price makes a lower low, but the AO makes a higher low. This suggests that downward momentum is weakening and a reversal to the upside may be imminent.
// - A **Bearish Regular Divergence** (labeled 'R') is found when the price makes a higher high, but the AO makes a lower high. This suggests that upward momentum is fading and a reversal to the downside may be coming.
//
// 2. Hidden Divergence Detection: This feature identifies potential trend continuations.
// - A **Bullish Hidden Divergence** (labeled 'H') is found when the price makes a higher low, but the AO makes a lower low. This often occurs during a pullback in an uptrend, suggesting the trend is likely to resume.
// - A **Bearish Hidden Divergence** (labeled 'H') is found when the price makes a lower high, but the AO makes a higher high. This often occurs during a rally in a downtrend, suggesting the downtrend is likely to continue.
//
// 3. Full Customization: The indicator allows you to toggle the display of each type of divergence (Bullish/Bearish, Regular/Hidden) independently. You can also adjust the pivot detection sensitivity and the time range between divergences to filter signals according to your trading style.
//
// --- How to Use ---
// 1. **Identify Reversals:** Look for the 'R' labels on the chart. A bullish 'R' in a downtrend is a strong signal to consider a long position. A bearish 'R' in an uptrend is a signal to consider a short position.
// 2. **Confirm Continuations:** Look for the 'H' labels. A bullish 'H' during an uptrend pullback can be a good opportunity to add to your position. A bearish 'H' during a downtrend rally can be a signal to enter a short trade.
// 3. **Filter Signals:** Use the settings panel to control the number of signals. For example, increasing the "Min Bars Between" will show fewer, but potentially more reliable, divergences.
//
// --- Attribution ---
// Created by Carlos Mauricio Vizcarra.
//
// --- Disclaimer ---
// This script is for informational and educational purposes only. It is not financial advice. Past performance is not indicative of future results.
ema 狀態機Library "ema_flow_lib"
ema_flow_state(e10, e20, e100, entanglePct, farPct, e10_prev, e20_prev)
Parameters:
e10 (float)
e20 (float)
e100 (float)
entanglePct (float)
farPct (float)
e10_prev (float)
e20_prev (float)
state_name(s)
Parameters:
s (int)
AI Bot Regime Feed (v6) — stableThis indicator generates real-time, structured JSON alerts for external trading bots or automation systems.
It combines multiple technical layers to identify market regimes and high-probability buy/sell events, and sends them to any webhook endpoint (e.g., a FastAPI or Zapier listener).
Asia Risk MonitorAsia Risk Monitor for all those monitoring the financial situation in the US, looking for a clue of a move to the down or upside.
ICT Levels Breach Scanner (12M Timeframe)Detects and scans for breaches of key Inner Circle Trader (ICT) concepts on the yearly (12M) chart: Swing Lows (3-bar wick pivots), Rejection Blocks (3-bar body pivots), Fair Value Gaps (3-bar inefficiencies), and Volume Imbalances (bullish body gaps ≥0.15%, unmitigated).
Features:
Tracks active levels with arrays for real-time breach detection (price low below any level triggers alert).
Visuals: Blue solid lines (Swing Lows), orange dashed (Rejection Blocks), purple dotted (FVGs), green boxes (VIs)—all extending right.
Red triangle + bgcolor alert on breach bar; built-in alertcondition for notifications.
Optimized for Pine Screener: Filter stocks (e.g., US exchanges) showing symbols where price has traded below these levels on the latest 12M bar.
Usage: Apply to a 12M chart for viz, or add to Screener > Pine tab for multi-symbol scans. Customize gap % or add bearish variants via inputs. Ideal for spotting potential support in long-term trends.
ICT-inspired; test on liquid stocks like AAPL/TSLA. Not financial advice.
3DMA % Declining Issues (Diodato 2019)Description:
This script is a faithful implementation of the "3-DMA % Declining Issues" indicator from Chris Diodato's 2019 CMT paper, "Making The Most Of Panic." It is a simple but highly effective short-term panic meter based on market breadth.
What It Is
This indicator first calculates the percentage of total traded issues on the NYSE that were decliners for that day. It then plots a 3-day simple moving average of that percentage. The result is a 0-100 scale indicator that provides a clear visual of the intensity of recent, widespread selling pressure.
How to Interpret
Unlike a typical "oversold" oscillator where low is a signal, with this indicator, a high value indicates panic.
Panic Spikes: A sharp spike upward suggests that a very large portion of the market is selling off simultaneously. The paper found that when this indicator exceeded 65%, 70%, or 75%, it often marked a point of extreme short-term panic that presented a buying opportunity.
Panic Threshold: The script includes a customizable "Panic Threshold" line (defaulting to 65) to help you instantly spot these events.
Settings
Data Sources: Allows toggling the use of "Unchanged" issues data.
Thresholds: You can set the "Panic Threshold" line to your preferred level (e.g., 65, 70, 75).
Short-Term Capitulation Oscillator (STCO, Diodato 2019)Description:
This script is a faithful implementation of the Short-Term Capitulation Oscillator (STCO) from Chris Diodato's 2019 CMT paper, "Making The Most Of Panic". It's a tactical breadth and volume oscillator designed to "fish for market bottoms" by identifying short-term investor capitulation.
What It Is
The STCO combines the 10-day moving averages of NYSE up-volume and advancing issues. It measures the ratio of advancing momentum (in both volume and number of issues) relative to the total traded momentum. The result is a raw, un-normalized oscillator that typically ranges from 0 to 200.
How to Interpret
The STCO is a tactical tool for identifying near-term oversold conditions and potential bounces.
Low Readings: Indicate that sellers have likely exhausted themselves in the short term, creating a potential entry point for a bounce. The paper found that readings below 90, 85, and 80 were often followed by strong market performance over the next 5-20 days.
Overbought/Oversold Lines: Use the customizable overbought/oversold lines to define your own capitulation zones and potential entry areas.
Settings
Data Sources: Allows toggling the use of "Unchanged" issues/volume data.
Thresholds: You can set the overbought and oversold levels based on the paper's research or your own testing.
Diodato 'All Stars Align' SignalDescription:
This indicator is an overlay that plots the "All Stars Align" buy signal from Chris Diodato's 2019 CMT paper, "Making The Most Of Panic." It is designed to identify high-conviction, short-term buying opportunities by requiring a confluence of both price-based momentum and market-internal weakness.
What It Is
This script works entirely in the background, calculating three separate indicators: the 14-day Slow Stochastic, the Short-Term Capitulation Oscillator (STCO), and the 3-DMA of % Declining Issues. It then plots a signal directly on the main price chart only when the specific "All Stars Align" conditions are met.
How to Interpret
A green cross (+) appears below a price bar when a high-conviction buy signal is generated. This signal triggers only when two primary conditions are true:
The 14-day Slow Stochastic is in "oversold" territory (e.g., below 20).
AND at least one of the market internal indicators shows a state of panic:
Either the STCO is oversold (e.g., below 140).
Or the 3-DMA % Declines shows a panic spike (e.g., above 65).
This confluence signifies a potential exhaustion of sellers and can mark an opportune moment to look for entries.
Settings
Trigger Thresholds: You can customize the exact levels that define an "oversold" or "panic" state for each of the three underlying indicators.
Data Sources: Allows toggling the use of "Unchanged" data for the background calculations.
Stochastic Settings: You can adjust the parameters for the Slow Stochastic calculation.
EMA50/200 — Nth Close After Break (Up/Down/Both)This indicator tracks EMA-based momentum confirmation using a customizable N-bar rule.
🧠 Logic:
- You can choose whether to track EMA 50 or EMA 200.
- When the price breaks above (or below) the selected EMA, the indicator starts counting.
- If the price stays on that side of the EMA for N consecutive closes, a single signal is triggered on the Nth bar.
- After signaling, the counter resets — the next signal appears only after a new EMA break.
⚙️ Parameters:
- Target EMA: Choose which EMA (50 or 200) the logic is based on.
- N: Number of consecutive bars required after a break.
- Direction: Up / Down / Both.
- Optional trend filters: Require EMA50 > EMA200 for Up signals, or EMA50 < EMA200 for Down signals.
- Blue ▲ = Bullish signal (Nth close after breaking above EMA)
- Red ▼ = Bearish signal (Nth close after breaking below EMA)
✅ Ideal for identifying strong trend confirmations and filtering out false EMA breakouts.
Bollinger Bands ±3σ (No Fill, Paired Colors)±3σまで1つのインジケーターで表示できるシンプルなボリンジャーバンドです。
A simple Bollinger Bands indicator that can display up to ±3σ within a single script.
phx_liq_tlLibrary "phx_liq_tl"
new_state()
update(st, len, cup, cdn, space, proximity_pct, shs)
Parameters:
st (LTState)
len (int)
cup (color)
cdn (color)
space (float)
proximity_pct (float)
shs (bool)
LTState
Fields:
upln (array)
dnln (array)
upBroken (series bool)
dnBroken (series bool)
VNREAL-ExVG (ex VHM, VRE, IDC) — rebased=100 — no-arraysVNREAL-ExVG (ex VHM, VRE, IDC) — rebased=100 — no-arrays
phx_kroLibrary "phx_kro"
compute(src, bandwidth, bbwidth, sdLook, sdMult, obos_mult)
Parameters:
src (float)
bandwidth (int)
bbwidth (float)
sdLook (int)
sdMult (float)
obos_mult (float)
start_flags(src, bandwidth, bbwidth)
Parameters:
src (float)
bandwidth (int)
bbwidth (float)
KROFeed
Fields:
Wave (series float)
is_green (series bool)
is_red (series bool)
band_width (series float)
band_width_sma (series float)
band_width_std (series float)
is_hyper_wide (series bool)
wave_sma (series float)
wave_std (series float)
wave_ob_threshold (series float)
wave_os_threshold (series float)
is_overbought (series bool)
is_oversold (series bool)
is_oversold_confirmed (series bool)
is_overbought_confirmed (series bool)
enhanced_os_confirmed (series bool)
enhanced_ob_confirmed (series bool)
triple_green_transition (series bool)
triple_red_transition (series bool)
startwave_bull (series bool)
startwave_bear (series bool)
Overextended vs 50DMA DetectorThis indicator helps traders identify when a stock or asset becomes statistically overextended relative to its 50-day moving average (50DMA) — a key signal for potential pullbacks, consolidations, or profit-taking zones.
⸻
🔍 What It Does
• Calculates the 50-day simple moving average (SMA) of price.
• Computes the percentage gap between current price and the 50DMA.
• Measures the standard deviation of that percentage gap to assess volatility-adjusted extremes.
• Flags the stock as “Overextended” when:
• Price is more than 20% above the 50DMA, and
• The % gap is greater than 3× its historical standard deviation.
When these conditions are met, the script:
• Highlights the candle with a 🚨 red triangle on the chart.
• Shades the background to indicate potential overheating.
• Triggers an alert condition so traders can be notified in real time.
phx_fvgfvg generator 4h and current time frame
library to import fvg from 4h with midle line and proximity support and resistance
EMA 9/20 com Filtro de LateralizaçãoFiltro de lateralizarão, so0 operar quando nao tiver de lado o mercado.
ATR Regime Filter (median & P70)ATR Regime Filter (Median & P70)
Purpose
Filter your signals by the volatility regime. The indicator compares the current ATR to two rolling statistical thresholds—the median (P50) and the 70th percentile (P70)—to avoid trading during quiet phases and prioritize setups when the market “breathes.”
How it works
Computes ATR(14) on a user-defined source timeframe (srcTF) via request.security.
Converts a target window in days (days) into bars of the source TF.
Due to Pine limits, the effective window is capped at 5000 bars (shown in an optional label).
Calculates Median (P50) and P70 of ATR over the effective window.
Exposes two booleans:
ATR > Median (normal-to-elevated volatility)
ATR > P70 (elevated volatility)
Display
Plots: ATR, Median, P70.
Panel background (bgcolor):
light green when ATR > P70
teal when ATR > Median
neutral otherwise
Optional label: shows source TF, effective window size (bars & days), and the boolean states.
Inputs
ATR length (default 14)
TF source ATR (srcTF, e.g., “1”, “5”, “15”)
Target window (days) (days, default 20)
Show label (bool)
Suggested use
Breakout/Momentum: require ATR > P70 in addition to your breakout conditions (close beyond level, volume, retest).
Range/Mean reversion: at minimum require ATR > Median.
In strategies, use ATR > Median/P70 as a filter alongside price structure, volume, and EMAs.
Limitations
On very short source TFs (e.g., 1-min), the window may be clipped to 5000 bars (~3.5 days). Increase srcTF (5m/15m) if you want a true 15–30 day history.
ATR measures magnitude, not direction—combine with trend/structure signals.
Adaptive Range Breakout (UPDATED RBVC)RBVC UPDATED WITH TIGHTER RANGE TIMELY BREAKOUT. This as an updated version for range breakout with volume as the earlier indicator had delayed response time
M15 Daily Open Candle Highlighter — v6Tô màu cây nến 15 phút đầu tiên của mỗi NGÀY giao dịch (theo múi giờ của symbol).
Test for firing alerts on candle openThis fires an alert on every candle open. Nice to use if you need to test the performance of TradingView Alerts.