PROTECTED SOURCE SCRIPT
Updated

Aegis Swing Projection

145
HorizonCurve โ€” Swing Projection ๐Ÿ“ˆโœจ

Type: Overlay forward projection
Best on: Liquid markets, mid-TFs (5mโ€“4h) ๐Ÿ•’๐Ÿ’ง

What it does ๐Ÿ”ฎ

Projects a smooth future path to the right of the last candle by blending:
Drift (trend) โžœ linear-regression slope ๐Ÿ“
Swing (cycle) โžœ phase-locked sine wave ๐ŸŽ›๏ธ
Pull (mean reversion) โžœ gravity to EMA Fast ๐Ÿงฒ

Segments color by direction:

๐ŸŸข up, ๐Ÿ”ด down, ๐ŸŸ  flat
If market validity is weak, lines become dashed (shadow mode) โž– to show a low-confidence what-if path.

Built-in validation ๐Ÿ›ก๏ธ

Solid lines only if these pass:
Trend strength (EMA distance vs ATR) ๐Ÿ’ช
Close โ†” EMAfast correlation (consistency) ๐Ÿ”—
Over-extension (|Closeโˆ’EMAfast| / ATR) ๐Ÿšง

Momentum confirmation (RSI + price change aligned with trend) โšก

If any fails โžœ dashed โ€œshadowโ€ lines.

Confidence HUD (top-right) ๐Ÿง 

A tiny table shows a composite Confidence 0โ€“100:
โœ… > 80%: Green background (strong)
๐ŸŸ  51โ€“79%: Orange (moderate)
โšช < 50%: White (weak; black text for readability)
Status: Valid (solid) or Shadow (dashed).

Key Inputs โš™๏ธ

Mode: Auto / Manual (Volatile โ€ข Normal โ€ข Sideways) ๐Ÿ”€
Loopback Length (Regression): bars for drift ๐Ÿ”
Future Bars Projection: how far to project โฉ

EMA Fast / EMA Slow: trend & pull anchors ๐Ÿ“Š

Validation Gate: on/off filters ๐Ÿงฐ

Momentum Confirmation (RSI): trend alignment ๐Ÿ“ˆ

Projection Line Width: thickness ๐Ÿ“

Show EMA Lines: toggle EMAs ๐Ÿ‘€

HUD Toggle: show/hide table ๐Ÿงพ

How to read it ๐Ÿงญ

Solid ๐ŸŸข/๐Ÿ”ด/๐ŸŸ  = higher trust (filters passed)
Dashed ๐ŸŸข/๐Ÿ”ด/๐ŸŸ  = alternate scenario (filters failed)
Steep curve = strong trend/cycle combo ๐Ÿš€
Flatter curve = weak trend or stronger reversion ๐Ÿ’ค

Suggested usage ๐Ÿงฉ

Use as context/anticipation, not a standalone signal.

Combine with structure, S/R, and your risk plan ๐Ÿงฑ๐ŸŽฏ

Prefer solid for primary plan; treat dashed as contingency.

Tune Future Bars to timeframe (e.g., 20โ€“60 intraday, 10โ€“30 higher TF).

In chop, try Manual โžœ Sideways to tame amplitude ๐ŸŒŠโžก๏ธ๐ŸŒŠ

Limitations โš ๏ธ

Itโ€™s a model, not a crystal ball. News/gaps can break patterns ๐Ÿ—ž๏ธโšก

Curve doesnโ€™t repaint historically, but re-anchors each new bar to project forward ๐Ÿ”

Quick presets ๐Ÿงช

Intraday volatile (5โ€“15m): Loopback 80โ€“120, Future 30โ€“50, Volatile

Normal trend (15mโ€“1h): Loopback 80, Future 30โ€“40, Auto

Sideways: Sideways mode, Future 20โ€“30
Release Notes
minor change
Release Notes
Add :
HTF confirmation
Release Notes
What is HTF and what does it do here?

