OPEN-SOURCE SCRIPT

Real-Time Custom Candle Range Color Indicator


The script allows the user to input a custom range value (default set to 100 points) through the userDefinedRange variable. This value determines the minimum range required for a candle to change color.
Calculating Candle Range:

The script calculates the range of each candle by subtracting the low from the high price.
Determining Bullish or Bearish Candles:

It checks whether the close price is higher than the open price to determine if a candle is bullish (isBullish variable).
Coloring Candles:

Based on the custom range input, the script changes the color of the candles:
If the candle's range is greater than or equal to the custom range and it is bullish, the candle color is set to blue (bullishColor).
If the range condition is met and the candle is bearish, the color is set to orange (bearishColor).
If the range condition is not met, the color is set to na (not applicable).
Plotting Colored Candles:

The plotcandle function is used to plot candles with colors based on the custom range and bullish/bearish conditions. The candles will have a higher z-order to be displayed in front of default candles.
Displaying High and Low Price Points:

Triangular shapes are plotted at the high and low price levels using the plotshape function, with colors representing bullish (blue) and bearish (orange) conditions.
In trading, this indicator can help traders visually identify candles that meet a specific range criteria, potentially signaling strength or weakness in price movements. By customizing the range parameter, traders can adapt the indicator to different market conditions and trading strategies. It can be used in conjunction with other technical analysis tools to make informed trading decisions based on candlestick patterns and price movements.
forecastingVolatilityVolume

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad