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

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항