OPEN-SOURCE SCRIPT
Arithmetic Candles with Pivot Trend Signals

📘 Script Description
🕯️ Arithmetic Candles
Instead of using traditional candlesticks, this script calculates:
Arithmetic Open = Average of open and close
Arithmetic Close = Average of high and low
This candle provides a smoother, more averaged-out representation of price action.
Benefit: Filters out noise and reveals a more "true" price midpoint per candle.
🧭 Pivot Point Levels (Classic)
Classic pivot levels are calculated using the previous day's values:
Pivot (P) = (High + Low + Close) / 3
R1 / S1: First resistance/support levels
R2 / S2: Extended resistance/support levels
These lines mark key price levels that often act as support or resistance.
📈 Trend Signals
The script generates trend signals when a selected price source crosses above or below the pivot:
Bullish Signal (green arrow): When price crosses above the pivot
Bearish Signal (red arrow): When price crosses below the pivot
You can choose the signal source:
Either the regular close price
Or the Arithmetic Candle midpoint: (arithOpen + arithClose) / 2
🎨 Visual Representation
Candles are colored green when arithClose > arithOpen, otherwise red
Pivot lines are drawn if enabled
Triangles mark trend change signals (bullish or bearish)
✅ Use Case
In sideways markets, Arithmetic Candles help filter out noise
Pivot Levels provide clear price zones for potential breakouts or reversals
🕯️ Arithmetic Candles
Instead of using traditional candlesticks, this script calculates:
Arithmetic Open = Average of open and close
Arithmetic Close = Average of high and low
This candle provides a smoother, more averaged-out representation of price action.
Benefit: Filters out noise and reveals a more "true" price midpoint per candle.
🧭 Pivot Point Levels (Classic)
Classic pivot levels are calculated using the previous day's values:
Pivot (P) = (High + Low + Close) / 3
R1 / S1: First resistance/support levels
R2 / S2: Extended resistance/support levels
These lines mark key price levels that often act as support or resistance.
📈 Trend Signals
The script generates trend signals when a selected price source crosses above or below the pivot:
Bullish Signal (green arrow): When price crosses above the pivot
Bearish Signal (red arrow): When price crosses below the pivot
You can choose the signal source:
Either the regular close price
Or the Arithmetic Candle midpoint: (arithOpen + arithClose) / 2
🎨 Visual Representation
Candles are colored green when arithClose > arithOpen, otherwise red
Pivot lines are drawn if enabled
Triangles mark trend change signals (bullish or bearish)
✅ Use Case
In sideways markets, Arithmetic Candles help filter out noise
Pivot Levels provide clear price zones for potential breakouts or reversals
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt open-source
W duchu TradingView twórca tego skryptu udostępnił go jako open-source, aby traderzy mogli analizować i weryfikować jego funkcjonalność. Brawo dla autora! Możesz korzystać z niego za darmo, ale pamiętaj, że ponowna publikacja kodu podlega naszym Zasadom Społeczności.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.