OPEN-SOURCE SCRIPT

Multi Timeframe Scalper Structure

80
What It Does
This indicator generates trend-filtered scalping entries by requiring three independent layers of confirmation before any signal appears. A higher-timeframe trend filter sets the allowed direction. Two separate EMA structure zones on the micro timeframe must both confirm momentum alignment. Only when all three agree does an entry dot print on the chart.

It also includes a real-time signal matrix table that shows which conditions are currently met, an on-chart TP/SL line system for quick risk-reward visualization, and configurable alerts.

How It Works
The indicator operates on two timeframe layers:

Macro layer — A moving average (selectable: EMA, SMA, WMA, or VWMA) is calculated on a higher timeframe you choose (default: 4H). If the closing price on that timeframe is above the MA, the macro trend is bullish. If below, bearish. This acts as a directional gate — no signal can fire against it. The chart background tints green or red to reflect this bias.

Micro layer — Two pairs of EMAs run on the chart timeframe (or a custom micro timeframe), each forming a colored filled zone:

Structure 2 (default periods: 16 and 30) — the wider zone. When its fast EMA is above its slow EMA, the zone fills green, confirming bullish intermediate momentum. Below fills red.
Structure 1 (default periods: 8 and 16) — the tighter zone, used for precise entry timing. A crossover of its fast EMA above the slow EMA is the trigger event for a long entry. A crossunder triggers a short entry.
Entry conditions:

A long entry dot appears when:

The macro layer is bullish (price above the higher-TF MA)
Structure 2 is bullish (fast above slow)
Structure 1 crosses bullish (fast crosses above slow)
A short entry dot appears under the mirror conditions — macro bearish, both structures bearish, Structure 1 crosses down.
スナップショット
Early reversal detection (optional) — When enabled, the indicator can also trigger a signal when Structure 2 flips from bearish to bullish (or vice versa), allowing entry before Structure 1 has crossed, as long as the macro confirms. This captures momentum shifts earlier.

Non-repainting — All higher-timeframe data uses lookahead_off. The "Wait for Candle Close" option (on by default) ensures signals only appear after the candle is fully confirmed.

How the Components Interact
The macro layer decides which direction you are allowed to trade — it is the filter. Structure 2 confirms that intermediate momentum on the chart timeframe has already shifted in that same direction — it is the confirmation. Structure 1 provides the exact timing — its crossover is the trigger that places the entry dot. Each layer serves a distinct purpose: direction, confirmation, and timing. A signal must pass through all three before it appears, which is what reduces noise compared to a single crossover system.

When early reversal detection is active, Structure 2 can also serve as an alternative trigger (its color flip), but only while the macro still confirms. This creates two possible trigger paths under the same directional filter.

How to Use It
Set your macro timeframe meaningfully above your chart timeframe. If you scalp on the 5-minute chart, a 1-hour or 4-hour macro works well. On the 1-minute, try 15 minutes or 1 hour.

The background color tells you the macro bias instantly — green for bullish, red for bearish.
スナップショット
Watch the two filled zones on your chart. When both turn green (or both red) and align with the background color, conditions are building toward a signal.

Entry dots appear at the bottom of the chart for longs (green) and at the top for shorts (red).

The signal matrix table (movable to any corner) shows real-time status of each layer: Macro Trend, Structure 2, Structure 1, and the combined result — LONG, SHORT, or WAIT.

Use the TP/SL tool to project take-profit and stop-loss lines on the chart. Set the direction (Long or Short), optionally enter a manual entry price, and configure your percentages. Up to two partial TP levels can be displayed alongside the main TP.

Set alerts using the built-in alert conditions ("LONG Signal" or "SHORT Signal") to be notified when a confirmed entry fires.

Key Features
Three-layer hierarchical filtering architecture: Each layer has a distinct role — directional gating (macro), momentum confirmation (Structure 2), and entry timing (Structure 1) — and all three must agree simultaneously. This multi-layer approach reduces noise compared to single crossover systems.

Dual EMA structure zones: Two independent pairs of EMAs operating at different speeds provide both intermediate momentum confirmation and precise entry timing under a separate higher-timeframe umbrella.

Early reversal detection: Optional second trigger path that reads when the wider Structure 2 zone changes polarity, allowing entries at the point where intermediate momentum shifts.

Real-time signal matrix: Dashboard view showing which conditions are satisfied in real time, turning the indicator into a structured workflow rather than just a dot generator.

Integrated TP/SL system: On-chart trade management with optional partial targets keeps risk management visible without needing a separate tool.

Non-repainting design: All signals are confirmed and use proper lookahead settings to ensure historical accuracy matches real-time behavior.

Suitability
Markets: Any liquid market — forex pairs, crypto, stock indices, commodities, equities.

Timeframes: Designed for lower chart timeframes (1m, 3m, 5m, 15m) with the macro set higher (1H, 4H). Can also be adapted for intraday swing setups using 15m–1H charts with a daily macro.

Trading style: Trend-following momentum scalping — taking quick entries in the direction of the dominant trend when short-term momentum confirms the higher-timeframe bias. Entries target short directional bursts within established trends, not reversals or range-bound conditions. The built-in candle-close confirmation and the three-layer filter are designed for disciplined, fast-execution scalping where you enter with momentum and exit at predefined percentage targets.

Disclaimer
This indicator is a technical analysis tool, not financial advice. It does not guarantee profits and does not predict future price movements. No indicator can eliminate risk. Past behavior of signals does not ensure future results. Always use proper risk management and assess your own financial situation before entering any trade.

免責事項

この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。