JW Clean Adaptive Channel//@version=5
indicator("JW Clean Adaptive Channel", overlay=true)
// Inputs
emaFast = input.int(20, "EMA Fast")
emaMid = input.int(50, "EMA Mid")
emaSlow = input.int(200, "EMA Slow")
atrLen = input.int(14, "ATR Length")
regLen = input.int(100, "Regression Window")
multATR = input.float(2.0, "Channel Width x ATR", step=0.1)
baseATR = input.int(50, "ATR Baseline")
volCap = input.float(2.5, "Max Vol Mult", step=0.1)
// EMAs
ema20 = ta.ema(close, emaFast)
ema50 = ta.ema(close, emaMid)
ema200 = ta.ema(close, emaSlow)
plot(ema20, "EMA 20", color=color.lime)
plot(ema50, "EMA 50", color=color.yellow)
plot(ema200, "EMA 200", color=color.orange, linewidth=2)
// Adaptive regression channel
atr = ta.atr(atrLen)
bAtr = ta.sma(atr, baseATR)
vRat = bAtr == 0.0 ? 1.0 : math.min(atr / bAtr, volCap)
width = atr * multATR * vRat
basis = ta.linreg(close, regLen, 0)
upper = basis + width
lower = basis - width
slope = basis - basis
chanColor = slope > 0 ? color.lime : slope < 0 ? color.red : color.gray
pU = plot(upper, "Upper", color=chanColor)
pL = plot(lower, "Lower", color=chanColor)
pB = plot(basis, "Basis", color=color.gray)
fill(pU, pL, color=color.new(chanColor, 85))
// Candle and background color
ribbonBull = ema20 > ema50 and ema50 > ema200
ribbonBear = ema20 < ema50 and ema50 < ema200
barcolor(ribbonBull ? color.lime : ribbonBear ? color.red : na)
bgcolor(slope > 0 ? color.new(color.green, 85) : slope < 0 ? color.new(color.red, 85) : na)
// MACD buy/sell markers
= ta.macd(close, 12, 26, 9)
buySig = ta.crossover(macdLine, sigLine) and slope > 0
sellSig = ta.crossunder(macdLine, sigLine) and slope < 0
plotshape(buySig, title="Buy", style=shape.triangleup, color=color.lime, location=location.belowbar, size=size.tiny)
plotshape(sellSig, title="Sell", style=shape.triangledown, color=color.red, location=location.abovebar, size=size.tiny)
// Trend strength label (single-line calls; no dangling commas)
strength = slope * vRat * 1000.0
string tText = "Sideways"
color tCol = color.gray
if strength > 2
tText := "Strong Uptrend"
tCol := color.lime
else if strength > 0.5
tText := "Weak Uptrend"
tCol := color.new(color.lime, 40)
else if strength < -2
tText := "Strong Downtrend"
tCol := color.red
else if strength < -0.5
tText := "Weak Downtrend"
tCol := color.new(color.red, 40)
var label tLbl = na
if barstate.islast
if not na(tLbl)
label.delete(tLbl)
tLbl := label.new(x=bar_index, y=high, text=tText, style=label.style_label_right, textcolor=color.white, color=tCol, size=size.normal, yloc=yloc.price)
// 10-day breakout alerts
hi10 = ta.highest(high, 10)
lo10 = ta.lowest(low, 10)
alertcondition(close > hi10, title="10-Day High Break", message="{{ticker}} 10D HIGH @ {{close}}")
alertcondition(close < lo10, title="10-Day Low Break", message="{{ticker}} 10D LOW @ {{close}}")
alertcondition(buySig, title="Buy Alert", message="BUY {{ticker}} @ {{close}}")
alertcondition(sellSig, title="Sell Alert", message="SELL {{ticker}} @ {{close}}")
指标和策略
Trader Assistant 2Title
Trader Assistant 2 — Multi‑Timeframe ATR Volatility and Intrabar Range Monitor
Summary
Trader Assistant 2 is a compact, multi‑timeframe dashboard that helps you instantly gauge market conditions across 1m, 5m, 15m, 30m, 1h, and 4h. It blends two ATR‑based views:
- Volatility regime: current ATR vs its baseline (ATR moving average).
- Intrabar range usage: how much of ATR the current bar has already traveled from its open.
Each timeframe is color‑coded by the worst of the two signals, so you see risk and heat at a glance. An optional lead cell summarizes active alerts and lists the timeframes that triggered them.
What you see on the chart
- Single‑row table positioned at the bottom‑right of the chart.
- One cell per enabled timeframe:
- Green (soft): normal conditions
- Orange: elevated risk/volatility
- Red: high/critical risk/volatility
- Text turns white when a warning/critical condition is present
- Optional “alert” cell on the left:
- Yellow when any warning is present
- Red when any critical condition is present
- Message indicates which timeframes fired due to Volatility and/or ATR usage (e.g., “Volatility (5m, 15m) | ATR (1m)”)
How it works (high level)
- Volatility regime: compares current ATR to a smoothed ATR baseline. If the ratio exceeds your Elevated or High thresholds, the timeframe escalates to orange or red.
- Intrabar ATR usage: measures absolute distance from the bar’s open. If the move exceeds your Yellow or Red percentage of ATR, the timeframe escalates accordingly.
- Combined color: the cell shows the highest severity between the two checks.
Mermaid (logic overview)
flowchart LR
A --> B
B --> C
C --> D{Vol Severity(Normal/Elevated/High)}
E --> F
F --> G{ATR Usage Severity(Normal/Yellow/Red)}
D --> H
G --> H
H --> I
H --> J
Inputs and defaults
- Timeframe toggles: 1m, 5m, 15m, 30m, 1h, 4h (enable/disable any mix)
- ATR periods per timeframe (defaults):
- 1m: 60
- 5m: 24
- 15m: 16
- 30m: 14
- 1h: 12
- 4h: 12
- ATR baseline smoothing:
- Moving average period: 20 (used to compare current ATR vs average)
- Volatility thresholds (percent of baseline):
- Elevated: 80%
- High: 120%
- Intrabar ATR usage thresholds:
- Yellow: 50% of ATR
- Red: 75% of ATR
Typical use cases
- Session open scan: Quickly see where heat is building and which timeframes require caution.
- News and high‑impact events: Identify heightened conditions before entering or managing positions.
- Trade filtering: Avoid entries during red conditions or tighten risk; favor normal/green regimes for cleaner structure.
- Risk sizing: Reduce size or switch to passive management when multiple timeframes show elevated/high conditions.
Tips and best practices
- Threshold tuning: Different markets/venues need different percentages. Start with defaults, then adjust to your symbol’s volatility.
- Baseline smoothing: Increase the MA period to reduce noise in the volatility regime.
- Multi‑TF alignment: When higher timeframes turn orange/red, treat lower‑TF signals with extra caution.
- Combine with structure and volume tools for a complete decision framework.
Notes and limitations
- Visual monitor: This is an on‑chart dashboard/visual alert. It does not emit TradingView alert() notifications.
- Multi‑timeframe behavior: Values update according to each source timeframe’s bar closes.
- Strategy‑agnostic: This does not generate buy/sell signals. Use it for context, regime awareness, and risk control.
- Educational only: Not financial advice. Always backtest and validate on your own instruments.
Color legend
- Green: Normal conditions
- Orange: Elevated volatility and/or significant intrabar range usage
- Red: High/critical conditions (exercise caution)
- Yellow alert cell: Warning present in at least one timeframe
- Red alert cell: Critical condition present in at least one timeframe
Quick start
1) Add the indicator to your chart.
2) Enable the timeframes relevant to your trading horizon.
3) Keep defaults or tune ATR periods and thresholds to your symbol.
4) Read the row from left to right: alert cell (if present), then timeframes. Prioritize management when you see orange/red, and be selective with entries during heat.
Market Regime IndexThe Market Regime Index is a top-down macro regime nowcasting tool that offers a consolidated view of the market’s risk appetite. It tracks 32 of the world’s most influential markets across asset classes to determine investor sentiment by applying trend-following signals to each independent asset. It features adjustable parameters and a built-in alert system that notifies investors when conditions transition between Risk-On and Risk-Off regimes. The selected markets are grouped into equities (7), fixed income (9), currencies (7), commodities (5), and derivatives (4):
Equities = S&P 500 E-mini Index Futures, Nasdaq-100 E-mini Index Futures, Russell 2000 E-mini Index Futures, STOXX Europe 600 Index Futures, Nikkei 225 Index Futures, MSCI Emerging Markets Index Futures, and S&P 500 High Beta (SPHB)/Low Beta (SPLV) Ratio.
Fixed Income = US 10Y Treasury Yield, US 2Y Treasury Yield, US 10Y-02Y Yield Spread, German 10Y Bund Yield, UK 10Y Gilt Yield, US 10Y Breakeven Inflation Rate, US 10Y TIPS Yield, US High Yield Option-Adjusted Spread, and US Corporate Option-Adjusted Spread.
Currencies = US Dollar Index (DXY), Australian Dollar/US Dollar, Euro/US Dollar, Chinese Yuan/US Dollar, Pound Sterling/US Dollar, Japanese Yen/US Dollar, and Bitcoin/US Dollar.
Commodities = ICE Brent Crude Oil Futures, COMEX Gold Futures, COMEX Silver Futures, COMEX Copper Futures, and S&P Goldman Sachs Commodity Index (GSCI) Futures.
Derivatives = CBOE S&P 500 Volatility Index (VIX), ICE US Bond Market Volatility Index (MOVE), CBOE 3M Implied Correlation Index, and CBOE VIX Volatility Index (VVIX)/VIX.
All assets are directionally aligned with their historical correlation to the S&P 500. Each asset contributes equally based on its individual bullish or bearish signal. The overall market regime is calculated as the difference between the number of Risk-On and Risk-Off signals divided by the total number of assets, displayed as the percentage of markets confirming each regime. Green indicates Risk-On and occurs when the number of Risk-On signals exceeds Risk-Off signals, while red indicates Risk-Off and occurs when the number of Risk-Off signals exceeds Risk-On signals.
Bullish Signal = (Fast MA – Slow MA) > (ATR × ATR Margin)
Bearish Signal = (Fast MA – Slow MA) < –(ATR × ATR Margin)
Market Regime = (Risk-On signals – Risk-Off signals) ÷ Total assets
This indicator is designed with flexibility in mind, allowing users to include or exclude individual assets that contribute to the market regime and adjust the input parameters used for trend signal detection. These parameters apply to each independent asset, and the overall regime signal is smoothed by the signal length to reduce noise and enhance reliability. Investors can position according to the prevailing market regime by selecting factors that have historically outperformed under each regime environment to minimise downside risk and maximise upside potential:
Risk-On Equity Factors = High Beta > Cyclicals > Low Volatility > Defensives.
Risk-Off Equity Factors = Defensives > Low Volatility > Cyclicals > High Beta.
Risk-On Fixed Income Factors = High Yield > Investment Grade > Treasuries.
Risk-Off Fixed Income Factors = Treasuries > Investment Grade > High Yield.
Risk-On Commodity Factors = Industrial Metals > Energy > Agriculture > Gold.
Risk-Off Commodity Factors = Gold > Agriculture > Energy > Industrial Metals.
Risk-On Currency Factors = Cryptocurrencies > Foreign Currencies > US Dollar.
Risk-Off Currency Factors = US Dollar > Foreign Currencies > Cryptocurrencies.
In summary, the Market Regime Index is a comprehensive macro risk-management tool that identifies the current market regime and helps investors align portfolio risk with the market’s underlying risk appetite. Its intuitive, color-coded design makes it an indispensable resource for investors seeking to navigate shifting market conditions and enhance risk-adjusted performance by selecting factors that have historically outperformed. While it has proven historically valuable, asset-specific characteristics and correlations evolve over time as market dynamics change.
SWR Label SystemSWR Label System -- Sweep · Wait · Reclaim
The SWR Label System is a visual trading companion built to highlight liquidity events and institutional reactions in real time.
It automatically detects:
• 🌀 Sweep – liquidity grabs beyond recent highs or lows
• 🔁 Reclaim – price closing back across the swept level
• 🔊 Volume Spike – significant surges beyond average activity
When all three align, the script plots 🚀 SWR Long or 🔻 SWR Short labels with default 2:1 risk-to-reward targets for rapid evaluation.
Each label includes Entry, Take Profit, and Stop Loss values (Entry ± 2% / 1% by default).
These defaults are for illustration only -- it’s best to adapt TP / SL levels to recent structure, highs, and lows for precision risk management.
Optional toggles allow you to show or hide sweep, reclaim, and volume markers individually, plus a cooldown feature to reduce signal clutter.
⚠️ Educational use only -- not financial advice. Always confirm structure, volume, and context before trading live funds.
Delta Profile - OnlyFlowThis script plots a horizontal profile of trading activity based on a chosen lookback window. It can be displayed either as a Volume Profile or as a Delta Profile:
Volume Profile: shows the distribution of total traded volume at each price level.
Delta Profile: approximates buying vs. selling activity by measuring volume signed with candle direction, highlighting where positive or negative pressure was strongest.
Features
Adjustable row size (in ticks) to control price-level granularity.
Configurable lookback window and profile width.
Profiles are drawn on the right side of the chart, with optional offset.
Bars are color-coded: blue for positive delta, red for negative delta, and gray for neutral.
Optional numeric labels show either delta values or volume, with formatting options (K/M/B suffixes, decimal places, text size).
Usage
Enable Volume Profile to view how volume is distributed across price, or switch to Delta Profile to emphasize directional imbalances. The profile updates on the most recent bar and helps visualize where trading interest is concentrated during the selected lookback range.
Daily High/Low/Mid + Open + Session VWAP + Bollinger BandsVery good indicator for proper price action trading. try it...
Gemini Powerbars v2.1⚙️ Internal Logic — How Powerbars Decides to “Turn On”
Gemini Powerbars analyzes each candle across multiple dimensions — momentum, trend structure, and relative strength context — and produces a binary output: a bar is either “powered” (signal on) or “neutral” (signal off).
Internally, it combines:
RSI velocity (momentum acceleration rather than raw RSI value).
Normalized volume pressure — volume adjusted for average activity over the last n bars, so a quiet day won’t falsely trigger strength.
SMA alignment — where the candle closes relative to the 20- and 50-period SMAs and its own average true range (ATR) position.
Relative Strength (RS) — how the symbol performs versus a market benchmark (like SPY or QQQ).
Only when all these micro-conditions line up does the Powerbar print — meaning the engine sees synchronized energy between price motion, volatility, and strength. This makes the signal highly selective — it doesn’t fade, average, or interpolate. It flips on when aligned, and off when noise dominates.
📊 Dashboard Table — “At-a-Glance Market Engine”
The table in the upper-right corner summarizes what the bars are detecting internally:
Column Description
Momentum A 0-to-5 score derived from the RSI velocity and normalized momentum bursts. Higher = stronger impulse power.
Trend Evaluates whether price is stacked in bullish or bearish order vs. its short and mid-term moving averages. A “5” means full alignment (e.g., price > 20MA > 50MA).
Structure / Zone Indicates whether price is inside a “High-Probability Zone” — areas where recent pullbacks or compression historically lead to expansion. This helps filter continuation setups from false breakouts.
Volume Bias Tracks whether current volume exceeds the rolling 10-bar average, confirming participation.
RS Score The relative strength percentile versus the benchmark. Shows if the ticker is outperforming the overall market trend.
The table dynamically updates each bar, so you can see why a Powerbar fired — for example, Momentum = 5 and RS = 5 with Trend = 4 means you’ve got a textbook momentum thrust. If those start dropping back to 2-3 while bars stay “on,” it’s an early warning of exhaustion or fading participation.
In short, Gemini Powerbars isn’t guessing — it’s measuring engine torque. The bars tell you when ignition happens; the dashboard tells you why.
Last All-Time High (ATH) — By yarinit shows the recant all time high and then you can detact where was the recant all time high without searching it
GOLD SL CANDLEPIPS🟡 GOLD SL Distance + Position Size (500 $ Fixed Risk)
This indicator displays two essential pieces of information directly on the chart:
1. The Stop-Loss distance — measured from the candle close to the end of the wick.
• For long trades, the distance is calculated from the close to the low.
• For short trades, it’s from the high to the close.
• The result is shown as a clean numeric value, placed just above or below each candle, without any lines or labels cluttering the chart.
2. The required position size (in lots) to risk a fixed amount of 500 USD on that distance.
• This script includes a GOLD preset, based on the standard value of 10 USD per point per lot.
• The calculation follows this rule:
Lots = round(500 / (Distance_in_points × 10))
→ Equivalent to Lots = round(50 / Stop_in_points).
• Example:
• If the wick is 5 points, the script shows “5 | 10” → 5 pt stop = 10 lots for a 500 USD risk.
• If the wick is 8 points, it shows “8 | 6”, matching the official GOLD risk table.
⸻
⚙️ Main Features
• Works with Points, Ticks, or Pips (unit selectable).
• Shows both Stop-Loss distance and corresponding lot size near the candle.
• Fully customizable colors, font size, and text transparency.
• Offsets allow you to move the numbers vertically or horizontally on the chart.
• Option to display values for the current candle only, or for the last N candles.
• The GOLD preset can be disabled to use a custom value per unit (e.g., $/pip/lot, $/tick/lot).
⸻
🧠 Ideal Use Case
This tool is designed for Gold (XAU/USD) traders who want to:
• Instantly see their Stop-Loss distance in real time,
• And know exactly how many lots to use to maintain a consistent 500 USD risk per trade.
It’s a clean, minimalist money-management indicator that helps you stay precise, consistent, and disciplined in your risk control — without leaving the chart.
RSI Buy/Sell SignalsThis indicator generates buy and sell signals based on the Relative Strength Index (RSI). It works by calculating the RSI value over a 14-period length and then checking if the RSI drops below 30 (oversold) or rises above 70 (overbought). When it’s oversold, the indicator plots a green upward arrow suggesting a potential buy. When it’s overbought, it plots a black downward arrow suggesting a potential sell. In essence, it helps traders spot possible reversal points using RSI levels directly on their charts. CME_MINI:NQ1!
MILLION MEN — Smart ZonesMILLION MEN — Smart Zones
What it is
A smart, structure-based Support/Resistance indicator that automatically anchors dynamic Smart Zones from the latest confirmed swing high and low. It identifies two adaptive regions — the Premium Zone near swing highs and the Discount Zone near swing lows — with an optional 50% equilibrium line for balanced price analysis.
How it works (high-level)
Confirmed swings: Uses ta.pivothigh and ta.pivotlow with adaptive or manual lookback.
Smart pairing: When both recent pivots are confirmed, the script anchors a new pair and builds zones based on that range.
Dynamic zones:
Discount Zone: Bottom portion of the range (e.g., 25%).
Premium Zone: Top portion of the range.
Midline: Optional 50% equilibrium; can extend right.
Lifecycle control:
Zones auto-update as new highs/lows appear.
Option to re-anchor when a new swing pair forms.
Option to auto-expire after a set number of bars for clean charts.
Color scheme:
Green = Discount Zone
Fuchsia = Premium Zone
Gray = Midline
How to use
Works well on 5m–1H for intraday, or 4H–1D for swing.
Use the Discount Zone for long bias setups and the Premium Zone for short bias confirmations.
Combine with your preferred momentum, VWAP, or volume tools for confluence.
Adjust Zone Depth % and Auto-expire depending on your timeframe.
Originality & value
Unlike static S/R indicators, Smart Zones evolve with price structure — re-anchoring on new swing formations while maintaining clarity and balance. Its confirmed-pivot logic avoids repainting and produces professional, non-cluttered charts for precision trading.
Limitations & transparency
Pivots confirm with delay equal to pivot length; this prevents repaint.
Results differ by asset and volatility regime.
Non-standard chart types (Heikin-Ashi, Renko, Range) are not supported.
This script provides analytical guidance, not financial advice.
Initial Balance HUYEN 3this is indicator to calculates and draws the initial balance price levels which can be really interesting for intraday activities.
💎 Hybrid RSI+EMA Fade CoreColor coded candles that work off extremes of the RSI and the distance price is from the 50 ema. Dots denote possible extremes.
Futures Floor Pivots — Timeframe Invariant (CT settlement)Daily pivot points with different settlement time options for different futures instruments.
Advanced HMM - 3 States CompleteHidden Markov Model
Aconsistent challenge for quantitative traders is the frequent behaviour modification of financial
markets, often abruptly, due to changing periods of government policy, regulatory environment
and other macroeconomic effects. Such periods are known as market regimes. Detecting such
changes is a common, albeit difficult, process undertaken by quantitative market participants.
These various regimes lead to adjustments of asset returns via shifts in their means, variances,
autocorrelation and covariances. This impacts the effectiveness of time series methods that rely
on stationarity. In particular it can lead to dynamically-varying correlation, excess kurtosis ("fat
tails"), heteroskedasticity (volatility clustering) and skewed returns.
There is a clear need to effectively detect these regimes. This aids optimal deployment of
quantitative trading strategies and tuning the parameters within them. The modeling task then
becomes an attempt to identify when a new regime has occurred adjusting strategy deployment,
risk management and position sizing criteria accordingly.
A principal method for carrying out regime detection is to use a statistical time series tech
nique known as a Hidden Markov Model . These models are well-suited to the task since they
involve inference on "hidden" generative processes via "noisy" indirect observations correlated
to these processes. In this instance the hidden, or latent, process is the underlying regime state,
while the asset returns are the indirect noisy observations that are influenced by these states.
Session Boxes & Key Levels (Daily Prev HL)Session Boxes & Key Levels
Draws intraday session ranges and key higher-timeframe levels to aid structure and bias.
Session boxes: Shades the Asia, Europe, and US sessions with live-updating highs/lows. Timezone is user-selectable.
Previous Day levels (PDH/PDL): Plots yesterday’s Daily high and low, auto-extends across the current day.
Previous Week levels (PWH/PWL): Plots last week’s high and low, auto-extends across the current week.
Works on any timeframe and updates in real time; labels are added for quick identification.
Use it to spot session ranges, liquidity sweeps, and reactions at prior day/week extremes.
Cute Meguru Volume Bars (Enhanced • v5)What it does
CVOLB+ paints volume bars by comparing price & volume now vs. lookback bars ago (LazyBear-style). You get five states:
Up + Vol Up = price ↑ and volume ↑ (accumulation)
Up + Vol Down = price ↑ but volume ↓ (weak up day)
Down + Vol Down = price ↓ and volume ↓ (weak sell)
Down + Vol Up = price ↓ and volume ↑ (distribution)
Neutral = none of the above
On top, it detects volume spikes using two filters you can use separately or combine:
SMA multiplier (volume > avgVolume × SpikeThreshold), and/or
Z-score (standardized surge above zThresh).
Choose OR (catch either condition) or AND (only the biggest, cleanest spikes). Spikes get a separate highlight layer (same bar, brighter color) plus an optional background tint. There’s also a Volume MA with three modes (Neutral Gray, Purple, or Slope-Aware that shifts mint/pink based on MA slope).
How to use it
Read the colors to gauge quality of moves (e.g., “Down + Vol Up” = classic distribution).
Use the Spike layer to flag events worth drilling into (breakouts, capitulation, news).
Slope-Aware MA helps you see when activity is trending higher or cooling off.
Intraday-only toggle lets you hide everything on higher timeframes if you want a pure day-trading tool.
Built-in alerts: “Spike Up” and “Spike Down” fire when spikes occur on up/down candles.
Tweak lookback, lenMA, and the spike thresholds to fit your instrument’s liquidity. Colors are fully customizable so you can match your chart theme.
Yearly Highs - 3 Years - GreenmoonYearly highs for current and L2 years. For 2025 would be 2025, 2024, and 2023 yearly highs.
MultiStochasticThis script shows when 4 Stochastic %D values (9, 14, 30, and 60) are below 20 or above 80.
Live Position Sizer V2This is a refined version of my first Position calculator. The first one was getting in the way of the candles on the chart, so I added the ability for the user to position it where they want. I changed the color to gray. I added a "ATR based SL". This position sizer will lock onto the current price. With a SL of your choosing, it will give you real time quantity, and lots. Simply input your account size, risk, where you want your SL, long or short trade. It will spit out the info you need in real time. Like the first version, there is the ability to turn on "Live +R targets".