OPEN-SOURCE SCRIPT

Berma Rate Of Change [BROC]

The provided code is a TradingView Pine Script indicator for calculating the Rate of Change (ROC) over multiple time periods. It includes the following features:

1. **Inputs**: Users can select different lengths for the ROC calculation, including 10, 20, 40, 80, and 160 periods, as well as choose the data source (e.g., closing price).

2. **ROC Calculation**: The ROC is calculated for each specified period using the formula:
\[
ROC = 100 \times \frac{(current\_price - price[length])}{\left(\frac{(current\_price + price[length])}{2}\right)}
\]
This formula compares the current price with the price from the specified number of periods ago, normalized by the average of the two prices.

3. **Plotting**: The ROC values are plotted on the chart with colors indicating whether the ROC is positive (green) or negative (red). Each of the five ROC values is plotted separately.

4. **Zero Line**: A dashed horizontal line at zero helps identify the pivot point between upward and downward trends.

5. **Background Color**: The background color changes to a light green when all ROC values are positive and to light red when all ROC values are negative, providing immediate visual cues for overall trend conditions.

This indicator is useful for traders seeking to understand momentum and price changes over varying periods, giving insight into potential buy or sell signals.
Oscillatorsstatistics

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal