PROTECTED SOURCE SCRIPT
已更新

ATR-EMA Trend Trader (Adaptive) v2

24
v9.1
ATR-EMA Trend Trader (Adaptive)
Purpose
Trend-following tool for timing long entries on EMA crosses, filtering by trend quality, scaling out on weakness, and exiting with a robust, volatility-aware trailing stop. Designed to stay in trends while cutting noise on lower timeframes.
What it does
Entries
Signals:
Low Confidence Buy = EMA10 crosses above EMA20
Big Buy = EMA10 crosses above EMA50
Trend Gate (Angle Filter): Requires EMA50 to be rising by at least a chosen angle (°). Optional regression smoothing and HTF EMA50 confirmation.
Early-Turn Override: Allows one early probe before the angle turns positive if the angle is improving and a price rule is met (options: EMA20>EMA50, Close>EMA50, Close>EMA20&EMA20>EMA50, Close>EMA20).
Take Profit
Tracks the highest confirmed pivot high since entry (pivothigh) and can:
TP immediately on confirmation (optional), or
TP when close crosses that level (default), or
TP on wick touch (optional).
“Once per pivot” option avoids repeat fires.
Exits & Risk
Fixed ATR Stop (optional): entry − ATR × baseMult.
Dynamic ATR Stop (Chandelier): highest high since entry − ATR × dynMult, with four anti-whipsaw upgrades:
Adaptive multiplier (ADX-blended): dynMult blends between weak and strong based on ADX (computed internally—no ta.adx() needed).
Arm after profit / bars: trail doesn’t activate until profit ≥ R or after N bars.
Freeze tightening for N bars after a new highest high (prevents immediate snap-tightening).
Confirmation to exit: need K consecutive closes below the trail and optional structure break (EMA20 and/or last Swing-Low) before closing.
EMA30 Trail (optional): soft exit when close < EMA30.
Scale-Outs
30%: close < EMA10 and high volume.
50%: close < EMA50, bearish candle, and high volume.
PVRSA Tag
Labels Confirmed M Pivot High when a fresh local high forms on high volume with a bearish candle.
Visuals & Panel
Dotted EMA10/20/30/50, ATR bands around EMA20, optional Volume MA, optional classic pivot markers.
Info table shows EMAs, ATR, base & dynamic multipliers, bands, EMA50 angle, ADX, Early-Turn ON/OFF, whether the dynamic stop is armed, and live diagnostics (closes below / freeze).
Alerts
Buy signals, scale-outs, take-profit, PVRSA pivot, fixed stop, dynamic stop, and EMA30 trail.
Quick start
Reduce noise: Angle min 0.5–1.0°, Lookback 8–13; enable regression if still choppy.
Catch turns: Early-Turn ON; Max negative 2–3°; Improving 3–5; Price rule Close>EMA20 for earlier probes.
Stay in trends: Adaptive dyn mult ON (weak=1.8, strong=2.8, ADX len=14, ADX low=15, high=30);
Arm after 1.0R and 5 bars; Freeze=2; Closes below=2; Option-C EMA20 confirm ON, Swing-Low OFF (enable if still too tight).
版本注释
ATR-EMA Trend Trader (Adaptive)
Purpose
Trend-following tool for timing long entries on EMA crosses, filtering by trend quality, scaling out on weakness, and exiting with a robust, volatility-aware trailing stop. Designed to stay in trends while cutting noise on lower timeframes.
What it does
Entries
Signals:
Low Confidence Buy = EMA10 crosses above EMA20
Big Buy = EMA10 crosses above EMA50
Trend Gate (Angle Filter): Requires EMA50 to be rising by at least a chosen angle (°). Optional regression smoothing and HTF EMA50 confirmation.
Early-Turn Override: Allows one early probe before the angle turns positive if the angle is improving and a price rule is met (options: EMA20>EMA50, Close>EMA50, Close>EMA20&EMA20>EMA50, Close>EMA20).
Take Profit
Tracks the highest confirmed pivot high since entry (pivothigh) and can:
TP immediately on confirmation (optional), or
TP when close crosses that level (default), or
TP on wick touch (optional).
“Once per pivot” option avoids repeat fires.
Exits & Risk
Fixed ATR Stop (optional): entry − ATR × baseMult.
Dynamic ATR Stop (Chandelier): highest high since entry − ATR × dynMult, with four anti-whipsaw upgrades:
Adaptive multiplier (ADX-blended): dynMult blends between weak and strong based on ADX (computed internally—no ta.adx() needed).
Arm after profit / bars: trail doesn’t activate until profit ≥ R or after N bars.
Freeze tightening for N bars after a new highest high (prevents immediate snap-tightening).
Confirmation to exit: need K consecutive closes below the trail and optional structure break (EMA20 and/or last Swing-Low) before closing.
EMA30 Trail (optional): soft exit when close < EMA30.
Scale-Outs
30%: close < EMA10 and high volume.
50%: close < EMA50, bearish candle, and high volume.
PVRSA Tag
Labels Confirmed M Pivot High when a fresh local high forms on high volume with a bearish candle.
Visuals & Panel
Dotted EMA10/20/30/50, ATR bands around EMA20, optional Volume MA, optional classic pivot markers.
Info table shows EMAs, ATR, base & dynamic multipliers, bands, EMA50 angle, ADX, Early-Turn ON/OFF, whether the dynamic stop is armed, and live diagnostics (closes below / freeze).
Alerts
Buy signals, scale-outs, take-profit, PVRSA pivot, fixed stop, dynamic stop, and EMA30 trail.
Quick start
Reduce noise: Angle min 0.5–1.0°, Lookback 8–13; enable regression if still choppy.
Catch turns: Early-Turn ON; Max negative 2–3°; Improving 3–5; Price rule Close>EMA20 for earlier probes.
Stay in trends: Adaptive dyn mult ON (weak=1.8, strong=2.8, ADX len=14, ADX low=15, high=30);
Arm after 1.0R and 5 bars; Freeze=2; Closes below=2; Option-C EMA20 confirm ON, Swing-Low OFF (enable if still too tight).

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。