HTF (Higher Timeframe) = a timeframe higher than your current chart (e.g., youโ€™re on 15m, HTF is 1H/4H/D1).
Why use it? Because trend and momentum on higher timeframes tend to be more reliable. In this indicator, HTF is used to:

Confirm Direction

We compare EMA Fast vs EMA Slow on the HTF.

If HTF is up (EMA Fast > EMA Slow) and your local TF is also up, theyโ€™re aligned โ†’ the projection is more trustworthy.

If they disagree, itโ€™s a counter-trend situation.

Strengthen or Weaken the Projection (depending on mode)

HTF can make the projection more aggressive when aligned, or tamer when itโ€™s against the HTF bias.

Filter Signal Quality

If HTF disagrees, we switch the line to dashed (shadow) or even hide it (if you choose that mode).

This helps you avoid noise on lower timeframes.

HTF Modes (v20.2)

Filter (Solid/Dashed) (default, same behavior as before)

Only changes how the line is shown:

Aligned with HTF โ†’ solid (valid)

Against HTF โ†’ dashed (shadow)

It doesnโ€™t change the curveโ€™s shape.

Blend Drift Direction

Adjusts projection slope (the โ€œdriftโ€) based on HTF.

If aligned โ†’ boosts slope (more punch).

If against โ†’ reduces slope (flatter).

Strength controlled by HTF Weight (%).

Scale Amplitude

Adjusts the oscillation size of the projection.

If aligned โ†’ increases amplitude (bigger waves).

If against โ†’ decreases amplitude (calmer).

Hide on Disagree

If HTF disagrees, the projection is not drawn at all.

Great for traders who only want HTF-aligned scenarios.

HTF Weight (%): controls how strong modes #2 and #3 apply (0% = no effect, 100% = max effect).

Why โ€œchanging HTFโ€ sometimes looks like nothing happens?

Common reasons:

Youโ€™re still on Filter (Solid/Dashed) mode and HTF happens to be aligned most of the time โ†’ the curve looks the same; only the status (solid vs dashed) would change.

useHTFConfirm is OFF โ†’ HTF is ignored.

HTF equals your chartโ€™s TF (e.g., chart 1H, HTF 1H) โ†’ nearly identical bias.

HTF EMAs (50/200) are slow; in choppy/flat markets, the HTF bias hardly changes โ†’ effect is subtle.

How to make the effect obvious:

Choose HTF = 240 (4H) or D (Daily) when trading 5mโ€“30m.

Use HTF Mode = Blend Drift Direction or Scale Amplitude.

Increase HTF Weight to 60โ€“80%.

HTF Strength Meter & HUD

HTF Strength % measures how strong the HTF trend is: based on |EMA Fast โˆ’ EMA Slow| / ATR (HTF), smoothed and scaled 0โ€“100.

< 50% โ†’ white text (weak)

51โ€“79% โ†’ orange (moderate)

โ‰ฅ 80% โ†’ green (strong)

HUD Row 1 (Conf): Overall model confidence (trend/slope/volatility mix).

HUD Row 2 (HTF): HTF Up/Down + Strength %.

Quick presets (so you can feel it right away)

Scalping 5โ€“15m

HTF = 240 (4H), HTF Mode = Blend Drift Direction, HTF Weight = 70%.

Projection gets more assertive when 4H aligns; flattens when it doesnโ€™t.

Intraday 15โ€“60m

HTF = D (1D), HTF Mode = Scale Amplitude, HTF Weight = 60%.

Oscillation grows with daily alignment; shrinks against it.

Swing 4Hโ€“1D

HTF = W (Weekly), HTF Mode = Hide on Disagree.

Only draw when the weekly bias agrees.

TL;DR

HTF = the โ€œbig pictureโ€ guardrail.

It can tag signals (solid/dashed), shape the curve (slope/amp), or suppress the projection when counter-trend.

Use HTF Mode + HTF Weight to control how much the projection respects the higher timeframe.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.