OPEN-SOURCE SCRIPT

Custom RSI & MACD Momentum Entry Signals

Indicator Explanation: Custom RSI & MACD Momentum Entry Signals
Introduction

The "Custom RSI & MACD Momentum Entry Signals" indicator combines the Relative Strength Index (RSI) and the Moving Average Convergence Divergence (MACD) to generate precise long and short entry signals. This indicator offers a powerful combination of overbought/oversold zones, momentum analysis, and RSI-EMA crossovers to assist traders in making better decisions.
How the Indicator Works
1. RSI Calculation and EMA

The RSI is calculated based on the closing price with an adjustable period (default: 14).
An Exponential Moving Average (EMA) of the RSI (default: 9) is plotted to identify RSI trend changes.
When the RSI crosses its EMA upwards, it signals a bullish impulse. Conversely, a downward cross indicates a bearish impulse.

2. MACD Calculation and Momentum Shifts

The MACD line is derived from the difference between a fast EMA (default: 12) and a slow EMA (default: 26).

The Signal line is the EMA of the MACD line (default: 9).

The MACD histogram represents the difference between the MACD line and the Signal line.

Momentum shifts are detected as follows:
Weakening Bearish: Histogram is negative but increasing (less bearish pressure).
Strengthening Bullish: Histogram is positive and rising.
Weakening Bullish: Histogram is positive but decreasing.
Strengthening Bearish: Histogram is negative and falling.

Signal Generation
Long Signals

A Long signal is triggered when all of the following conditions are met:

The RSI was previously below 30 (oversold condition).
MACD momentum shifts from "strengthening bearish" to "weakening bearish" or turns bullish.
The RSI crosses its EMA upwards.

A green upward arrow is displayed below the bar, and the background is lightly shaded green for additional visualization.
Short Signals

A Short signal is triggered when all of the following conditions are met:

The RSI was previously above 70 (overbought condition).
MACD momentum shifts from "strengthening bullish" to "weakening bullish" or turns bearish.
The RSI crosses its EMA downwards.

A red downward arrow is displayed above the bar, and the background is lightly shaded red for additional visualization.
Visual Elements

RSI and EMA:
The RSI is shown in purple.
The RSI EMA is shown in blue.
Horizontal lines at 30 (oversold) and 70 (overbought) provide additional context.

MACD:
The MACD line is displayed in blue.
The Signal line is displayed in orange.
The zero line is added for easier interpretation.

Signals:
Green arrows: Long signals.
Red arrows: Short signals.
Background color: Light green for long conditions, light red for short conditions.

Use Cases

This indicator is ideal for:

Trend Followers: Combining RSI and MACD allows traders to identify entry points during impulsive trend shifts.
Swing Traders: Long and short signals can be used at reversal points to capture short-term price movements.
Momentum Traders: By considering MACD momentum, the indicator provides additional confidence in signal generation.

Customizable Settings

The indicator provides flexible input options:

RSI Period (default: 14)
RSI EMA Period (default: 9)
MACD Parameters: Fast, slow, and signal EMAs can be adjusted.

Conclusion

The Custom RSI & MACD Momentum Entry Signals indicator is a powerful tool for traders looking to combine RSI and MACD to identify high-probability entry signals. With clear visualization and precise signal generation, traders can make decisions more efficiently and capitalize on market movements.
Breadth Indicators

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?


Ngoài ra, trên:

Thông báo miễn trừ trách nhiệm