PROTECTED SOURCE SCRIPT
تم تحديثه ATR-EMA Trend Trader (Adaptive) v2

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).
ملاحظات الأخبار
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. اقرأ المزيد في شروط الاستخدام.
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. ومع ذلك، يمكنك استخدامه بحرية ودون أي قيود - تعرف على المزيد هنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.