تم تحديثه
MACD X Velocity [ChartWinners]

🔷 MACD X Velocity is a complete re-engineering of the MACD histogram for the problem every trader knows: the histogram is the first part of the MACD to turn, yet nothing separates the turns that matter from the ones that don’t. A standard histogram has no Overbought or Oversold levels, and its values are expressed in price units, so a reading that is extreme on one chart is routine on the next.
MACD X Velocity keeps the classic MACD, signal line, and histogram calculation intact. What changes is everything around it:
MACD X Velocity has a companion, MACD X, which keeps the MACD line, its signal line, and the histogram together on the same volatility-normalized scale and adds SmartLevels bands to the MACD line itself. Both are built on the same MACD engine and work side by side on the same chart. The sections below explain how each stage works so you can evaluate exactly what the script does and how it does it.

⚙️ HOW IT WORKS
MACD X Velocity prepares the price data before calculating the MACD line, its signal line, and the histogram, then adds tools for identifying extremes, momentum turns, and trend strength.
🔹 1. Price Preparation.
Before the MACD is calculated, the selected price can pass through two optional steps. “Price Source” sets that input. Close is the default, and HL2, HLC3, and OHLC4 are also available.
► Step 1: The Gap Filter. Session gaps distort the MACD: if a stock closes at 100 and opens at 103, the moving averages register that 3-point jump as real momentum even though no trading on that chart produced it. The jump also lingers in the averages for several bars afterward. When enabled, the Gap Filter removes that jump from the OHLC prices before the calculation (the whole gap by default, or any percentage you choose). Each candle keeps its shape, and indicator values and signals reflect moves that happen while the market is actually trading, not jumps between sessions.
“Gap Filter Mode” is Off by default. Intraday Only applies the filter on intraday charts, and All Timeframes applies it on daily and higher charts as well, where every bar opens on a new session.
► Step 2: Smoothing. The price runs through one of six selectable methods (SMA, EMA, WMA, GMA, HMA, or SSF, John Ehlers’ low-lag Super Smoother) over “Price Smoothing Length”. The default is a 3-bar EMA. Smoothing the price first, instead of the finished histogram, removes noise at the source before it ever reaches the calculation.
► Optional: Volume Weighting. “Volume-Weighted MACD” replaces the selected smoothing method with volume-weighted averaging at every step: the price smoothing, the fast and slow averages, and the signal line. Bars that traded on real volume then shape the reading more than low-volume drift. If a symbol has no usable volume data, MACD X Velocity falls back to the standard smoothing automatically, and a VW MACD Active flag in the Data Window shows which calculation is live.

🔹 2. The Normalized MACD Histogram.
A standard MACD histogram is expressed in price units, so a bar that looks tall on one chart is tiny on another and no fixed level means overbought everywhere. MACD X Velocity measures the histogram in units of the symbol’s own recent volatility instead. The same reading then means the same thing on every symbol and timeframe. That’s what lets one set of bands, colors, scores, and alerts work across your whole watchlist.
► How the scale is built:
Plotting the histogram on its own turns the classic MACD crossover into a zero-line cross: the histogram crosses zero on the exact bar the MACD line crosses its signal line. The height of each bar shows how far apart the two lines are, and a shrinking bar shows them closing in before they cross.
Turning normalization off uses raw MACD units. Price preparation, smoothing, and volume weighting stay active, and SmartLevels and the Strength Meter rebuild themselves around the raw scale. The Fixed OB/OS defaults of +50 and -50 are set for the normalized scale, so raw mode calls for your own levels.

🔹 3. Adaptive OB/OS Thresholds.
► “OB/OS Mode” chooses how the Overbought and Oversold bands are set:
The bands describe where the histogram has been, not where it’s going. A reading beyond a band means the MACD line has pulled unusually far from its signal line by this symbol’s own recent standard.
► “SmartLevels Sensitivity” determines how far apart the bands sit:
► “SmartLevels Lookback” determines how many bars of histogram history the bands use:
“Show OB/OS Zone Glow” draws a glowing strip just beyond the extreme of each Overbought or Oversold run, brightening as the histogram moves deeper into the zone and fading out over three bars after it leaves.

