US30 Quarter Levels (125-point grid) by FxMogul🟦 US30 Quarter Levels — Trade the Index Like the Banks
Discover the Dow’s hidden rhythm.
This indicator reveals the institutional quarter levels that govern US30 — spaced every 125 points, e.g. 45125, 45250, 45375, 45500, 45625, 45750, 45875, 46000, and so on.
These are the liquidity magnets and reaction zones where smart money executes — now visualized directly on your chart.
💼 Why You Need It
See institutional precision: The Dow respects 125-point cycles — this tool exposes them.
Catch reversals before retail sees them: Every impulse and retracement begins at one of these zones.
Build confluence instantly: Perfectly aligns with your FVGs, OBs, and session highs/lows.
Trade like a professional: Turn chaos into structure, and randomness into rhythm.
⚙️ Key Features
Automatically plots US30 quarter levels (…125 / …250 / …375 / …500 / …625 / …750 / …875 / …000).
Color-coded hierarchy:
🟨 xx000 / xx500 → major institutional levels
⚪ xx250 / xx750 → medium-impact levels
⚫ xx125 / xx375 / xx625 / xx875 → intraday liquidity pockets
Customizable window size, label spacing, and line extensions.
Works across all timeframes — from 1-minute scalps to 4-hour macro swings.
Optimized for clean visualization with no clutter.
🎯 How to Use It
Identify liquidity sweeps: Smart money hunts stops at these quarter zones.
Align structure: Combine with session opens, order blocks, or FVGs.
Set precision entries & exits: Trade reaction-to-reaction with tight risk.
Plan daily bias: Watch how New York respects these 125-point increments.
🧭 Designed For
Scalpers, day traders, and swing traders who understand that US30 doesn’t move randomly — it moves rhythmically.
Perfect for traders using ICT, SMC, or liquidity-based frameworks.
⚡ Creator’s Note
“Every 125 points, the Dow breathes. Every 1000, it shifts direction.
Once you see the rhythm, you’ll never unsee it.”
— FxMogul
Индикаторы и стратегии
Volume Profile with 8 EMAs and Ichimoku Cloud — Multi-Timeframe This script merges three proven concepts — Volume Profile, 8 customizable EMAs, and Ichimoku Cloud — into a single overlay that helps traders quickly identify **high-probability zones for entries and exits.
1. Volume Profile (Market Profile logic, Steidlmayer 1980s)
- Builds a horizontal histogram over the selected look-back period
- Highlights the **Point of Control (PoC) and Value Area (VA) where 68 % of volume traded
- Choose between **bullish, bearish, or both volume types
- Toggle **visible-range or fixed-bar mode
2. Eight Exponential Moving Averages
- Default lengths: 10, 25, 61, 78, 125, 150, 300, 500
- Each EMA can **trigger its own crossover alert** (up/down arrows on chart)
- Colors and thickness automatically scale with length for instant visual parsing
3. Ichimoku Cloud (Goichi Hosoda, 1930)
- Full cloud calculation: Tenkan, Kijun, Senkou A/B, Chikou
- Dynamic trend labels: “Bullish Trend” / “Bearish Trend” when price is above/below the cloud and TK cross agrees
- Cloud color reflects sentiment (green = bullish, red = bearish)
How to use
- Look for **confluence**: price inside Value Area + EMA stack aligned + Ichimoku cloud color match
- Use PoC as intraday support/resistance for scalps
- Enable only the **EMA alerts you actually trade** to avoid noise
This is not a simple mash-up**: the three modules are visually integrated so that Volume Profile levels, EMA slopes, and Ichimoku cloud boundaries can be compared at a glance without switching indicators.
Adaptive Trend & Momentum Composite (ATMC)This script combines two well-established technical concepts—adaptive moving averages and normalized momentum oscillators—into a single, cohesive system designed to identify high-probability trend continuations with reduced noise.
What it does:
The indicator dynamically adjusts its sensitivity based on market volatility (using an ATR-based filter) and overlays a smoothed momentum signal that highlights potential exhaustion points within the prevailing trend. Unlike generic "trend-following" scripts, this implementation uses the Kaufman Adaptive Moving Average (KAMA) for price filtering and a rate-of-change (ROC) oscillator normalized between -1 and +1 to gauge momentum strength.
How it works:
Trend Filter: KAMA adapts its smoothing factor based on market efficiency—reacting quickly in trending markets and slowing down in choppy conditions.
Momentum Confirmation: A 9-period ROC is scaled to a fixed range to avoid amplitude distortion across assets. When momentum aligns with the KAMA direction and exceeds a volatility-adjusted threshold, the script paints a colored background (green for long bias, red for short bias).
Noise Reduction: Signals are only displayed when the 14-period ATR is above its 50-period moving average, ensuring trades occur in sufficiently active markets.
How to use it:
Long setups: Look for green background zones after a pullback, ideally near dynamic support (e.g., previous swing low or KAMA line).
Short setups: Red zones after rallies near resistance.
Avoid trading when no background is shown—this indicates either low volatility or conflicting signals.
Why this mashup is useful:
Many traders combine trend and momentum indicators, but often without synchronization logic. Here, both components are interdependent: momentum must confirm the adaptive trend and pass a volatility gate. This reduces false signals common in sideways markets—a frequent pain point with standard MACD or EMA crossovers.
This script is not investment advice. Test it thoroughly in your own strategy before live use.
Divergences + Alerts (ANY Indicator)📊 Divergences + Alerts (ANY Indicator)
This versatile indicator detects four types of divergences between price action and an oscillator:
Buyer Exhaustion
Buyer Absorption
Seller Exhaustion
Seller Absorption
Each divergence type is automatically identified and visually marked on the chart with colored lines. The indicator also includes built-in alert conditions for all four divergence types, allowing traders to receive real-time notifications when potential reversal signals occur.
By default, the oscillator is a candle-style visualization of the Money Flow Index (MFI), enhanced with volatility filtering via a VWMA-based ATR. However, users can replace the default MFI oscillator with any external source using the “Plug External Source” input, enabling full customization and compatibility with other indicators.
Key features:
🔍 Detects both exhaustion and absorption divergences
🔔 Alerts for each divergence type
🕯️ Candle-style oscillator visualization
🔌 Optional input for external indicator sources
⚙️ ATR-based filtering for precision
Ideal for traders seeking to spot early signs of trend reversals or momentum shifts with customizable flexibility.
RSI + Stochastic Combo (fixed) by howhaber# RSI + Stochastic Indicator
**Summary**
This indicator combines RSI and Stochastic to generate BUY and SELL signals in oversold or overbought market conditions. It merges both indicators for higher accuracy, reducing false signals. Includes visual signals on the chart, alerts, and an info label for quick analysis.
---
## 📈 How the Indicator Works
### RSI Component
- Calculates standard RSI based on the specified period (`rsiLen`).
- Indicates oversold (< 30) or overbought (> 70) conditions.
### Stochastic Component
- Manually calculated to avoid compatibility issues.
- Measures the current price position relative to the price range (highs/lows) over the selected period.
- Smoothed using two SMA filters (%K and %D).
### Signal Logic
**BUY Signal**:
- %K crosses above %D (`ta.crossover(k, d)`).
- %K < 20 (oversold market).
- RSI < specified threshold (default < 40).
**SELL Signal**:
- %K crosses below %D (`ta.crossunder(k, d)`).
- %K > 80 (overbought market).
- RSI > specified threshold (default > 60).
---
## 📍 What's Displayed on the Chart
- 🟢 **Green arrow** below the bar → BUY signal.
- 🔴 **Red arrow** above the bar → SELL signal.
- **In a separate window**:
- RSI line (blue).
- Stochastic %K (orange).
- Stochastic %D (purple).
- Reference levels: 30/70 (RSI), 20/80 (Stochastic).
---
## 🔔 Alerts
- **RSI+Stoch BUY**: Notification on BUY signal.
- **RSI+Stoch SELL**: Notification on SELL signal.
Receive alerts via email, Telegram, or directly on the platform.
---
## 🧩 Additional Feature
- Info label on the last bar, displaying:
- Current RSI value.
- %K and %D values.
- Facilitates quick visual checks of the indicator's current state.
---
## 💡 Interpretation
- **Oversold market** (confirmed by RSI and Stochastic): Likely upward reversal.
- **Overbought market** (confirmed by RSI and Stochastic): Likely downward reversal.
- Combining both reduces false signals and improves accuracy in choppy markets.
---
## ⚠️ Important Note
This indicator is not financial advice. It is designed for technical analysis and educational purposes. Combine it with other tools like trend analysis, volume, and price patterns for better results.
X 4H ORThis indicator plots the 30-second opening range (high/low) for six New-York–time anchors—2am, 6am, 10am, 2pm, 6pm, and 10pm—and extends each box to a fixed end time (e.g., 2am→9am, 6am→1pm, etc.). It samples true 30-second data regardless of the chart timeframe, so the captured highs/lows are precise.
What it does
Builds the first 30s OR for each selected anchor and draws a time-anchored box for that session.
Archives every day’s boxes (up to a cap) so you can study how price interacts with past ranges.
Adds per-anchor show toggles to display the latest box for that anchor.
Adds a global History toggle to show/hide all archived boxes without deleting them (clean view vs. context view).
Uses borderless, color-coded fills per anchor to avoid edge distortion while keeping levels easy to read.
Why it’s useful
Quickly spot session inflection zones where liquidity, breakouts, or reversals cluster.
Compare how current price trades relative to recent session ranges for bias and risk framing.
Perform lightweight post-session review/backtesting on OR breaks, retests, and range rotations.
Keep charts decluttered on demand (latest only), or flip on history for deeper context.
Previous Candle 50% line The intention of this is to mark the 50% mark of the previous candle. My use is to set stops and to spot reversals coming from the STRAT to see in real time 2's going 3
ADX Scanner with IndicatorsA screener that will allow you to enter up to 10 stocks. The goal is to see clearly in front of you what stocks are moving and the momentum leveraging the ADX and RSI. The return for the day shows the growth or loss of those moves.
ATR Anchored Range %b by TradeSeekersAll time highs got you spooked to enter with no levels in sight?
Stuck in a multi-week range and wondering where the heck the pivots are!?
Wondering if you're longing the top or shorting the potential bottom and about to get smoked, sending you back to burger flipping?!
Fret not trading friends!
I've been crafting the ultimate map for scalpers, slingers, swingers, swindlers, swashbucklers -and traders too.
Why should I care about this, what's an ATR!?
Nearly any trader that's entered the markets has heard of ATR, perhaps even taken a stab at trying to calculate the flux capacity of a weekly ATR on a lower timeframe. Continually calculating things manually sucks!
Ok, so you haven't heard of ATR? It's the average true range... what's the true range!? It's simply the low subtracted from the high (high - low) of any given candle.
How is ATR useful?
The theory is simple, if the ATRs on the daily timeframe for a stock are 5, then traders may have a reasonable expectation that any day in the near future the stock will mostly move +/- 5 pts. This +/- 5 can be used as a possible daily high and low for traders to use.
But ATR changes as time passes, with every billionaire X post, viral cat meme, fed announcement or government shutdown the market makes it's move. This means without this tool, traders need to run the standard lame (sorry) ATR indicator and then hand draw a bunch of important levels (barf).
I'm convinced and ready to join the ATR army, what do I do?
Glad to have you aboard sailor, slap this indicator on your layout - it'll initially display a bottom panel, say nice things to it.
Usage
The lower panel provides a %b plot representative of the current price relative to the timeframe and period ATR. (Defaults to 1D timeframe and 20 - 20 trading days in a month yo)
This %b plot is a map for price against the key ATR based levels and resets each time the timeframe change occurs.
Keep reading! (maybe grab a snack, you're doing great)
If you want to see what the indicator sees, how it maths the math, open the settings and check the "overlay" option... it's amazing, I know.
Main base of operations
This will be the gray area between first red and green lines, imagine this is a future candle for the timeframe anchored. The red would represent the candle high (red means stop/overbought), and the green would represent the candle low (green means go/oversold).
Regardless of the timeframe anchored, this area always represents the area the ATR indicates will be the building area of the current candle being formed. Traders should expect most of the trading to occur within this area.
The mid line
Don't diddle in the middle, this by default is the open price and it's the ultimate bias filter for bull or bear riders.
Extension areas
Beyond the gray area is the extension zone, this provides a whole ATR from the mid line to the extension.
Assembling a trade plan
There are just a couple of key concepts to master in order to become the ultimate ATR samurai warrior, capable of slicing through even the messiest liquidity.
Above the midline and holding, but still within the gray area? Could be a great long entry with targets to upper levels. The same holds true for below open and holding while still being within the lower gray area.
As price makes it's ascension or decline towards the ends of the initial gray ATR range, consider managing trades here. If it's suspected, due to a strong hold of the midline, that the range low or high is the midline, then continue to manage trades towards the extension zones.
Timeframes and periods oh my
The tooltips already provide some hints, but not everyone goes around clicking and hovering everything in sight (maybe I'm the only one that does that?).
There's a thoughtful approach to the default values, I like to consider the big market participants with my day trades, swings trades and beyond.
By default I've chosen the daily timeframe and a period of 20, one for each trading day of the calendar month.
It's no large leap to consider alternatives, what about 1W timeframe and a period of 4 (1 month) or 52 (1 year)?
The possibilities are nearly infinite, comment on any particular favorite combos.
An Italian Special Bonus!!!
...sorry, it's not pizza....
First, did you know the famous Italian Fibonacci's real name was actually Leonardo? I'm not sure how I feel about that. Fun fact, my ancestors are Italian.
Alright, you may have guessed that the special bonus is the mythical Fibonacci inspired "Golden Pocket", maybe it's a foreshadowing of your pockets - one can only hope.
Use this feature to show the commonly referenced Fibonacci levels within each major ATR range. I've seen some totally mathematical epic-ness with these hence the addition.
Once key ATR levels have been hit look for reversals back to golden pockets (you tricksy hobbits) for potential entry back towards the prior hit ATR level.
The %b turns gold if you have the feature enabled and of course the overlay displays them also, how fun!
Final thoughts
I hope you have as much fun using this indicator as I do, it has brought much joy to my trading experience. If you don't have fun with it, well I hope you had fun reading about it at least.
100% human crafted and darn proud of it
- SyntaxGeek
Smart Money Panel By: arisutiknoKEY FEATURES:
✅ Smart Money Detection - Automatic Order Blocks Detection
✅ Full Customization - All colors can be customized
✅ Clean Panel Design - Professional and informative look
✅ Real-time Signals - Actionable trading signals
✅ Multiple Signal Types - BUY/SELL AT OB, NEAR ZONE, WAITING
✅ Custom Signal Colors - Signal colors can be set separately
Makes it easier to make decisions. Good Luck Brooo
Bollinger Bands Squeeze📈 Bollinger Bands Squeeze
This indicator enhances traditional Bollinger Bands by integrating Keltner Channel layers to visualize market compression and volatility expansion — allowing traders to easily identify when a squeeze is building or releasing.
🔍 Overview
This is a refined version of the classic Bollinger Bands, designed to detect volatility squeezes using multiple Keltner Channel thresholds.
The script plots standard Bollinger Bands and dynamically colors the bands according to the degree of compression relative to the Keltner Channels.
⚙️ How It Works
Bollinger Bands are calculated from a selected moving average (SMA, EMA, SMMA, WMA, or VWMA) and standard deviation multiplier.
Keltner Channels are derived from ATR (True Range) using three sensitivity levels (1.0, 1.5, and 2.0× multipliers).
When Bollinger Bands contract inside a Keltner Channel, the script marks a squeeze state:
🟠 High Compression (Orange): Very tight volatility — expect breakout soon.
🔴 Mid Compression (Red): Moderate contraction — volatility is building.
⚫ Low Compression (Gray/Black): Early compression phase.
🧩 Inputs & Customization
Length : Period for both Bollinger and Keltner calculations.
Basis MA Type: Choose from SMA, EMA, SMMA (RMA), WMA, or VWMA.
StdDev Multiplier : Controls Bollinger Bandwidth.
Keltner Multipliers (1.0 / 1.5 / 2.0) : Adjust compression thresholds.
Offset : Shifts the bands visually on the chart.
🕹️ Best Use Cases
Identify pre-breakout conditions before volatility expansion.
Combine with volume, momentum, or trend indicators (e.g., RSI) for confirmation.
Ideal for scalping, breakout trading, or volatility-based entries during session opens.
Aggregated Long Short Ratio (Binance + Bybit)This indicator displays the Long/Short Ratio (LSR) from Binance and Bybit exchanges, plus an aggregated average. LSR shows the ratio between traders holding long positions vs short positions.
Settings AvailableExchanges Group:
☑️Show Binance - Display Binance LSR line
☑️ Show Bybit - Display Bybit LSR line
☑️ Show Aggregated LSR - Display combined average
Timeframe - Choose data timeframe (leave empty for chart timeframe)
Visualization Group:
🎨 Binance Color - Default: Yellow
🎨 Bybit Color - Default: Orange
🎨 Aggregated Color - Default: White
📖 How to Read the Indicator
⚠️ CRITICAL: Always analyze LSR together with Open Interest (OI)
Key Levels:
LSR = 1.0 (gray dashed line) = Balance - Equal longs and shorts
LSR > 1.0 = More longs than shorts (bullish sentiment)
LSR < 1.0 = More shorts than longs (bearish sentiment)
Extreme Zones:
LSR > 1.5 (green zone) = Very bullish - Possible market top
LSR < 0.5 (red zone) = Very bearish - Possible market bottom
Why Open Interest Matters:
LSR alone doesn't tell the full story. You MUST check Open Interest:
Rising OI + High LSR (>1.5) = New longs opening → Strong momentum OR potential trap
Rising OI + Low LSR (<0.5) = New shorts opening → Strong momentum OR potential trap
Falling OI + Extreme LSR = Positions closing → Weak signal, avoid trading
Stable OI + Extreme LSR = No new positions → Less reliable signal
💡 Trading Interpretation
⚠️ ALWAYS combine LSR with Open Interest analysis!
Contrarian Strategy (High Leverage Zones):
High LSR (>1.5) + Rising OI → Many new longs → Potential short squeeze OR reversal down
Low LSR (<0.5) + Rising OI → Many new shorts → Potential long squeeze OR reversal up
Trend Confirmation:
Rising LSR + Rising price + Rising OI = Strong bullish trend with new positions
Falling LSR + Falling price + Rising OI = Strong bearish trend with new positions
Weak Signals (Avoid):
Extreme LSR + Falling OI = Positions closing → Low conviction
Extreme LSR + Stable OI = No new money → Wait for confirmation
Divergences:
Price higher highs but LSR falling + Rising OI = Bearish divergence (shorts accumulating)
Price lower lows but LSR rising + Rising OI = Bullish divergence (longs accumulating)
Best Setups:
Reversal: Extreme LSR (>1.5 or <0.5) + Rising OI + Price rejection
Trend: LSR trending with price + Steadily rising OI
Caution: Extreme LSR + Falling OI = Ignore signal
Built-in Alerts
The indicator includes 4 preset alerts:
LSR Crossed Above 1.0 - Market turned bullish
LSR Crossed Below 1.0 - Market turned bearish
LSR Very High - Above 1.5 (possible top)
LSR Very Low - Below 0.5 (possible bottom)
To Set Up Alerts:
Click the "..." on the indicator
Select "Add Alert"
Choose the condition you want
Configure notification method
Best Practices
MANDATORY: Always add Open Interest indicator to your chart alongside LSR
To add OI: Click Indicators → Search "Open Interest" → Add official TradingView OI
Use on perpetual futures charts (symbols ending in .P)
Works best on USDT pairs (BTCUSDT, ETHUSDT, etc.)
Combine LSR + OI + price action + support/resistance levels
Higher timeframes (4h, 1D) give more reliable signals
Don't trade LSR extremes without confirming OI direction
Golden Rule: Rising OI = Strong signal | Falling OI = Weak signal
⚠️ Important Notes
Indicator requires TradingView Premium or above (uses Request library)
Only works on crypto perpetual futures
Data availability depends on exchange API
NA values mean data is not available for that exchange/symbol
Never use LSR without Open Interest context
CMF, RSI, CCI, MACD, OBV, Fisher, Stoch RSI, ADX (+DI/-DI)Eight normalized indicators are used in conjunction with the CMF, CCI, MACD, and Stoch RSI indicators. You can track buy and sell decisions by tracking swings. The zero line is for reversal tracking at -20, +20, +50, and +80. You can use any of the nine indicators individually or in combination.
Narrowing Range PredictorNarrowing Range Indicator with several configurables. Recommended to play around with customised settings.
Liquidations Aggregated (Lite)Liquidations Aggregated (Lite)
The Liquidations Aggregated (Lite) script provides a unified cross-exchange visualization of short and long liquidation volumes, allowing traders to identify high-impact market events and sentiment reversals driven by forced position closures. It aggregates normalized liquidation data from Binance, Bybit, and OKX into a single coherent output, offering a consolidated perspective of derivative market stress across major venues.
Core Concept
Liquidations are involuntary closures of leveraged positions when margin requirements are breached. They represent points of structural orderflow imbalance, often triggering localized volatility spikes and price pivots. This indicator isolates and aggregates those liquidation volumes by direction (short vs. long), allowing traders to map where leveraged traders are being forced out and whether current market movement is driven by short covering or long capitulation.
Underlying Methodology
Each connected exchange provides liquidation feeds via standardized symbols (e.g., BTCUSDT.P_LQBUY or BTCUSD.P_LQSELL).
The script differentiates between:
Short Liquidations → Buy Volume: Forced covering of shorts, representing upward pressure.
Long Liquidations → Sell Volume: Forced selling of longs, representing downward pressure.
Bybit’s inverse data is normalized to align directional logic with Binance and OKX. Data is drawn through the request.security() function per symbol and per exchange, with per-exchange scaling adjustments applied to compensate for differences in reported nominal sizes (USD vs. coin-margined). The script is meant to match the calculation methods of professional-grade data sources (e.g., Velodata, Coinalyze). The value is denominated in the base currency at all times.
Computation Logic
Liquidation volumes are fetched separately for USD- and USDT-margined pairs on each exchange.
Exchange-specific magnitude adjustments are applied to account for nominal denomination differences.
Normalized liquidation buy and sell volumes are summed into two global aggregates:
combinedBuyVolumeLiquidationsShort → aggregated buy volume from forced short positions closes (Short Liquidations)
combinedSellVolumeLiquidationsLong → aggregated sell pressure from forced long position closes (Long Liquidations)
Final series are plotted as mirrored column charts around a zero baseline for direct comparison.
How to Use
Apply the script to any crypto perpetual futures symbol (e.g., BTCUSDT, ETHUSDT).
Observe teal bars (Buy Volume from Short Liquidations) for short squeezes and red bars (Sell Volume from Long Liquidations) for long wipes.
Strong teal spikes during downtrends often indicate aggressive short liquidations leading to short-term bounces.
Strong red spikes during uptrends often mark long unwinds that can trigger sharp retracements.
Sustained asymmetry in either direction suggests systemic imbalance across leveraged positioning.
Engulfing bull & bear w/ Volume Confirmation (v6)This script ID's bullish & bearish engulfing bars with volume ≥ SMA (volume, 20) x 1.3 and (optionally) ≥ previous bar's volume.
Parameters adjustable
Custom MTF EMA CloudsVisualize market structure and trend alignment across multiple timeframes with six layered EMA clouds — from short-term momentum to macro trend anchors.
Each pair of EMAs forms a dynamic cloud that adapts to your selected timeframe.
Colors, lengths, and visibility are fully customizable, allowing you to tailor the setup for any trading style.
⚙️ Default Configuration
EMA Short Long Purpose
1 8 13 🔸 Intraday momentum cloud (scalping layer)
2 21 24 🟩 Short-term trend confirmation
3 50 55 🔵 Medium-term swing structure
4 120 144 🔴 Long-term support/resistance band
5 200 238 🟠 Institutional trend foundation
6 400 460 🟣 Macro directional anchor
🧩 Features
✅ Up to 6 independent EMA clouds
✅ Fully customizable short & long lengths
✅ Individual line and cloud colors
✅ Toggle each layer on/off
✅ Works with any timeframe via the Resolution input
✅ Automatic cloud transparency for better chart clarity
📈 How to Use
Use EMA 1–2 (8/13, 21/24) for momentum shifts and intraday entries.
Use EMA 3–4 (50/55, 120/144) for swing confirmation and trend continuation.
Use EMA 5–6 (200/238, 400/460) as long-term anchors to stay aligned with institutional flow.
Watch for crossovers or price breaking in/out of clouds — they often precede strong directional moves.
EMA/VWAP/Volume/MACD指标// === 控制输出 ===
macd_plot_line = show_macd ? macd_line : na
macd_signal_plot = show_macd ? signal_line : na
macd_hist_plot = show_macd ? hist_line : na
adx_plot_line = show_adx ? adx : na
plusdi_plot_line = show_adx ? diplus : na
minusdi_plot_line = show_adx ? diminus : na
// === 绘制 MACD ===
plot(macd_plot_line, title="MACD Line", color=color.new(color.aqua, 0))
plot(macd_signal_plot, title="Signal Line", color=color.new(color.orange, 0))
plot(macd_hist_plot, title="Histogram", style=plot.style_columns,
color=macd_hist_plot >= 0 ? color.new(color.green, 0) : color.new(color.red, 0))
Moving Average Convergence-Divergence (MACD)This script implements the Moving Average Convergence-Divergence (MACD), a popular momentum indicator used in technical analysis to identify trend direction, momentum shifts, and potential buy/sell signals.
🔹 Key Features
1. Inputs & Customization
MACD Lines Toggle: Enable/disable the MACD and signal lines.
Source Price: Defaults to close but can be adjusted (e.g., open, high, low, hl2).
Fast Length (12): The period for the faster-moving EMA.
Slow Length (26): The period for the slower-moving EMA.
Signal Length (9): The smoothing period for the signal line.
2. Calculations
Computes the MACD Line (fast EMA - slow EMA).
Computes the Signal Line (EMA of the MACD line).
Computes the Histogram (difference between MACD and Signal lines).
3. Visual Indicators
Zero Line: A white horizontal line at 0 for reference.
MACD Line: Plotted in green when above the signal line, red when below.
Signal Line: Displayed as a yellow line.
Histogram:
Green bars when MACD > Signal (bullish momentum).
Red bars when MACD < Signal (bearish momentum).
Background Highlights:
Light green on bullish crossovers (MACD crosses above Signal).
Light red on bearish crossunders (MACD crosses below Signal).
4. Alerts
Triggers when:
Bullish Crossover (MACD crosses above Signal).
Bearish Crossunder (MACD crosses below Signal).
🔹 How Traders Use This Indicator
Trend Identification:
MACD above zero → bullish trend.
MACD below zero → bearish trend.
Momentum Signals:
Bullish Crossover (Buy Signal): MACD crosses above Signal.
Bearish Crossunder (Sell Signal): MACD crosses below Signal.
Divergence (Not in this script, but useful):
Price makes higher highs, but MACD makes lower highs → Potential reversal.
🔹 Strengths of This Script
✅ Clean and Efficient Code – Uses Pine Script v6 best practices.
✅ Customizable Inputs – Adjust lengths and source price.
✅ Clear Visuals – Color-coded for easy interpretation.
✅ Built-in Alerts – For automated trading strategies.
Jul 1
Release Notes
This script implements the Moving Average Convergence-Divergence (MACD), a popular momentum indicator used in technical analysis to identify trend direction, momentum shifts, and potential buy/sell signals.
🔹 Key Features
1. Inputs & Customization
MACD Lines Toggle: Enable/disable the MACD and signal lines.
Source Price: Defaults to close but can be adjusted (e.g., open, high, low, hl2).
Fast Length (12): The period for the faster-moving EMA.
Slow Length (26): The period for the slower-moving EMA.
Signal Length (9): The smoothing period for the signal line.
2. Calculations
Computes the MACD Line (fast EMA - slow EMA).
Computes the Signal Line (EMA of the MACD line).
Computes the Histogram (difference between MACD and Signal lines).
3. Visual Indicators
Zero Line: A white horizontal line at 0 for reference.
MACD Line: Plotted in green when above the signal line, red when below.
Signal Line: Displayed as a yellow line.
Histogram:
Green bars when MACD > Signal (bullish momentum).
Red bars when MACD < Signal (bearish momentum).
Background Highlights:
Light green on bullish crossovers (MACD crosses above Signal).
Light red on bearish crossunders (MACD crosses below Signal).
4. Alerts
Triggers when:
Bullish Crossover (MACD crosses above Signal).
Bearish Crossunder (MACD crosses below Signal).
🔹 How Traders Use This Indicator
Trend Identification:
MACD above zero → bullish trend.
MACD below zero → bearish trend.
Momentum Signals:
Bullish Crossover (Buy Signal): MACD crosses above Signal.
Bearish Crossunder (Sell Signal): MACD crosses below Signal.
Divergence (Not in this script, but useful):
Price makes higher highs, but MACD makes lower highs → Potential reversal.
🔹 Strengths of This Script
✅ Clean and Efficient Code – Uses Pine Script v6 best practices.
✅ Customizable Inputs – Adjust lengths and source price.
✅ Clear Visuals – Color-coded for easy interpretation.
✅ Built-in Alerts – For automated trading strategies.