Real Time Squeeze Momentum TMT
- Indicateurs
- Version: 1.0
- Activations: 20
TMT Squeeze Momentum - Volatility Squeeze Dots, Momentum Histogram, Strength Panel and Alerts for MetaTrader 4
Squeeze ON / OFF dots | Linear-regression momentum histogram | Buyers vs Sellers strength % | Popup, sound, push and email alerts
1. Overview
TMT Squeeze Momentum is an indicator for MetaTrader 4 that runs in its own sub-window below the price chart. It answers two questions at the same time:
- Is volatility compressing? Dots on the zero line show whether the market is in a "squeeze", where Bollinger Bands sit inside the Keltner Channel, or whether the squeeze has been released.
- Which side has the momentum? A histogram shows the momentum direction and size. Lime bars above zero mean buyers are stronger, and red bars below zero mean sellers are stronger.
A text panel in the corner of the window summarizes the same information in words: who is stronger, how strong that side is compared with recent bars, whether the momentum is gaining or fading, and the current squeeze state. Alerts can notify you when the momentum crosses the zero line or when a squeeze fires.
The indicator is inspired by the well-known Squeeze Momentum concept (John Carter's TTM Squeeze). It analyzes price only. It does not open, close or modify trades.
2. The Idea Behind the Squeeze
Markets alternate between quiet periods, when price moves in a narrow range, and active periods, when price moves more. Many traders watch for the end of a quiet period, because a move often follows compression. The squeeze is a simple way to measure that compression by comparing two envelopes around price:
- Bollinger Bands widen and narrow with the standard deviation of price.
- Keltner Channel is based on the average range of the candles.
When the volatility measured by the Bollinger Bands drops so far that the bands fit inside the Keltner Channel, the market is compressed. That is a Squeeze ON. When the bands move back outside the channel, the compression has been released. That is a Squeeze OFF, often called the squeeze "firing".
The squeeze itself does not say whether price will go up or down. That is why it is combined with the momentum histogram, which shows the side that currently has the upper hand.
3. What You See in the Indicator Window
3.1 The momentum histogram
- Lime bars above zero: momentum is positive. The panel says BUYERS STRONGER.
- Red bars below zero: momentum is negative. The panel says SELLERS STRONGER.
- Taller bars mean larger momentum compared with the middle of the recent range. Bars that shrink toward zero show momentum fading.
Optionally, the indicator can use dimmer colors when momentum is weakening: dark green for buyers losing strength and maroon for sellers losing strength. This is switched off by default.
3.2 The squeeze dots on the zero line
- Black dot: Squeeze ON. Volatility is compressed.
- Gray dot: Squeeze OFF. The compression has been released.
- Blue dot: no squeeze. The bands are neither fully inside nor fully outside the channel.
Black dots are hard to see on a black chart background. If you use a dark chart, change the Squeeze ON color in the inputs to a brighter one, for example white or orange.
3.3 The text panel
The panel has two lines:
- Line 1: BUYERS STRONGER, SELLERS STRONGER or NEUTRAL, followed by a strength percentage.
- Line 2: whether that side is "gaining" or "fading", followed by the squeeze state: SQUEEZE ON, SQUEEZE OFF (fired) or No squeeze.
The strength percentage compares the current momentum with the largest momentum seen over the last 100 bars by default (this look-back is adjustable). For example, "BUYERS STRONGER 63%" means the current positive momentum is 63% of the largest absolute momentum value in that window. It is a relative measure, so it is useful for comparing the present with recent history on the same chart, not for comparing different symbols.
The panel uses the most recent bar and refreshes with each tick. It can be placed in any of the four corners of the indicator window, with its own offsets and font size.
4. How the Values Are Calculated
Momentum histogram. For the chosen length N (the Keltner length, default 20):
- Find the highest high and the lowest low of the last N bars, and take their midpoint.
- Take the simple moving average of the close over the last N bars.
- Average those two values. This is the reference line.
- The delta is the close minus that reference line.
- The histogram value is the linear regression of the delta over the last N bars, taken at the most recent bar.
This produces a smooth momentum line that crosses zero when price moves from below to above the middle of its recent range, and the other way around.
Bollinger Bands. The basis is the simple moving average of the close over the BB length, and the band distance is a multiplier times the standard deviation. With the default setting "Use original deviation", the multiplier used is the Keltner multiplier (1.5), which mirrors the commonly used original script. Turn that option off to use the separate BB multiplier input (2.0 by default).
Keltner Channel. The basis is the simple moving average of the close over the KC length. The channel distance is the KC multiplier (1.5 by default) times the average range over the KC length. The range is the True Range by default, or the plain high-low range if you switch that option off.
Squeeze states.
- Squeeze ON: the lower Bollinger Band is above the lower Keltner line and the upper Bollinger Band is below the upper Keltner line.
- Squeeze OFF: the lower Bollinger Band is below the lower Keltner line and the upper Bollinger Band is above the upper Keltner line.
- No squeeze: neither of the above.
5. Alerts
You can choose which events create alerts and how you are notified.
Events
- Buyers or sellers take over: the histogram crosses above zero (buyers) or below zero (sellers).
- Squeeze fired: the previous bar was in a Squeeze ON and the evaluated bar is not. The alert text also says whether the momentum at that moment is bullish, bearish or neutral.
- Squeeze ON: the market has just entered a squeeze. This one is off by default.
Notification channels
- Popup alert window (on by default)
- Sound with a file name of your choice (on by default, using alert.wav)
- Push notification to the MetaTrader mobile app (off by default)
- Email (off by default)
By default, alerts are evaluated on the last closed bar, so they are based on a completed candle and not on a candle that is still forming. If you turn that option off, the current bar is evaluated, which is faster but can alert on moves that reverse before the candle closes. Each type of alert is sent once per bar.
To use push notifications or email, you must first set up notifications and email in the MetaTrader terminal options.
6. Input Reference
Squeeze settings
- BB Length (default 20): period of the Bollinger Bands.
- BB multiplier (default 2.0): Bollinger deviation multiplier. It is only used when "Use original deviation" is off.
- KC Length (default 20): period of the Keltner Channel. It also sets the length of the momentum calculation.
- KC multiplier (default 1.5): Keltner multiplier.
- Use True Range (default on): use True Range instead of the high-low range for the Keltner Channel.
- Use original deviation (default on): use the Keltner multiplier for the Bollinger deviation, as in the original script.
Display
- Buyer color / Seller color: colors of the positive and negative histogram bars (lime and red by default).
- Show strength shade (default off): use dimmer colors when momentum is weakening.
- Buyers weakening / Sellers weakening colors: colors used by the option above.
- No squeeze / Squeeze ON / Squeeze OFF colors: colors of the dots (blue, black and gray by default).
- Strength look-back (default 100): number of bars used for the strength percentage.
- Show panel text, panel position, X and Y offsets, font size: control the text panel.
Alerts
- Alert on closed bar only (default on).
- Alert on buyers/sellers flip (default on).
- Alert on squeeze fired (default on).
- Alert on squeeze ON (default off).
- Popup, sound, sound file, push, email: notification channels.
7. Installation
- In MetaTrader 4, open File > Open Data Folder.
- Copy the indicator file into MQL4 > Indicators.
- If you have the .mq4 source, open it in MetaEditor and press Compile (F7).
- In the terminal, right-click Navigator > Indicators and choose Refresh.
- Drag the indicator onto a chart. It opens in a separate sub-window. Adjust the inputs if you wish and press OK.
The indicator needs enough history on the chart: at least three times the KC Length plus a few bars. If the window looks empty, scroll the chart back or load more history.
8. Practical Ways to Read It
These are common ways of reading a squeeze and momentum tool. They are not signals and they are not guaranteed.
- Wait for the release. A series of black dots means compression. The first gray dot after them marks the release. Look at the histogram at that moment for the side with momentum.
- Use momentum as direction. Lime and rising means buyers are gaining. Lime but shrinking means buyers are fading, which some traders treat as a caution sign. The same applies in reverse for red bars.
- Combine with structure. Many traders confirm with support and resistance, trend direction on a higher timeframe, or their own entry rules.
- Manage risk first. Decide your stop, position size and target before you act. A squeeze can fire and fail, and momentum can reverse.
9. Notes for Developers
The indicator has 8 buffers that can be read with iCustom:
- Buffer 0: buyers histogram (values above zero). Buffer 1: sellers histogram (values below zero).
- Buffer 2: buyers weakening. Buffer 3: sellers weakening. These are only filled when the strength shade option is on.
- Buffer 4: no-squeeze dot. Buffer 5: Squeeze ON dot. Buffer 6: Squeeze OFF dot. When a dot is active the value is 0.0.
- Buffer 7: internal calculation buffer, not for use.
Empty values mean there is nothing to show on that bar.
10. Limitations
- The current candle can change. The histogram, dots and panel use the live close of the forming candle, so they can change until it closes. Use closed-bar alerts for confirmed events.
- It is a lagging tool. The momentum is based on past prices, so it follows the move and does not predict it.
- Direction is not given by the squeeze. A squeeze shows compression, not the direction of the next move.
- Settings matter. Different markets and timeframes behave differently, so test the settings on a demo account first.
- Broker data differs. Different brokers have different history and spreads, so values can differ slightly.
11. Frequently Asked Questions
Does the indicator trade for me? No. It displays information and sends alerts. You place and manage your own trades.
Why can't I see the black dots? They are black on purpose, as in the classic squeeze display, and may be invisible on a black background. Change the Squeeze ON color in the inputs.
Why does the BB multiplier input do nothing? With "Use original deviation" on (the default) the Bollinger bands use the Keltner multiplier. Turn that option off to use the BB multiplier.
What does the percentage in the panel mean? It compares the current momentum with the largest momentum in the last look-back bars. 100% means the strongest reading in that window.
Which markets can I use it on? Any symbol and timeframe available in your MetaTrader 4.
Can I get notifications on my phone? Yes. Turn on push notifications in the inputs and set up notifications in the terminal options with your MetaQuotes ID.
12. Credits and Risk Disclaimer
This indicator is inspired by the Squeeze Momentum concept (TTM Squeeze by John Carter). All trademarks belong to their respective owners.
Risk warning. Trading foreign exchange, CFDs, metals, indices and cryptocurrencies involves a high level of risk and may not be suitable for everyone. You can lose some or all of your capital. This indicator is an analytical tool that displays information based on past price data. It does not predict the future, does not guarantee profits and is not financial advice. Test on a demo account first, use proper risk management, and never risk money you cannot afford to lose.