🔹 4. SmartDivergence.
SmartDivergence detects and draws price and histogram divergences for you, so you can spend your time assessing the setup instead of searching the chart and connecting pivots by hand. Two settings let you require stricter alignment, look for longer patterns, or use both together:
By default, both histogram pivots in a bullish divergence must sit below -20 and both pivots in a bearish divergence above +20, so a divergence only qualifies once the histogram is well clear of zero. “Bullish Divergence Threshold” and “Bearish Divergence Threshold” move those limits: set them farther from zero to demand deeper divergences, or closer to zero to accept more.
“Divergence Panel” chooses where the lines are drawn. Price Panel is the default and draws each divergence on the price chart between the price pivots. Subpanel draws it in the histogram pane between the histogram pivots, and Both draws it in both places. Detection, timing, and alerts are the same in every setting.

🔹 5. Plotted Signals.
Three signal types can be shown on the histogram, each with its own display toggle and its own alert toggle, so you can keep the chart clean and still be notified:
All three markers are off by default, so the histogram itself stays the focus until you decide which events you want to see.

🔹 6. The Strength Meter.
The Strength Meter gives you a visual comparison of bullish and bearish strength alongside the current histogram reading. Its proprietary scoring helps you distinguish a strong directional trend from a neutral state before you act on a reading beyond the bands.
The meter’s ten-segment gauges show the bull and bear scores independently, from 0 to 10, and the illuminated segments and their colors make the balance easy to compare at a glance. The scores combine:
Hovering either gauge shows how the points add up. A STRONG state needs real magnitude behind it, so a reading near zero is never called strong.
► The remaining rows put those scores in context, and each has its own tooltip:
The histogram can hold beyond the Overbought band for as long as the MACD line keeps pulling away from its signal line. Before treating a reading up there as a reason to look for a bearish turn, check whether the meter still shows STRONG BULL to avoid a setup that goes against the trend.

🔹 7. Color Modes and PaintBar.
“Velocity Color Mode” colors the bars by their level, by their direction of change, or by which side of zero they’re on. The five choices change the display without changing any signal:
“PaintBar On” carries the histogram’s color onto the price bars: the gradient color in Gradient mode, the four Velocity colors in 4-State mode, and the histogram’s own color in Zero-Line and Slope mode. None leaves the candles unchanged. Up bars paint hollow and down bars paint solid, with wicks and borders in the active color, and “Solid PaintBar” fills every painted bar instead.

🔹 8. Timeframe Versatility.
Nothing in the MACD X Velocity is tuned to one timeframe. The same settings, signals, and meter apply from intraday charts to weekly ones, so MACD X Velocity behaves the same way on every timeframe you trade. The chart below shows the same symbol with identical settings on a daily timeframe and an intraday one.

