Squeeze Momentum with Signal Stats
- Indicatori
- Versione: 1.0
An independent MetaTrader 4 implementation of the TTM Squeeze method by John Carter, in the form popularised on TradingView by LazyBear ("Squeeze Momentum Indicator"). It was written from the published formula. Credit for the method goes to those authors.
Also available for MetaTrader 5 (free): https://www.mql5.com/en/market/product/212440
What it shows
- Squeeze dots on the zero line. Orange: the Bollinger Bands (20, 2.0) are inside the Keltner Channel (20, 1.5, true range), so volatility is compressed. Gray: both bands are outside the channel. Blue: neither.
- Momentum histogram: the value at the last bar of a 20-bar least-squares line through price minus the average of the 20-bar midrange and the 20-bar moving average. Four colors show above or below zero and rising or falling.
- Buy and Sell arrows. The signal used in this version: the first bar after a squeeze ends, in the direction of momentum. An input switches to momentum crossing zero instead.
Default inputs: Bollinger Bands 20 and 2.0, Keltner Channel 20 and 1.5 with true range, signal = squeeze release. Some charting versions use 1.5 for the Bollinger Bands as well; set the Bollinger multiplier to 1.5 if you want to compare with such a version.
Made for MetaTrader 4
- No repainting. A dot, a histogram bar and an arrow are final when their bar closes. Signals appear on the closed bar only.
- Alerts on a new signal: popup, sound only, push notification to the MetaTrader mobile app, or e-mail. Once per signal, on the closed bar. Optional alert when a new squeeze starts.
- Signal statistics panel. It buys at the open of the bar after a Buy signal, sells after a Sell signal, and closes and reverses at the opposite signal. It shows trades, win rate, the net result in money at your lot size after spread and commission, the result before costs, profit factor, average win and loss, longest losing streak, maximum drawdown, the open trade and the cost per trade. Click the header to fold it to one line; put it in any corner. Colors follow your chart, dark or light.
- Trade marks on the chart: hover a mark to see prices, exit reason and result.
- Optional daily session filter for the statistics, in your own time zone (overnight windows allowed), with session shading and an optional close at session end. Off by default.
- Works on any symbol and timeframe. Only new bars are calculated after the first load.
For EA developers
buffer 9 = momentum, 10 = momentum color (0 above zero and rising, 1 above zero and falling, 2 below zero and falling, 3 below zero and rising), 7 = Buy, 8 = Sell (0.0 on the signal bar, EMPTY_VALUE otherwise), 11 = squeeze state (1 = squeeze on, 0 = no squeeze, -1 = bands outside the channel). Simplest call with the default inputs: iCustom(NULL, 0, "Market\\Squeeze Momentum with Signal Stats", buffer, shift) . If you pass inputs, each separator line in the inputs counts as one parameter (pass an empty string for it). Values on the closed bar (shift 1) are final.
The panel describes what past signals would have done under the simple rule above, after the costs you set. It is not a backtest with stop-loss or take-profit, it is not a trading system and it says nothing about future results. Check the cost line first: on 1 to 5 minute charts the spread and commission per trade are often large compared with the average move between two signals.
This is a visual tool. It does not place trades and does not predict prices. Test any rule built on it before you trade with it.
