Buy and Sell Signals
Sep 19, 2025

The Buy and Sell Signals indicator identifies potential market entry and exit points by combining MACD momentum crossovers with RSI overbought filters and convergence analysis. It aims to provide traders with a multi-layered approach to trend-following by distinguishing between standard momentum shifts and specific convergence-based entries.
Usage
The script identifies two distinct types of bullish entries and one standard bearish exit:
- MACD Convergence Buy: Triggered when a bullish MACD crossover occurs after the distance between the MACD and Signal lines has been decreasing for several bars while remaining below the Signal line. This suggests a strengthening momentum shift.
- Simple MACD+RSI Buy: Triggered by a standard bullish MACD crossover, provided the RSI is below the user-defined overbought threshold.
- Bearish Sell Signal: Triggered whenever the MACD line crosses below the Signal line, indicating a potential loss of bullish momentum.
Users can toggle specific labels on or off to clean up the chart or focus on higher-probability convergence setups. An on-screen status table provides real-time data on current RSI levels, crossover status, and whether convergence logic is currently active.
Details
The indicator calculates the distance between the MACD and Signal lines over a 3-bar lookback period. Convergence is defined as a sequence where the distance between these two lines is strictly decreasing (dist3 > dist2 > dist1) while the MACD remains below the Signal line. This logic is used to identify "squeezes" before a breakout. The inclusion of an RSI filter (RSI < Threshold) ensures that buy signals are not generated during periods of extreme overextension.
Settings
MACD & RSI
- MACD Fast Length: The period for the short-term EMA used in MACD calculation.
- MACD Slow Length: The period for the long-term EMA used in MACD calculation.
- MACD Signal Length: The smoothing period for the MACD Signal line.
- RSI Length: The lookback period for the Relative Strength Index.
- RSI Overbought Threshold: The level used to filter out buy signals (default 70).
Visibility & Filters
- Enable RSI < Overbought Filter: Toggles whether buy signals require the RSI to be below the overbought threshold.
- Enable MACD Convergence Buy Labels: Toggles the display of labels for convergence-based entries.
- Enable Simple MACD+RSI Buy Labels: Toggles the display of standard crossover-based entries.
- Show Status Table: Toggles the on-screen dashboard showing real-time technical metrics.
FAQ
How do I access Buy and Sell Signals?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What is the difference between a "Convergence Buy" and a "Simple Buy"?
A Simple Buy only requires a MACD crossover and favorable RSI, while a Convergence Buy requires the MACD and Signal lines to be actively narrowing before the crossover, which often indicates a more controlled momentum shift.
Can I set alerts for these signals?
Yes, the script includes built-in alert conditions for Convergence Buy signals, Simple Buy signals, and Bearish Sell crossovers.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.