The TTM Squeeze is a popular indicator that looks to identify potential breakouts for a stock. With the addition of Webhooks, we can now combine automation with external trading platforms and custom indicators to take advantage of unique trading opportunities.
In this article, we’ll explore how the Squeeze indicator works and how we can use it to trigger automations in Option Alpha using webhooks and TradingView alerts. Once the alert triggers, the webhook is called and the automation can open a position using the buy or sell signal.
Squeeze Indicator
The Squeeze Indicator combines Bollinger Bands (BB) and Keltner Channels (KC) to identify squeeze conditions in the market. Inspired by other popular Squeeze indicators, this customized version includes enhanced features and distinct color coding to improve clarity and usability.
The original ‘TTM Squeeze’ indicator, developed by John Carter, is a momentum-based indicator highlighting periods of consolidation that are likely to precede significant price moves to signal potential opportunities.
The Squeeze Indicator is intended to detect periods when the market is in a tight trading range (squeeze) and signal potential breakout opportunities. This can be a powerful tool for traders looking to signal trades after periods of consolidation and before impending volatility in the market.
Key components of the Squeeze Indicator
- Bollinger Bands (BB)
• Calculated using a simple moving average (SMA) and standard deviation.
• Bands are set at a default length of 20 periods and a multiplier of 2.0. - Keltner Channels (KC)
• Calculated using an exponential moving average (EMA) and average true range (ATR).
• Channels are set at a default length of 20 periods and a multiplier of 1.5. - Squeeze Condition
• Squeeze On: Occurs when the Bollinger Bands are within the Keltner Channels, indicating low volatility and a potential squeeze.
• Squeeze Off: Occurs when the Bollinger Bands expand beyond the Keltner Channels, signaling a possible release of volatility. - Momentum Oscillator:
• Uses a linear regression of the source price, adjusted by the average of the highest high and lowest low over a specified period.
• Plots a histogram that visually represents momentum, helping to confirm the direction of the potential breakout.
Bollinger Bands measure market volatility and are plotted at a standard deviation level above and below a simple moving average.
Keltner Channels use the average true range (ATR) to set channel distance, which is plotted around an exponential moving average.
The Squeeze fires when the Bollinger Bands move inside the Keltner Channels, indicating a period of low volatility and consolidation. When the Bollinger Bands move outside the Keltner Channels, the squeeze has "fired," suggesting that a significant price move may imminent.
Features of the Squeeze Indicator
- Dynamic color coding
• Positive Momentum: Green shades.
• Negative Momentum: Blue shades.
• Squeeze Indicators:
Blue for no squeeze; Black for squeeze on; Gray for squeeze off - Alerts for squeeze release
• Squeeze Release Up: Triggers an alert when the squeeze condition transitions from on to off, indicating potential upward breakout.
• Squeeze Release Down: Triggers an alert when the squeeze condition transitions from off to on, indicating potential downward breakout.
How traders use the Squeeze Indicator
- Identifying Breakouts: Helps traders spot potential breakouts before they happen.
- Volatility Analysis: Measures market volatility effectively, helping traders understand market conditions.
- Momentum Detection: Assesses the strength and direction of price movements.
- Flexibility: Can be used in various markets and timeframes.
How to set up Alerts in TradingView
To automate your trading strategy using the Squeeze indicator and Option Alpha, you need to set up alerts in TradingView and connect them to Option Alpha using webhooks.
Add the Squeeze Indicator to Your Chart
- Open TradingView and load your chart.
- Search for and add the Squeeze indicator from the indicators library.
Create Alerts for the Squeeze Indicator
- Click on the "Alerts" button (clock icon) at the top of the screen.
- Set up an alert for when the squeeze fires (e.g., when the black dots turn to grey dots).
- Configure the alert conditions.
How to set up Webhooks in TradingView
Use Option Alpha’s webhooks to send alerts to your bots and trigger an automation to open a position.
Create a Webhook in Option Alpha
You can create a new webhook URL inside your Option Alpha Settings:
Or when creating a New Automation in a bot's Settings tab (you can also use an existing webhook; webhooks can be used in multiple bots):
Add the unique Webhook URL to the TradingView alert
- In the alert's notifications window select "Webhook URL"
- Copy your unique Option Alpha webhook URL and paste it into the alert
Example webhook URL setup:Â https://app.optionalpha.com/api/webhook/your-webhook-url
Configure your Option Alpha automations
Once your TradingView alerts are set up to send webhooks, configure Option Alpha to receive these alerts and trigger corresponding automations. Create a bot or add the automations to an existing bot using the webhook trigger. This will ensure that each webhook for the Up vs. Down squeeze signal triggers your desired actions.
Example automation workflow
Set Up Squeeze Alert in TradingView
- Condition: Squeeze indicator firesÂ
- Action: Send webhook to Option Alpha with a buy signal
Configure Option Alpha Automation
- Webhook Trigger: Receive buy signal from TradingView
- Action: Automation runs and executes and opens a bullish position
*Option Alpha is not affiliated with TradingView and does not endorse any specific strategy, indicator, or alert. Additional fees may be required to use TradingView. Option Alpha is not responsible for any data latency issues inside TradingView.