MACD Advanced [CongTrader]Title:
MACD Advanced – Enhanced Trend & Momentum Analysis
Short Description (Displayed on Chart)
MACD Advanced [CongTrader is an enhanced version of the traditional MACD, combining gradient histogram, multi-layer EMA, and smart markers to identify trend and momentum more accurately. Supports bullish/bearish crossover alerts in line with trend, helping traders seize opportunities quickly.
Detailed Description (SEO-friendly, professional)
MACD Advanced is designed for traders who want to:
Track market momentum through slope and gradient of the MACD.
Identify short-term and long-term trends using EMA 50 & EMA 200.
Receive visual trading signals with bullish/bearish markers directly on the chart.
Set intelligent alerts when MACD aligns with the trend, ensuring no opportunities are missed.
Key Features:
MACD Slope: measures the rate of MACD change to identify strong or weak momentum.
Gradient Histogram: colors change according to momentum → easy to see increasing/decreasing strength.
Multi-layer EMA: EMA 50 (short-term trend) & EMA 200 (long-term trend) → reduces noise.
Smart Markers: up/down triangles display crossover points + color indicates momentum.
Built-in Alerts: triggers when bullish/bearish signals confirm trend alignment.
How to Use
Setup:
Paste the code into Pine Editor → click “Add to Chart”.
Adjust input parameters:
Fast EMA / Slow EMA / Signal Line Length → MACD sensitivity.
Short-term EMA / Long-term EMA → trend confirmation.
Toggle EMA Trend Filter, histogram, and markers as needed.
Reading Signals:
Bullish Signal: MACD line crosses above signal line + positive slope + price above EMAs → consider buying.
Bearish Signal: MACD line crosses below signal line + negative slope + price below EMAs → consider selling.
Dark green histogram → strong upward momentum; dark red → strong downward momentum.
Markers on chart indicate crossovers → combine with EMA trend for confirmation.
Advanced Tips:
Use multiple timeframes to confirm trends.
EMA filters help reduce false signals in sideways markets.
Disclaimer
⚠️ Disclaimer:
This indicator is for educational and technical analysis purposes only. It **does not constitute financial advice** and does not guarantee profit.
Any trading decisions made based on this indicator are the sole responsibility of the user. Always apply proper risk management.
Acknowledgment
Thank you for using MACD Advanced [CongTrader! Wishing you safe and successful trading. Feedback and improvement suggestions are welcome on TradingView
MACD, MACD Advanced, MACD Histogram, MACD Trend, EMA Filter, Momentum, Technical Analysis, Trading, CT Style, Alerts
指标和策略
RonaldoCalculates ATR (Average True Range): Measures market volatility over a customizable period (default: 10). A higher ATR means more volatility. Calculates the Supertrend: Combines ATR with a multiplier (default: 3)
Premarket High/Low (4:00–9:30 AM)This indicator allows me to visualize the full range in which the price moved during the pre-market session, providing a bearish confirmation when the low is broken and a bullish confirmation when the high is breached.
Williams Percent Range + MAA modernized take on the classic Williams %R oscillator — enhanced with a configurable moving average (SMA, EMA, RMA, WMA, HMA, or KAMA) for trend confirmation. Overbought and oversold zones are fully adjustable, and background highlights appear when momentum shifts: green for bullish crosses in oversold areas, red for bearish crosses in overbought zones.
cd_sfp_CxGeneral:
This indicator is designed to assist users who trade the Swing Failure Pattern ( SFP ).
In technical literature (various definitions exist), an SFP is a situation where the price violates a previous swing level but fails to close beyond that level.
• (Liquidity Sweep)
• (Buyer or seller dominance)
• (Stop hunt)
• (Turtle Soup)
The general strategy is built upon seeking trade opportunities after an SFP is formed and conviction is established that the market direction has changed.
Components used to gather confirmation:
• Determining Bias: Periodic SAR
• Obtaining Breakout/Reversal Confirmation: Change in State Delivery (CISD)
• Defining the Buyer/Seller Block (Supply/Demand Zones): Mitg Blocks (Mitigation Blocks), FVG (Fair Value Gaps), and Standard Deviation Projection
• Key Levels: Previous HTF (Higher Time Frame) levels
• Setting Targets: Standard Deviation Projection
• Trade Management: Anchored VWAP and opposing blocks
• Time-Based Context: Session Killzone times
• Notifications: An alarm/alert system will be utilized to stay informed.
________________________________________
Details:
Swing and Swing Failure Pattern:
Swing Sweep Types (Liquidity Sweep):
1. Single
2. Consecutive (The liquidity of the entity that swept the liquidity is being swept)
Bias Determination
We need to filter out the numerous SFPs that occur across all time frames. Our first strong filter will be the Bias. We will only look for trades aligned with our bias.
We will use Periodic SAR (Stop and Reverse) to determine the bias. We compare the price with the SAR value from a Higher Time Frame than the one we are trading on.
• Price > SAR => Bullish Bias
• Price < SAR => Bearish Bias
Depending on the pair, H1 SAR may be chosen for scalp trades, and Daily/Weekly SAR for intraday and swing trades.
Key Levels
Strategies looking for trades after a liquidity grab generally state that the sweep / stop hunt movement should occur at a significant price level.
The most fundamental Key Level levels are (User can customize):
• Previous Week High & Low
• Previous Day High & Low
• Previous H4 High & Low
• Previous H1 High & Low
• Asia Killzone High & Low
• London Killzone High & Low
• New York Killzone High & Low
• Monday Range High & Low values
We will prefer SFP formations that occur when these levels are swept. When Key Levels are violated, an information label appears on the screen.
Blocks / Zones
To strengthen our hand, we will use three types of blocks/zones, either with Key Levels or separately. When an SFP structure is formed in these areas (along with bias and breakout confirmation), our expectation is for the price to continue in our desired direction. These regions are:
1. Mitigation Blocks (Mtg)
o (Details can be found in the cd_VWAP_mtg_Cx indicator)
o In short: A second candle, following a bullish candle, crosses its high but fails to close above it. We call this a sweep / SFP. When the price, which was expected to go to the low, instead makes a new high/close, an Mtg block is formed. (Buyers are dominant)
2. FVGs (Fair Value Gaps)
o We use classic FVG structures.
3. Standard Deviation Projection Boxes
o When we get an SFP structure + breakout confirmation (CISD), we use the Standard Deviation Projection to determine our profit-taking and take-profit levels.
o Based on the idea that the price often respects the range between -2 and -2.5 of the projection values, we box this range and use it as our area of interest. (Our expectation is for the price to reverse after reaching this target).
o Let's mark it on the chart.
Confirmation
To summarize what has been explained so far: we look for the price to form an SFP structure in levels/zones we deem important, aligned with our bias, and for the breakout to be confirmed with a CISD.
No single component is strong on its own, but the success rate increases when they occur together.
We observe the following as additional confirmation along with the CISD: a new Mtg block forming in the direction of the breakout, high-volume movement (with FVG and a large body), and respect for VWAPs, the resistance/support line, and the defense block.
Additional Confirmations with Breakouts:
• Defence block, new mtg and VWAP
• Resistance / Support Line:
Indicator Signals
The indicator marks all formed sweeps, selected key levels, blocks, the projection, and CISD confirmations on the screen. The candle where the CISD confirmation occurs is indicated by an arrow.
• Arrows with double short lines signify a CISD that follows an SFP occurring at a Key Level.
• All other CISD candle indications are shown with single-line arrows.
Trade Management
When selecting profit targets in trades (preferably), the projection, opposing blocks, and structures that have formed are taken into account. Do not neglect to look at the structures that have formed against you when entering a trade.
Menu Settings:
• For Mtg blocks, the trading timeframe or a higher timeframe can be selected.
• FVGs formed in the current timeframe are displayed when the price creates an SFP (in "Fvg" option).
• Deviation boxes are displayed when the price creates an SFP (in box).
• The SAR HTF setting (H1) for scalp trades may vary depending on the pair. Users trying trades on higher timeframes should increase the HTF setting.
o Example: If you are looking for a trade with an SFP structure on H1, the SAR HTF setting should be H4 or higher.
• VWAP lines are refreshed starting from the candle that executed the sweep when the price forms an SFP. The only setting to adjust is the source selection setting (hlc3 is selected).
• Time frames and Killzone / Special Zone settings for Key Levels can be changed/should be checked.
Alarms / Alerts:
The conditions that will trigger an alert can be selected from the menu.
• To receive an alert aligned with the bias, the "Alignment with bias" checkbox must be selected.
• The alert should be set on the timeframe where you plan to enter the trade.
• The display options do not affect the alarm conditions. (Example: FVGs are monitored even when the menu selection is "off").
• If the necessary conditions are met, the alarm is triggered on the new candle that opens after the CISD confirmation.
• The alarm will not be triggered more than once at the same Key Level.
The user can preferably select alerts:
• Bias-aligned or Bias-independent
• Sweep (without waiting for CISD)
• Sweep + CISD (without looking for other conditions)
• Sweep + Key Level + CISD (the swept level is a Key Level)
• Sweep + Mtg / Fvg / Dev. + CISD (SFP formed in any of the blocks)
• Sweep + Mtg + CISD (SFP formed in the Mtg block)
• Sweep + Fvg + CISD (SFP formed inside the FVG)
• Sweep + Deviation Box + CISD (SFP formed inside the Dev. Box)
• Sweep + Key Level + Mtg / Fvg / Dev. + CISD (SFP formed simultaneously at a Key Level and any of the blocks)
Trade Example:
• Conditions: Bias-aligned + Sweep + Mtg/Fvg/Dev (at least one) + CISD
• Extra Confirmations: Respect for the Defense Block + Respect for VWAP
• Target (TP): Projection between -2 and -2.5
I welcome your thoughts and suggestions regarding my indicator, which I believe will be successful in the long run by adhering to uncompromising risk management and a strict trading plan.
Happy Trading!
Time Based LiquidityTime Based Liquidity + Key Opens. Plots the High and Low of Monthly - Weekly - Daily - Asia - London. Key Opens - Monthly Open - Weekly Open - Midnight Open - Cycle Open - 9:30 Open.
JonnyFutures ScalpomaticThis indicator combines Fair Value Gap (FVG) detection with Exponential Moving Average (EMA) signals to help identify potential trade entry points based on market inefficiencies and trend direction.
⚙️ Main Components
1. EMAs
Two EMAs are calculated:
EMA 20 (short-term trend)
EMA 50 (medium-term trend)
ema20 = ta.ema(close, len20)
ema50 = ta.ema(close, len50)
These are plotted on the chart:
Orange line = EMA 20
Purple line = EMA 50
2. Fair Value Gaps (FVGs)
The script looks for gaps in price structure (imbalances):
Bullish FVG → when the high from two bars ago is less than the current bar’s low
→ Indicates a potential bullish inefficiency.
Bearish FVG → when the low from two bars ago is greater than the current bar’s high
→ Indicates a potential bearish inefficiency.
bullishFVG = high < low
bearishFVG = low > high
When found, the background color changes:
Light Green for bullish FVGs
Light Red for bearish FVGs
bgcolor(bullishFVG ? color.new(color.green,90) : na)
bgcolor(bearishFVG ? color.new(color.red,90) : na)
3. EMA Crossover Signals
The script plots visual buy/sell markers when the closing price crosses above or below each EMA:
For EMA 20:
✅ Long signal (triangle up, lime): close crosses above EMA 20
❌ Short signal (triangle down, red): close crosses below EMA 20
For EMA 50:
✅ Long signal (triangle up, aqua): close crosses above EMA 50
❌ Short signal (triangle down, maroon): close crosses below EMA 50
These signals help identify potential trend-following entries or exits.
📈 How to Use It
Trend Confirmation:
Watch the EMAs — if EMA20 > EMA50, the trend is generally bullish; if EMA20 < EMA50, it’s bearish.
FVG Zones:
When a bullish or bearish FVG appears, it highlights potential retracement zones where price may rebalance before continuing the trend.
Entry Timing:
Combine FVGs with EMA cross signals for confluence:
Long bias → bullish FVG + price crossing above EMA 20 or 50.
Short bias → bearish FVG + price crossing below EMA 20 or 50.
🎯 Summary
This indicator:
Detects Fair Value Gaps and shades them visually.
Plots EMA 20 and EMA 50 to define short- and mid-term trends.
Marks entry/exit signals when price crosses these EMAs.
Is designed for trend-following trades with FVG confirmation
MSB Trend Breakout Indicator**MSB Trend Breakout Indicator: The Low-Risk Trend Catcher**
This indicator is built on a proprietary system designed to identify and confirm high-momentum price breakouts within the prevailing market trend.
**What It Does:**
* **Confirms Trend Bias:** Uses a customized Moving Average filter to determine the direction of institutional flow (Long or Short).
* **Identifies Entry Momentum:** Plots signals only when price breaks a calculated short-term support/resistance level, confirming strong directional momentum.
* **Filters Noise:** Excludes signals during market chop or counter-trend movement, focusing on higher probability setups.
**Optimized For:** XAUUSD (Gold) on 15m/30m charts.
---
**Important Note & Risk Disclosure:**
The underlying logic is designed to optimize risk management. This tool is for informational and educational use only. Past performance is not indicative of future results, and this indicator does not guarantee profits. Please use appropriate risk tolerance when trading.
Ripping & Dipping ReversalsUses a ribbon of emas from 987 to 8. When all emas align from highest to lowest in either direction we have "Ripping" or "Dipping." If ripping or dipping end AND there have been a set number of rip/dip ends since the last crossover of the 987, a trade is indicated.
TREND - Clean WaveTrend oscillator. Displays WT1 (blue), WT2 (orange), momentum histogram, and key levels (58/51/-51/-58). Includes table with current state (overbought/oversold/neutral) and trend. Ideal for confirming momentum on any asset and timeframe.
Bitcoin 50-Week MA “Cycle Line” — Bull/Bear RegimeOverview. This indicator plots the true 50-week simple moving average (SMA) on any timeframe by requesting weekly data, then colors the chart to show a bull/bear regime: green when price is above the 50-week MA, red when below. Many Bitcoin analysts treat this average as a cycle “line in the sand”—multiple weekly closes below it have historically coincided with the end of bull phases and the start of broader drawdowns, while holding above has aligned with continued strength.
Why it matters. Recently, research notes and market commentary have flagged the 50-week MA near ~$100k–$103k (feed-dependent) as a critical support/resistance area to watch. Use this tool to track that threshold on your own exchange feed and timeframe.
How it works.
Pulls weekly closes via request.security() and computes a 50-week SMA (not an EMA).
Plots the line on your current chart and applies a regime color (background or candles, toggle in settings).
Works on any symbol; optimized for BTC spot and futures.
Notes.
MA values vary by data source/exchange; confirm on a weekly chart if needed.
A single intrawEEK break can whipsaw; many analysts look for confirmed weekly closes. Pair with your macro/liquidity view and risk rules.
SMACD / MACD Screener with diffsTo find stocks certain values of SMACD, for instance SMACD crosses up through signal line when below of 0-line.
Stochastic + Bollinger Bands Multi-Timeframe StrategyThis strategy fuses the Stochastic Oscillator from the 4-hour timeframe with Bollinger Bands from the 1-hour timeframe, operating on a 10-hour chart to capture a unique volatility rhythm and temporal alignment discovered through observational alpha.
By blending momentum confirmation from the higher timeframe with short-term volatility extremes, the strategy leverages what some traders refer to as “rotating volatility” — a phenomenon where multi-timeframe oscillations sync to reveal hidden trade opportunities.
🧠 Strategy Logic
✅ Long Entry Condition:
Stochastic on the 4H timeframe:
%K crosses above %D
Both %K and %D are below 20 (oversold zone)
Bollinger Bands on the 1H timeframe:
Price crosses above the lower Bollinger Band, indicating a potential reversal
→ A long trade is opened when both momentum recovery and volatility reversion align.
✅ Long Exit Condition:
Stochastic on the 4H:
%K crosses below %D
Both %K and %D are above 80 (overbought zone)
Bollinger Bands on the 1H:
Price reaches or exceeds the upper Bollinger Band, suggesting exhaustion
→ The long trade is closed when either signal suggests a potential reversal or overextension.
🧬 Temporal Structure & Alpha
This strategy is deployed on a 10-hour chart — a non-standard timeframe that may align more effectively with multi-timeframe mean reversion dynamics.
This subtle adjustment exploits what some traders identify as “temporal drift” — the desynchronization of volatility across timeframes that creates hidden rhythm in price action.
→ For example, Stochastic on 4H (lookback 17) and Bollinger Bands on 1H (lookback 20) may periodically sync around 10H intervals, offering unique alpha windows.
📊 Indicator Components
🔹 Stochastic Oscillator (4H, Length 17)
Detects momentum reversals using %K and %D crossovers
Helps define overbought/oversold zones from a mid-term view
🔹 Bollinger Bands (1H, Length 20, ±2 StdDev)
Measures price volatility using standard deviation around a moving average
Entry occurs near lower band (support), exits near upper band (resistance)
🔹 Multi-Timeframe Logic
Uses request.security() to safely reference 4H and 1H indicators from a 10H chart
Avoids repainting by using closed higher-timeframe candles only
📈 Visualization
A plot selector input allows toggling between:
Stochastic Plot (%K & %D, with overbought/oversold levels)
Bollinger Bands Plot (Upper, Basis, Lower from 1H data)
This helps users visually confirm entry/exit triggers in real time.
🛠 Customization
Fully configurable Stochastic and BB settings
Timeframes are independently adjustable
Strategy settings like position sizing, slippage, and commission are editable
⚠️ Disclaimer
This strategy is intended for educational and informational purposes only.
It does not constitute financial advice or a recommendation to buy or sell any asset.
Market conditions vary, and past performance does not guarantee future results.
Always test any trading strategy in a simulated environment and consult a licensed financial advisor before making real-world investment decisions.
SMACD / MACD Screener with diffsTo create Pine screener with values for SMACD. Screen for example after crosses up for SMACD through signal when below 0-line.
Gold-Silver Ratio (GSR) ComparatorThis is a simple GSR comparator script. You can adjust the SMA and the various inputs, or use the default spot Gold/Silver.
ATR Trend & Chop Dashboard (Overlay)# ATR Trend & Chop Dashboard (Overlay)
**Version:** 3
**Script Type:** Overlay (Dashboard)
**Pine Script Version:** v6
---
## SUMMARY
The ATR Trend & Chop Dashboard identifies volatility regimes and directional bias directly on the active chart. It combines ATR expansion and contraction behavior with EMA slope detection to help traders determine whether the market is trending, neutral, or choppy.
This version is designed for clarity and precision, with background colors disabled by default for clean chart visibility. A live dashboard displays the current state, ATR values, and ratio data in real time.
---
## FUNCTION
The indicator measures volatility and direction using two main components:
1. **ATR Regime Detection**
Calculates the ratio between the current ATR and its smoothed average (SMA of ATR).
- When the ATR expands beyond the upper threshold, volatility is considered trending.
- When it contracts below the lower threshold, the market is entering compression or chop.
2. **Directional Filter (EMA Slope)**
Measures the slope of a 50-period EMA across a short lookback window to confirm meaningful directional bias.
The ATR regime is validated only when the EMA slope supports trend direction.
3. **Classification**
- **TREND:** ATR expanded and EMA showing directional slope.
- **CHOP:** ATR suppressed and EMA showing minimal slope.
- **NEUTRAL:** Conditions between those thresholds.
---
## LOGIC
| Condition | Description |
|------------|-------------|
| TREND | Volatility expanded and direction confirmed by EMA slope. |
| CHOP | Volatility compressed with no strong directional structure. |
| NEUTRAL | Transitional condition near baseline ratio. |
The script dynamically adapts across instruments and timeframes.
---
## INPUTS
**Core Settings**
- ATR timeframe (default: 5-minute, adjustable to any timeframe).
- ATR length and smoothing period (SMA length).
- Trend threshold (ratio above/below 1.0).
**Directional Filter**
- EMA length (default: 50).
- Slope lookback (default: 3 bars).
- Minimum EMA slope as a fraction of ATR (default: 0.05).
**Visual Options**
- Show background colors (off by default).
- Dashboard position (Top Left, Top Right, Bottom Left, Bottom Right).
- Show status label (optional on-chart tag with current ATR timeframe and state).
---
## HOW TO USE
1. Apply the indicator to the timeframe where you plan to analyze entries and exits.
The default ATR timeframe is **5-minute**, but it can be changed in settings to match your preferred analysis timeframe.
2. Use the dashboard and background color states as environmental filters:
- TREND = Favor continuation or breakout strategies.
- CHOP = Favor mean reversion or avoid overtrading.
- NEUTRAL = Transition zone; remain patient or reduce size.
3. Combine the dashboard signals with VWAP, EMA crossovers, or ORB range tools for confirmation and higher confluence.
---
## ALERTS
The following alerts are available for automation or visual triggers:
- ATR TREND Regime
- ATR CHOP Regime
- ATR NEUTRAL Regime
Each alert provides clear notification when volatility or structure changes.
---
## COMPLIANCE NOTES
- Background colors are disabled by default to maintain chart readability.
- Default ATR timeframe is **5-minute**, but this value can be modified in the inputs menu.
- The script’s logic is original and built specifically to merge ATR-driven volatility structure with directional slope context in a single overlay.
- Description provided here meets TradingView’s publication rules for clarity, purpose, originality, and instructional detail.
---
SMACD Screener Table (fixed)Attemt to get a table with SMACD-values for filtering on for instance; value crossing (or close) signal and is below 0-line.
Moyennes Mobiles PersonnaliséesThis script simply combines the moving averages I use most frequently in my market analysis: EMA 13 and 21, along with SMA 50 and 200.
The goal is to gather all of these essential indicators into a single tool, avoiding the need to load multiple separate scripts and keeping the chart clean and efficient.
There’s no complex logic or advanced functionality here — the script’s purpose is purely to display these moving averages in a convenient, streamlined way. I’m providing a more detailed description primarily to meet TradingView’s publication requirements, which ask for a minimum amount of explanatory text before an indicator can be published.
Gap Zones - Daily & Intraday (v9)Gap Zones (wick-fill, custom colors, hide filled)
What’s new
• Wick-based gap fills
• A gap is now considered filled as soon as the price wick touches the far edge of the gap.
• Gap up → filled when low ≤ lower edge.
• Gap down → filled when high ≥ upper edge.
• Custom colors & transparency
• New inputs:
• Gap Up Color
• Gap Down Color
• Gap Fill Transparency
• Lets you style bullish / bearish gaps and adjust how strong the zones appear on the chart.
• Hide filled gaps (optional)
• New toggle: Hide Gaps Once Filled.
• When ON, lines and fills are deleted as soon as the gap is filled.
• When OFF, gaps stop extending and are faded out (colors set to na).
• Daily + Intraday modes preserved
• Gap Mode still supports both:
• "Daily" → gaps between daily candles (using higher-timeframe data).
• "Intraday Bars" → gaps between consecutive intraday bars.
Stability / bug fixes
• Fixed all line.new() and label.new() syntax issues by keeping function calls on a single line.
• Added a safety guard so the script doesn’t try to read from empty arrays on the first bar (if count > 0).
• Cleaned up the gap detection logic so there are no ta.change() warnings.
On-Chart Buy, Sell, Caution, Resume Indicator## What this script does
**On-Chart BUY, SELL, RESUME & CAUTION (EMA 9/20 + MACD)** marks key decision points directly on your candles using a simple, transparent rule set:
This tool is designed to be used on the **timeframe where you actually plan your entries and exits.**
- **BUY** – Bullish EMA crossover (EMA 9 crossing above EMA 20).
- **SELL** – Bearish EMA crossover (EMA 9 crossing below EMA 20).
- **CAUTION** – Trend still intact, but MACD turns against it.
- **RESUME** – MACD turns back in favor of the trend after CAUTION.
All signals are based on **EMA 9/20 trend structure** and the **MACD line vs signal** relationship on the **current chart timeframe**.
The visual layout (circles + thin connectors) is ATR-based, so labels stay clean above wicks and EMAs without covering price action.
---
## Very important: timeframe usage
This tool is designed to be used on the **timeframe where you actually plan your entries and exits.**
- Every signal is calculated from the **current chart timeframe**:
- A BUY on the 1-minute chart is **not** the same signal as a BUY on the 5-minute or 15-minute chart.
- If you change timeframe, the historical signals will change accordingly, because the EMAs and MACD are different.
- Recommended usage:
- Choose your execution/decision timeframe (e.g., 1m, 3m, 5m, 15m, etc.).
- Apply this indicator there.
- Use higher timeframes with your own tools (or your MTF dashboard) for context, **not** by stacking multiple versions of this script.
This clarification is intentional to avoid confusion: it is **not** a multi-timeframe signal engine. It is a clean on-chart signaling layer for the timeframe you trade.
---
## Signal logic
1. **Trend backbone: EMA 9 vs EMA 20**
- `EMA 9 > EMA 20` → bullish structure.
- `EMA 9 < EMA 20` → bearish structure.
2. **BUY / SELL**
- **BUY**: A confirmed crossover of EMA 9 above EMA 20.
- **SELL**: A confirmed crossunder of EMA 9 below EMA 20.
- Optional setting `Wait for candle close` controls whether signals only print on confirmed bars (non-repainting) or can appear intrabar.
3. **CAUTION**
- When trend and MACD temporarily disagree:
- Bull trend (EMA 9 > EMA 20) but **MACD crosses down** → CAUTION for longs.
- Bear trend (EMA 9 < EMA 20) but **MACD crosses up** → CAUTION for shorts.
- CAUTION means: “Trend is still in place, but momentum just fired a warning.”
4. **RESUME**
- After a CAUTION, if MACD crosses back in favor of the prevailing trend:
- In a bull trend after CAUTION → **RESUME** (green).
- In a bear trend after CAUTION → **RESUME** (red).
- This marks a potential continuation after a pause, not a brand-new crossover.
5. **Visual design**
- EMAs can be shown or hidden.
- Signals are drawn **above** price and EMAs using ATR-based spacing:
- Thin vertical connector (optional)
- Arrow
- Circle with the text: BUY, SELL, CAUTION, or RESUME
- This keeps the price area uncluttered and makes each event easy to see.
6. **Alerts**
- Each event type has its own `alertcondition` with a structured message,
allowing integration with webhooks, bots, or external tools.
---
## Originality & compliance notes
- The script is a **single, coherent tool**:
- It implements a clear 4-state model (BUY / SELL / CAUTION / RESUME) from EMA 9/20 + MACD.
- It includes explicit CAUTION and RESUME behavior, which goes beyond a basic crossover indicator.
- Visual placement is calculated (ATR-based) to be usable in live trading.
- All logic is visible and explained; this is not a closed, black-box mashup.
- For publishing:
- Use a **clean chart** for the public example:
- Candles + this indicator (and only minimal extras if needed to illustrate usage).
- Title is ASCII only and the description explains:
- What it does,
- How it works,
- How and where it should be used,
- Why it produces different signals on different timeframes.
ICT Smart Money - PremiumCME_MINI:NQ1!
✅ Detecting FVG boxes (green/red) for A+ setups
✅ When price taps back into the FVG, it triggers an entry
✅ Shows the position boxes (green profit zone, red SL zone)
✅ Calculates SL (25-35 points auto or fixed)
✅ Sets TP1, TP2, TP3 based on liquidity levels (swing highs/lows)
✅ Shows labels with entry price, SL in points, and TP levels with R:R
MTF Traffic Lights## What this script does
**MTF Traffic Lights (4H / 1H / 15m / 5m / 3m / 1m) - Realtime ** is a compact multi-timeframe dashboard that shows, in one glance, whether each timeframe is:
- Bullish (green),
- Bearish (red),
- Or in disagreement / transition (yellow),
based on a consistent combination of **EMA 9/20 trend** and optional **MACD confirmation**.
The goal is to replace cluttered stacks of indicators with one clear “traffic light” panel that updates live and is easy to interpret.
---
## Core Logic
For each timeframe (4H, 1H, 15m, 5m, 3m, 1m):
1. **Trend via EMA 9/20**
- Fast EMA (default 9) vs Slow EMA (default 20).
- `EMA fast > EMA slow` → bullish structure on that timeframe.
- `EMA fast < EMA slow` → bearish structure.
2. **Momentum via MACD (optional)**
- Standard MACD (12, 26, 9 by default).
- Uses the MACD histogram sign as a confirmation filter.
3. **Traffic-light state**
- If **MACD filter ON**:
- **Green**: EMA bullish **and** MACD histogram ≥ 0.
- **Red**: EMA bearish **and** MACD histogram ≤ 0.
- **Yellow**: EMA and MACD do not agree → caution / transition.
- If **MACD filter OFF**:
- **Green**: EMA bullish.
- **Red**: EMA bearish.
- **Yellow**: EMAs essentially flat/indecisive.
4. **Realtime MTF behavior**
- Uses `request.security()` per timeframe.
- The **Intrabar HTF (LIVE)** option:
- When disabled (default): values are based on **confirmed closes** (no repaint).
- When enabled: higher timeframe values update intrabar using lookahead-on, so you can see evolving conditions; this is intentionally labeled as **repainting** behavior.
5. **Display**
- A fixed table in the top-right corner:
- Left column: timeframe labels (4H, 1H, 15m, 5m, 3m, 1m).
- Right column: a colored dot representing that timeframe’s current state.
No additional plots, shapes, or unrelated indicators are required.
---
## How to Use It
- Read the table **top to bottom** as a quick MTF alignment check:
- Mostly green → aligned bullish conditions across timeframes.
- Mostly red → aligned bearish conditions.
- Mixed / yellow → conflicting signals; consider standing down or zooming in.
- Combine with your own entries:
- Use it as a regime/confirmation layer for trend-following, ORB, or scalping systems.
- Filter trades to those aligned with higher timeframe conditions.
- Adjust inputs as needed:
- Change EMA or MACD parameters if your system uses different values.
- Toggle MACD filter off if you only want pure EMA 9/20 structure.
---
## Originality & Compliance Notes
- This script is a **single, focused tool**:
- A structured MTF state engine using consistent EMA + MACD logic.
- Presented as a compact table instead of multiple stacked indicators.
- It does **not** simply clone an existing open-source script one-to-one.
- The description explains:
- What each color means,
- How the calculations work,
- The effect of the LIVE/repaint option.
For publishing:
- Use a **clean chart** in the published example:
- Candles + this dashboard (and only essential elements) so its output is clear.
- Title uses standard ASCII characters, as required by the House Rules.






















