OPEN-SOURCE SCRIPT

Volume Candle Colors RK

Zaktualizowano
A script that changes the color of the candle to blue when the volume of the current candle is more than 5 times the Average volume of the previous [x] number of candles on different timeframes. The color of the candle is grey when the volume is less than the average volume of the last [x] number of candles. In a bullish trend, color of the candle is green, and in a bearish trend, color is red. additionally the 9 EMA and the 20 EMA are on the chart. all these features are customizable and variable with different timeframes.


How It Works
Volume-Based Candle Coloring:

Blue Candle:
Checks if the current volume is greater than volumeMultiplier (e.g., 5x) the highest volume of the last nCandles.
Gray Candle:
Compares the current volume with the average volume over the last avgVolumePeriod candles.
If the current volume is lower, the candle is colored gray.
Trend-Based Candle Coloring:

Bullish Trend (Red Candle):
The current close price is greater than the SMA of the last trendPeriod candles.
Bearish Trend (Green Candle):
The current close price is less than the SMA of the last trendPeriod candles.
Exponential Moving Averages (EMAs):

9 EMA (short-term trend) helps identify quick price momentum shifts.
20 EMA (medium-term trend) smoothens price movements and identifies general market direction.
These EMAs can act as dynamic support and resistance levels.

How to Use


Apply this indicator to any chart (e.g., stocks, forex, crypto).
Adjust the timeframe and parameters to fit your trading strategy.
Interpretation:

Blue Candles indicate high activity moments (potential breakouts or reversals).
Gray Candles signify low activity, often seen in consolidation phases.
Red Candles confirm a bullish trend, suggesting potential buy opportunities.
Green Candles confirm a bearish trend, suggesting potential sell opportunities.
EMA Guidance:

Use the 9 EMA for quick decisions in fast markets.
Use the 20 EMA to confirm broader market trends and avoid whipsaws.
Informacje o Wersji
Small correction
Informacje o Wersji
small changes
Informacje o Wersji
This PineScript indicator changes candle colors based on specific volume conditions and market trends. It highlights high-volume candles in blue and low-volume candles in grey. When neither condition is met, bullish candles are colored green, and bearish candles are red. Additionally, it plots the 9-period EMA in orange and the 20-period EMA in black for trend identification.

How to Use
Customization: Adjust parameters like z (volume multiplier), x (number of past candles for volume comparison), and n (lookback for average volume) to align with your trading strategy.
Volume Analysis: Use the blue candles to identify significant volume surges and grey candles for low-volume consolidation.
Trend Identification: Use green and red candles to confirm the market's directional bias when volume conditions aren't met.
EMA: Use the 9 EMA (orange) and 20 EMA (black) for crossover signals or as dynamic support/resistance levels.
Timeframe: Choose an appropriate timeframe for your analysis. The indicator supports custom volume timeframes for added flexibility.
Informacje o Wersji
This Pine Script generates custom candle colors and integrates EMAs and Hull Moving Averages (HMA) with a band feature for enhanced trading insights. Below is a concise guide to understanding and using the script:
1. Custom Candle Coloring:
o High Volume & Bullish Candle: Blue.
o High Volume & Bearish Candle: Orange.
o Low Volume Candle: Gray. (When the volume is less than or equal to ¼ of average volume
o Bullish Candle: Green.
o Bearish Candle: Red.
2. Exponential Moving Averages (EMAs):
o Short EMA (default length: 9) plotted in orange.
o Long EMA (default length: 20) plotted in black.
3. Hull Moving Average (HMA):
o Supports three variations: Hma, Thma, and Ehma.
o Optional visualization as a band for floating support/resistance.
o Customizable length, thickness, and higher timeframe option.
o Trend color: Green (uptrend), Red (downtrend), or static orange.
4. Additional Features:
o Candle coloring based on Hull trend (optional).
o Alerts for Hull trend crossovers.
o Transparency and thickness adjustments for the Hull band.
How to Use:
1. Inputs:
o Configure multipliers for volume comparison, EMA lengths, and HMA variations under settings.
o Choose higher timeframe Hull MA and visualization options if required.
2. Volume Conditions:
o Set thresholds for identifying high and low volume candles.
3. EMA and HMA:
o Enable or customize these tools to fit your trading strategy.
4. Visuals:
o Adjust colors, line thickness, and transparency for personalized clarity.
5. Alerts:
o Use alertcondition to get notified of Hull trend changes.
6. Integration:
o Overlay the script on the chart to visualize custom candles, EMAs, and Hull MA with trends and support/resistance bands.
Informacje o Wersji
This strategy is designed to help traders identify important market movements and trends using clear visual cues through candle colors, trend lines, and a dynamic band.

What It Does
Identifies Significant Candles:

If the body of the current candle (difference between opening and closing price) is larger than all of the last 20 candles, it is highlighted in black. This signals a powerful move that might indicate a major shift in the market.
Highlights Volume Activity:

Candles with very high trading activity are highlighted:
Blue for strong upward candles.
Orange for strong downward candles.
Candles with very low activity are shaded gray to mark periods of low market interest.
Shows Market Trends:

Candles are colored green or red to reflect whether the price is generally moving upward or downward, helping to identify the current trend.
Hull Moving Average (HMA):

A colorful band based on the Hull Moving Average dynamically adjusts to reflect market momentum.
When the band turns green, it signals upward momentum.
When the band turns red, it indicates downward momentum.
The HMA band is useful for spotting trend reversals and strong directional moves.
How It Helps
This strategy provides:

A quick visual cue for powerful candles (black) that can indicate significant market moves.
Easy identification of high- and low-volume activity to assess the market’s interest.
Clear insight into the general market direction using trend colors and the Hull Moving Average band.
By combining these features, the strategy makes market trends and key moments visually intuitive, aiding traders in making confident decisions.


Updates - The logic checks if the current candle body is greater than the maximum body of the last 20 candles and assigns the color black only when the other two conditions (high_volume with bullish candle or bearish candle) are not true
Candlestick analysiscandlestickpatterncandlesticksignalsTrend AnalysistrendlineanalysistrendtradingvolumeanalysisvolumesVolume

Skrypt open-source

W prawdziwym duchu TradingView autor tego skryptu opublikował go jako open source, aby inwestorzy mogli go zrozumieć i zweryfikować. Pozdrowienia dla autora! Możesz go używać bezpłatnie, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Chcesz użyć tego skryptu na wykresie?

Wyłączenie odpowiedzialności