vladikislav

RSI and MACD Composite Score

vladikislav Actualizado   
Components of the Indicator

RSI Settings:
The RSI is set with a length parameter, which can be adjusted by the user but defaults to 14. This measures the speed and change of price movements.
MACD Settings:
The MACD is composed of two lines: the MACD line and the signal line, which are calculated from exponential moving averages (EMAs) of different lengths (fast and slow). The default settings are 9 for the fast length, 26 for the slow length, and 3 for the signal length.
The MACD histogram, which is the difference between the MACD line and the signal line, is also calculated.

Normalization and Combination

RSI Normalization: The RSI values are normalized around 0 by subtracting 50 from the RSI and then dividing by 50. This scaling adjusts the RSI to fluctuate around 0, where positive values indicate strength and negative values indicate weakness relative to the median RSI value of 50.
MACD Normalization: The MACD histogram is normalized by dividing it by the highest absolute value of the histogram over the slow length period. This adjustment scales the MACD histogram to fall between -1 and 1, making it comparable in magnitude to the normalized RSI.
Composite Score Calculation

The composite score is simply the sum of the normalized RSI and the normalized MACD histogram. This results in a combined score that reflects both momentum (from RSI) and trend (from MACD), providing a multifaceted view of market dynamics.

Visualization
The composite score is plotted as an oscillator, with a horizontal zero line that helps identify when the score shifts from positive to negative or vice versa.
The background color changes based on the trend: green if the composite score is above zero (bullish trend) and red if below zero (bearish trend).
Notas de prensa:
Components of the Indicator

RSI Settings:
The RSI is set with a length parameter, which can be adjusted by the user but defaults to 14. This measures the speed and change of price movements.
MACD Settings:
The MACD is composed of two lines: the MACD line and the signal line, which are calculated from exponential moving averages (EMAs) of different lengths (fast and slow). The default settings are 9 for the fast length, 26 for the slow length, and 3 for the signal length.
The MACD histogram, which is the difference between the MACD line and the signal line, is also calculated.

Normalization and Combination

RSI Normalization: The RSI values are normalized around 0 by subtracting 50 from the RSI and then dividing by 50. This scaling adjusts the RSI to fluctuate around 0, where positive values indicate strength and negative values indicate weakness relative to the median RSI value of 50.
MACD Normalization: The MACD histogram is normalized by dividing it by the highest absolute value of the histogram over the slow length period. This adjustment scales the MACD histogram to fall between -1 and 1, making it comparable in magnitude to the normalized RSI.
Composite Score Calculation

The composite score is simply the sum of the normalized RSI and the normalized MACD histogram. This results in a combined score that reflects both momentum (from RSI) and trend (from MACD), providing a multifaceted view of market dynamics.

Visualization
The composite score is plotted as an oscillator, with a horizontal zero line that helps identify when the score shifts from positive to negative or vice versa.
The background color changes based on the trend: green if the composite score is above zero (bullish trend) and red if below zero (bearish trend).
Notas de prensa:
Components of the Indicator

RSI Settings:
The RSI is set with a length parameter, which can be adjusted by the user but defaults to 14. This measures the speed and change of price movements.
MACD Settings:
The MACD is composed of two lines: the MACD line and the signal line, which are calculated from exponential moving averages (EMAs) of different lengths (fast and slow). The default settings are 9 for the fast length, 26 for the slow length, and 3 for the signal length.
The MACD histogram, which is the difference between the MACD line and the signal line, is also calculated.

Normalization and Combination

RSI Normalization: The RSI values are normalized around 0 by subtracting 50 from the RSI and then dividing by 50. This scaling adjusts the RSI to fluctuate around 0, where positive values indicate strength and negative values indicate weakness relative to the median RSI value of 50.
MACD Normalization: The MACD histogram is normalized by dividing it by the highest absolute value of the histogram over the slow length period. This adjustment scales the MACD histogram to fall between -1 and 1, making it comparable in magnitude to the normalized RSI.
Composite Score Calculation

The composite score is simply the sum of the normalized RSI and the normalized MACD histogram. This results in a combined score that reflects both momentum (from RSI) and trend (from MACD), providing a multifaceted view of market dynamics.

Visualization
The composite score is plotted as an oscillator, with a horizontal zero line that helps identify when the score shifts from positive to negative or vice versa.
The background color changes based on the trend: green if the composite score is above zero (bullish trend) and red if below zero (bearish trend).
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?