🧰 WHAT IT ADDS TO THE STANDARD MACD HISTOGRAM
📖 HOW TO USE
🔔 ALERTS
Choose the events you want to follow, then receive notifications without keeping every signal marker visible. Five alert types are available:
All five alerts notify at bar close. Choose Plain Text for readable notifications with the signal, symbol, timeframe, histogram and MACD values, strength scores, the active levels for band events, and price, or JSON for webhook integrations. Divergence Alerts are on by default. The other four are off.
The separate Bull Signal and Bear Signal conditions also support Pine Screener filtering. Chart alerts using those conditions follow the frequency selected in TradingView’s dialog and don’t use the Plain Text or JSON setting. Choose once per bar close if you want them to wait for confirmation.
After enabling the alert choices you want, create one TradingView alert with the condition set to “Any alert() function call.”
🔍 PINE SCREENER SUPPORT
MACD X Velocity also works inside TradingView’s Pine Screener, letting you filter a watchlist for histogram conditions and signals before deciding which charts deserve a closer look. Pick MACD X Velocity as the screener’s indicator and you get nine columns to filter and sort:
► The Signal Code numbering:
Bull Signal and Bear Signal let you filter for current bullish or bearish events, and both can match when the two directions fire together. The screener’s column picker lists every plot in the script. The nine above are the ones built for screening, and the rest are chart drawings and Data Window values. Screener outputs remain available with chart drawings and alerts switched off.
To compare a screener result with the chart, open that symbol on a matching timeframe with matching settings. The chart’s Data Window then shows the same nine values plus the Z-Score. Trend, NET, and Flow stay empty while the meter is warming up. Pine Screener uses the last 500 bars, so readings and bars-ago counts can differ from a chart with more history.
🎛️ INPUT SETTINGS (as they appear in the settings panel)
⚠️ LIMITATIONS AND DISCLAIMER
MACD X Velocity keeps the classic MACD, signal line, and histogram calculation intact. What changes is everything around it:
- The Histogram as the Instrument: the distance between the MACD line and its signal line, plotted on its own as a momentum gauge. A histogram turn is the earliest sign that the two lines are closing in on each other, and a zero-line cross is the exact bar the MACD line crosses its signal line.
- Volatility-Normalized Scale: the MACD spread is divided by the symbol’s own recent volatility before the signal line and the histogram are built, so a histogram reading carries the same meaning on a $5 stock and a $5,000 index.
- SmartLevels: Overbought and Oversold bands set from the histogram’s own recent readings on your symbol and timeframe instead of fixed numbers. At the default setting, a reading beyond a band means the histogram is in the top or bottom 5% of its recent readings on this chart, so extreme means the same thing on every symbol you trade.
- SmartDivergence: price and histogram divergences detected and drawn for you, including patterns most divergence tools miss. Proprietary PinPoint filtering keeps only the strictest ones, where price and the histogram turned on the same bars, and optional 3-point detection uncovers the longer patterns a two-pivot search never sees.
- The Strength Meter: a proprietary visual display with separate bull and bear gauges, five trend states, FLOW, and Z-Score to help you judge the strength behind a histogram reading.
- Price Preparation: a Gap Filter and six smoothing methods to reduce session and overnight gap distortion and price noise before they reach the calculation, plus optional volume weighting to give high-volume moves more influence.
MACD X Velocity has a companion, MACD X, which keeps the MACD line, its signal line, and the histogram together on the same volatility-normalized scale and adds SmartLevels bands to the MACD line itself. Both are built on the same MACD engine and work side by side on the same chart. The sections below explain how each stage works so you can evaluate exactly what the script does and how it does it.
⚙️ HOW IT WORKS
MACD X Velocity prepares the price data before calculating the MACD line, its signal line, and the histogram, then adds tools for identifying extremes, momentum turns, and trend strength.
🔹 1. Price Preparation.
Before the MACD is calculated, the selected price can pass through two optional steps. “Price Source” sets that input. Close is the default, and HL2, HLC3, and OHLC4 are also available.
► Step 1: The Gap Filter. Session gaps distort the MACD: if a stock closes at 100 and opens at 103, the moving averages register that 3-point jump as real momentum even though no trading on that chart produced it. The jump also lingers in the averages for several bars afterward. When enabled, the Gap Filter removes that jump from the OHLC prices before the calculation (the whole gap by default, or any percentage you choose). Each candle keeps its shape, and indicator values and signals reflect moves that happen while the market is actually trading, not jumps between sessions.
“Gap Filter Mode” is Off by default. Intraday Only applies the filter on intraday charts, and All Timeframes applies it on daily and higher charts as well, where every bar opens on a new session.
► Step 2: Smoothing. The price runs through one of six selectable methods (SMA, EMA, WMA, GMA, HMA, or SSF, John Ehlers’ low-lag Super Smoother) over “Price Smoothing Length”. The default is a 3-bar EMA. Smoothing the price first, instead of the finished histogram, removes noise at the source before it ever reaches the calculation.
► Optional: Volume Weighting. “Volume-Weighted MACD” replaces the selected smoothing method with volume-weighted averaging at every step: the price smoothing, the fast and slow averages, and the signal line. Bars that traded on real volume then shape the reading more than low-volume drift. If a symbol has no usable volume data, MACD X Velocity falls back to the standard smoothing automatically, and a VW MACD Active flag in the Data Window shows which calculation is live.
🔹 2. The Normalized MACD Histogram.
A standard MACD histogram is expressed in price units, so a bar that looks tall on one chart is tiny on another and no fixed level means overbought everywhere. MACD X Velocity measures the histogram in units of the symbol’s own recent volatility instead. The same reading then means the same thing on every symbol and timeframe. That’s what lets one set of bands, colors, scores, and alerts work across your whole watchlist.
► How the scale is built:
- MACD line: the standard calculation, a fast moving average of price minus a slow one, with the usual 12 and 26 lengths by default.
- Normalization: “Volatility-Normalized MACD (recommended)” is on by default. It divides the MACD line by the symbol’s Average True Range over the slow length and multiplies the result by 100, so a reading of +100 means the fast and slow averages are one unit of recent volatility apart. This is the MACD-V method from Alex Spiroglou’s 2022 Charles H. Dow Award paper, a brilliant concept that the rest of the script builds on.
- Signal line and histogram: the signal line is an average of the MACD line over “MACD Signal Length”, and the histogram is the MACD line minus the signal line. Both use the same volatility scale, so a histogram of +50 means the MACD line is half a unit above its signal line.
Plotting the histogram on its own turns the classic MACD crossover into a zero-line cross: the histogram crosses zero on the exact bar the MACD line crosses its signal line. The height of each bar shows how far apart the two lines are, and a shrinking bar shows them closing in before they cross.
Turning normalization off uses raw MACD units. Price preparation, smoothing, and volume weighting stay active, and SmartLevels and the Strength Meter rebuild themselves around the raw scale. The Fixed OB/OS defaults of +50 and -50 are set for the normalized scale, so raw mode calls for your own levels.
🔹 3. Adaptive OB/OS Thresholds.
► “OB/OS Mode” chooses how the Overbought and Oversold bands are set:
- SmartLevels: the default. Sets the bands from the histogram’s own recent history by ranking every reading in the lookback window. With the default Conservative setting, the Overbought band sits at the level only the highest 5% of those readings have exceeded, and the Oversold band at the level only the lowest 5% have fallen below. A symbol whose histogram swings wide gets wider bands, a quiet one gets tighter bands, and a band crossing means the same thing on every chart.
- Fixed OB/OS: constant levels at +50 and -50 that you can change, half a volatility unit each way on the normalized scale.
The bands describe where the histogram has been, not where it’s going. A reading beyond a band means the MACD line has pulled unusually far from its signal line by this symbol’s own recent standard.
► “SmartLevels Sensitivity” determines how far apart the bands sit:
- Aggressive (15/85): brings the bands closer in, allowing less extreme readings to reach the OB/OS zones.
- Balanced (10/90): band placement between Aggressive and Conservative.
- Conservative (5/95): the default. It places the bands farther out, so only the most extreme readings reach the OB/OS zones.
► “SmartLevels Lookback” determines how many bars of histogram history the bands use:
- Responsive (100): the shortest history, so the bands reflect recent changes soonest.
- Balanced (200): the default. A middle ground between adaptability and stability.
- Smooth (350): the longest history, for the steadiest bands.
“Show OB/OS Zone Glow” draws a glowing strip just beyond the extreme of each Overbought or Oversold run, brightening as the histogram moves deeper into the zone and fading out over three bars after it leaves.
🔹 4. SmartDivergence.
SmartDivergence detects and draws price and histogram divergences for you, so you can spend your time assessing the setup instead of searching the chart and connecting pivots by hand. Two settings let you require stricter alignment, look for longer patterns, or use both together:
- Standard vs. PinPoint: Standard compares price at confirmed histogram pivots. Proprietary PinPoint Divergences add a stricter requirement: price and the histogram must both form confirmed pivots on the same bars at the start and end of the pattern. This lets you focus on divergences built from matching turns in both price and momentum.
- Two-Point vs. Three-Point: Two-point detection checks the latest pair of histogram pivots and is the default. “Show Three Point Divergences” adds patterns spanning three pivots, bringing longer-span divergences into view even when the latest pair alone doesn’t qualify. It can also reveal overlapping double divergences.
By default, both histogram pivots in a bullish divergence must sit below -20 and both pivots in a bearish divergence above +20, so a divergence only qualifies once the histogram is well clear of zero. “Bullish Divergence Threshold” and “Bearish Divergence Threshold” move those limits: set them farther from zero to demand deeper divergences, or closer to zero to accept more.
“Divergence Panel” chooses where the lines are drawn. Price Panel is the default and draws each divergence on the price chart between the price pivots. Subpanel draws it in the histogram pane between the histogram pivots, and Both draws it in both places. Detection, timing, and alerts are the same in every setting.
🔹 5. Plotted Signals.
Three signal types can be shown on the histogram, each with its own display toggle and its own alert toggle, so you can keep the chart clean and still be notified:
- Zero-Line Crosses: the histogram crosses zero, which is the bar the MACD line crosses its signal line. Shown as triangles when “Zero-Line Cross Signals” is on.
- OB/OS Exits: the histogram crosses back through the active Overbought or Oversold band. Shown as diamonds when “OB/OS Crossover Signals” is on, with the alerts covering entries into the zones as well.
- Slope Reversals: the histogram’s first turn back from beyond a band. Shown as X marks when “Slope Reversal Signals” is on.
All three markers are off by default, so the histogram itself stays the focus until you decide which events you want to see.
🔹 6. The Strength Meter.
The Strength Meter gives you a visual comparison of bullish and bearish strength alongside the current histogram reading. Its proprietary scoring helps you distinguish a strong directional trend from a neutral state before you act on a reading beyond the bands.
The meter’s ten-segment gauges show the bull and bear scores independently, from 0 to 10, and the illuminated segments and their colors make the balance easy to compare at a glance. The scores combine:
- Magnitude: how far the histogram sits from zero on that side, measured against the active band and its own recent range.
- Momentum: how far it has moved over the last three bars.
- MACD Alignment: whether the MACD line is on the same side of zero.
Hovering either gauge shows how the points add up. A STRONG state needs real magnitude behind it, so a reading near zero is never called strong.
► The remaining rows put those scores in context, and each has its own tooltip:
- NET: classifies the result as STRONG BULL, BULLISH, NEUTRAL, BEARISH, or STRONG BEAR, helping you distinguish directional strength from a neutral reading.
- VELOCITY: keeps the current histogram reading beside the strength assessment, with an arrow for its direction against the previous bar.
- FLOW: optional. Shows whether the histogram is rising, falling, or flat compared with three bars ago, so you can compare its short-term direction with the broader trend state.
- Z-Score: optional. Shows how far the histogram is from its own recent average, highlighting stretched and extreme readings in either direction.
The histogram can hold beyond the Overbought band for as long as the MACD line keeps pulling away from its signal line. Before treating a reading up there as a reason to look for a bearish turn, check whether the meter still shows STRONG BULL to avoid a setup that goes against the trend.
🔹 7. Color Modes and PaintBar.
“Velocity Color Mode” colors the bars by their level, by their direction of change, or by which side of zero they’re on. The five choices change the display without changing any signal:
- Gradient Coloring: the default. The bars blend continuously through five color anchors at the Oversold band, halfway to zero, zero, halfway to the Overbought band, and the Overbought band, so the colors follow the active bands.
- 4-State Coloring: each bar shows two things at once: which side of zero the histogram is on, and whether it’s growing or shrinking. Bars that extend away from zero print in a bright bullish or bearish color, and bars that shrink back toward zero print in a dimmer version of the same color. Deceleration shows up while the lines are still converging.
- Zero-Line Coloring: the bullish color at or above zero and the bearish color below it.
- Slope Coloring: the bullish color while the histogram rises and the bearish color while it falls.
- None: one solid “Default Velocity Color”.
“PaintBar On” carries the histogram’s color onto the price bars: the gradient color in Gradient mode, the four Velocity colors in 4-State mode, and the histogram’s own color in Zero-Line and Slope mode. None leaves the candles unchanged. Up bars paint hollow and down bars paint solid, with wicks and borders in the active color, and “Solid PaintBar” fills every painted bar instead.
🔹 8. Timeframe Versatility.
Nothing in the MACD X Velocity is tuned to one timeframe. The same settings, signals, and meter apply from intraday charts to weekly ones, so MACD X Velocity behaves the same way on every timeframe you trade. The chart below shows the same symbol with identical settings on a daily timeframe and an intraday one.
🧰 WHAT IT ADDS TO THE STANDARD MACD HISTOGRAM
- Volatility-Normalized scale: the histogram measured in units of the symbol’s own recent volatility, so one reading means the same thing on every chart
- Gap Filter: removes session gaps before the calculation, so overnight jumps stop registering as momentum
- Six price-smoothing methods: SMA through John Ehlers’ Super Smoother, applied to price so noise is removed before it reaches the calculation
- Volume-Weighted MACD: an optional mode that gives high-volume bars more influence, with automatic fallback when volume data is unusable
- SmartLevels adaptive OB/OS bands and Zone Glow: Overbought and Oversold set from the histogram’s own recent readings, so a band crossing means the same thing on every chart
- SmartDivergence: price and histogram divergences found and drawn for you, with PinPoint filtering and optional 3-point patterns
- Proprietary Strength Meter: bull and bear gauges, five trend states, FLOW, and Z-Score, so you can judge the strength behind a reading before you act on it
- Five color modes and PaintBar: the histogram’s level, direction, or side of zero shown in its bars and carried onto the price bars
- Plotted signals and alerts: zero-line crosses, OB/OS exits, and Slope Reversals on the chart, with five alert types in Plain Text or JSON
- Pine Screener support: nine screener columns and Bull/Bear Signal filters, so you can screen on turns, trend, and divergence instead of the histogram value alone
📖 HOW TO USE
- Read the Zero Line First. The histogram sits above zero while the MACD line is above its signal line and below zero while it’s below, and its height is how far apart the two lines are. A zero-line cross is the classic MACD crossover shown as one event, and a shrinking bar tells you the cross is approaching before it happens.
- Tune SmartLevels to Your Style. Conservative is the default, so only the most extreme readings reach the OB/OS zones. Choose Balanced or Aggressive for closer bands and more frequent zone visits. Use the Lookback preset to decide how much recent histogram history shapes them.
- Check the Trend State Before Counter-Trend Setups. An oversold reading in a STRONG BEAR state is a different proposition from the same reading in a NEUTRAL state.
- Treat Divergences as Early Caution Flags. They mark disagreement with the prevailing move, so wait for price to confirm first. PinPoint mode narrows output to the strictest patterns when you want fewer, more selective setups.
- Know the Signal Spectrum. Slope Reversals are the most aggressive signal type: they mark the histogram’s first turn from beyond a band. An OB/OS exit needs the histogram back through the band. A zero-line cross needs the MACD line to cross its signal line, which comes last in that sequence and is the most confirmed of the three.
- Read the Scale in Volatility Units. With normalization on, a histogram reading of +50 means the MACD line is half a unit of recent volatility above its signal line, and -50 means half a unit below.
- Screen First, Then Open the Chart. In TradingView’s Pine Screener, filter a watchlist with Bull Signal or Bear Signal, or sort by OB/OS or Trend, and open the matching chart to check the full display before you act on it.
🔔 ALERTS
Choose the events you want to follow, then receive notifications without keeping every signal marker visible. Five alert types are available:
- Zero-Line Cross Alerts: the histogram crosses above or below zero.
- OB/OS Crossover Alerts: entries into and exits from the Overbought and Oversold zones.
- Slope Reversal Alerts: the histogram turns upward from beyond the Oversold band or downward from beyond the Overbought band.
- Divergence Alerts: confirmed Standard and PinPoint patterns.
- Strength Meter Threshold Alerts: the meter turns bullish or bearish, or strengthens into a STRONG state.
All five alerts notify at bar close. Choose Plain Text for readable notifications with the signal, symbol, timeframe, histogram and MACD values, strength scores, the active levels for band events, and price, or JSON for webhook integrations. Divergence Alerts are on by default. The other four are off.
The separate Bull Signal and Bear Signal conditions also support Pine Screener filtering. Chart alerts using those conditions follow the frequency selected in TradingView’s dialog and don’t use the Plain Text or JSON setting. Choose once per bar close if you want them to wait for confirmation.
After enabling the alert choices you want, create one TradingView alert with the condition set to “Any alert() function call.”
🔍 PINE SCREENER SUPPORT
MACD X Velocity also works inside TradingView’s Pine Screener, letting you filter a watchlist for histogram conditions and signals before deciding which charts deserve a closer look. Pick MACD X Velocity as the screener’s indicator and you get nine columns to filter and sort:
- Signal: reads 1 when only bullish events fire on the current bar, -1 when only bearish events fire, 2 when both directions fire together, and 0 when nothing fires.
- Signal Code: a number that tells you which event fired most recently, using the list below. It keeps showing that number until a new event fires. If several events fire on the same bar, the column shows the one that ranks highest, with trend-state entries at the top of that ranking and zero-line crosses at the bottom. It shows 0 until the first event fires, and 19 when a bullish and a bearish event fire on the same bar.
- Bars Since Signal: how many bars ago the latest event fired.
- Velocity: the current histogram reading.
- OB/OS: reads 1 above the active Overbought level, -1 below the active Oversold level, and 0 between them.
- Trend: reads 2 for STRONG BULL, 1 for BULLISH, 0 for NEUTRAL, -1 for BEARISH, and -2 for STRONG BEAR.
- NET: the bull score minus the bear score, from -10 to +10.
- Flow: reads 1 when the histogram is above where it was three bars ago, -1 when below, and 0 when unchanged.
- Divergence: reads 1 when a bullish SmartDivergence pattern confirms on the bar, -1 when a bearish one confirms, and 0 when neither does.
► The Signal Code numbering:
- Codes 1 and 2: zero-line cross up and down
- Codes 3 and 4: Overbought entry and exit
- Codes 5 and 6: Oversold entry and exit
- Codes 9 and 10: Slope Reversal up and down (7 and 8 are not used)
- Codes 11 and 12: STRONG BULL and BULLISH entry
- Codes 13 and 14: STRONG BEAR and BEARISH entry
- Codes 15 and 16: 2-point divergence bull and bear
- Codes 17 and 18: 3-point divergence bull and bear
- Code 19: bullish and bearish events on the same bar
Bull Signal and Bear Signal let you filter for current bullish or bearish events, and both can match when the two directions fire together. The screener’s column picker lists every plot in the script. The nine above are the ones built for screening, and the rest are chart drawings and Data Window values. Screener outputs remain available with chart drawings and alerts switched off.
To compare a screener result with the chart, open that symbol on a matching timeframe with matching settings. The chart’s Data Window then shows the same nine values plus the Z-Score. Trend, NET, and Flow stay empty while the meter is warming up. Pine Screener uses the last 500 bars, so readings and bars-ago counts can differ from a chart with more history.
🎛️ INPUT SETTINGS (as they appear in the settings panel)
- MACD Velocity Settings: MACD Fast Length; MACD Slow Length; MACD Signal Length; Volatility-Normalized MACD (recommended)
- Price & Smoothing: Price Source; Smoothing Type; Volume-Weighted MACD; Price Smoothing Length
- Gap Filter: Gap Filter Mode; Gap Percentage to Exclude
- SmartLevels: OB/OS Mode; SmartLevels Sensitivity; SmartLevels Lookback; Fixed OB Level; Fixed OS Level; Show OB/OS Zone Glow
- PaintBar: PaintBar On; Solid PaintBar
- Visual Settings: Velocity Color Mode; Default Velocity Color; Bullish Color; Bearish Color; Velocity Bullish Up; Velocity Bullish Down; Velocity Bearish Up; Velocity Bearish Down; Gradient Bear (Strong); Gradient Bear (Weak); Gradient Mid (Zero); Gradient Bull (Weak); Gradient Bull (Strong); SmartLevels OB Band; SmartLevels OS Band; OB Zone Glow Color; OS Zone Glow Color
- Strength Meter: Show Strength Meter; Meter Position; Meter Text Size; Gauge Segment Width; Show FLOW Row (Velocity Slope); Show Z-Score Row; Strength Bull Color; Strength Bear Color; Strength Bull Mid Color; Strength Bear Mid Color; Z-Score Stretched Color; Strength Neutral Color; Meter Color
- SmartDivergence: Show Divergences; Divergence Panel; Show PinPoint Divergences Only; Show Three Point Divergences; Use Closing Price Pivots; Divergence Lookback Length; Velocity Left Pivot Strength; Price Left Pivot Strength; Velocity Right Pivot Strength; Price Right Pivot Strength; Bullish Divergence Threshold; Bearish Divergence Threshold; Bullish Divergence Color; Bearish Divergence Color; Divergence Trendline Size; Enhanced Divergence Visuals; Divergence Alerts
- Signals & Alerts: Zero-Line Cross Signals; Zero-Line Cross Alerts; OB/OS Crossover Signals; OB/OS Crossover Alerts; Slope Reversal Signals; Slope Reversal Alerts; Strength Meter Threshold Alerts; Alert Format
⚠️ LIMITATIONS AND DISCLAIMER
- Signals are designed for standard price charts and are not intended for Heikin Ashi, Renko, Kagi, Point & Figure, or Range charts.
- During a live bar, a forming signal can appear and disappear as the histogram moves. Once the bar closes, its signal state is fixed, confirmed divergence lines do not repaint or move, and all alerts fire only at bar close.
- Divergence detection is pivot-based. A divergence can only be identified once its right-side pivot completes, so its line appears a bar or more after the pivot itself. That delay is the mechanism, not a defect.
- The histogram’s return toward zero is a tendency, not a schedule. A stretched reading can stay stretched while a strong move keeps the MACD line pulling away from its signal line, so a band crossing is not a signal by itself.
- SmartLevels bands describe how the histogram has behaved recently. They do not forecast where it will go.
- SmartLevels and the Strength Meter need price history to initialize, so the earliest bars on a newly loaded symbol can show bands that are still settling and a meter that reads WARMING.
- The normalized scale is relative. The MACD spread is divided by current volatility, so a rising reading can reflect contracting volatility as well as a widening spread. Comparability across symbols is the design goal, not a statement about any single bar.
- Volume-Weighted mode depends on the quality of available volume data and is best suited to liquid instruments. When usable volume is unavailable, the script falls back to standard smoothing.
- MACD X Velocity is an analysis tool, not a signal service. Its outputs describe market conditions, do not constitute financial advice, and do not guarantee future results. Use independent judgment and risk management.
ملاحظات الأخبار
- Signal Preview: see signals while the current bar is still forming, instead of having to wait until it closes. Turn on “Preview Signals Before Close” (default is Off), but keep in mind a previewed signal can still appear or disappear before the close.
- Divergence Names: see which kind of divergence each line marks. Every line is named Div or PinPoint, with ▲ for bullish and ▼ for bearish, and a hover shows the two swings behind it. Set “Divergence Name Style” to “Filled Badge” (default is “Plain Text”) for small solid badges.
- Performance: profiled with TradingView’s Pine Profiler and optimized for faster loading.
🔷 3 Proprietary Toolkits, 40+ scripts, plus 1-on-1 calls with the founder who built them.
Learn more: chartwinners.com
For informational and educational purposes only. Past performance does not guarantee future results.
Learn more: chartwinners.com
For informational and educational purposes only. Past performance does not guarantee future results.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
🔷 3 Proprietary Toolkits, 40+ scripts, plus 1-on-1 calls with the founder who built them.
Learn more: chartwinners.com
For informational and educational purposes only. Past performance does not guarantee future results.
Learn more: chartwinners.com
For informational and educational purposes only. Past performance does not guarantee future results.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.