Custom EMAs, SMA y VWAP con Puntos en CrucesHighly configurable moving average indicator for each person's trading strategy.
Moving Averages
TW SMAa Simple Moving Average (SMA) with a glowing effect. The logic behind this script can be broken down into the following key components:
The result is an SMA with a smooth glowing effect, making it easier to visualize trend direction.
The color change in the SMA itself provides clear bullish and bearish indications.
The glow layers create an appealing and intuitive representation of price movement relative to the SMA.
Average Price Bar (APB) with Dynamic EMATrading Made Simple: APB + Dynamic EMA with Stochastic (8,3,3) Strategy
Introduction
The "Trading Made Simple" strategy, originally developed by BigE on ForexFactory in 2011, is a powerful yet straightforward approach to trading that combines price action, moving averages, and momentum indicators to identify high-probability setups. This enhanced version integrates:
Average Price Bar (APB) – A smoothed candlestick representation that filters market noise.
Dynamic EMA (5-period, HLC3-based) – Acts as a trend filter, changing color based on its position relative to price.
Stochastic (8,3,3) – A fast momentum oscillator to confirm overbought/oversold conditions.
Core Trading Rules (BigE's Original Concept)
Trend Direction: The EMA defines the trend (bullish if price is above, bearish if below).
Stochastic Confirmation:
Long Trades: Look for Stochastic crossing up from oversold (<20) while price is above the EMA.
Short Trades: Look for Stochastic crossing down from overbought (>80) while price is below the EMA.
APB as Entry Confirmation:
A bullish APB close above the EMA strengthens long signals.
A bearish APB close below the EMA strengthens short signals.
Why This Combination Works
APB + EMA provides a clean trend bias, reducing false signals.
Stochastic (8,3,3) adds momentum confirmation, ensuring entries are timed well.
The background color shift (green/red) makes trend reversals visually intuitive.
This system is ideal for swing traders and day traders looking for a rule-based, discretionary approach that removes emotional decision-making while keeping trading simple and effective.
PARKER Currency Strength with RESETS v 3.00PARKER Currency Strength v3.00 is a comprehensive multi-currency strength indicator designed for Forex traders who want detailed insights into major currency performance. Here are some of its key features:
Customizable Session Resets:
The indicator supports automatic resets of currency strength calculations at the start of each major market session (Sydney, Tokyo, London, and New York). You can also enable a custom reset with a user-defined reset time and name.
User-Defined Market Hours:
With the new "Market Settings" section, you can set the open and close times for each market (Sydney, Tokyo, London, and New York) using hour and minute inputs. This allows you to tailor the session times to your local time zone or trading preferences.
Session Shading and Labels:
The background color of the indicator pane changes based on the active market session. Labels are generated at the start of each session to provide clear visual cues. Market session labels and times are also displayed on the chart for quick reference.
Dual Mode Display:
In addition to the reset-based currency strength calculations, the indicator can plot "normal" (continuous) currency strength lines at 50% transparency, allowing you to compare different calculation methods side by side.
Fully Customizable Appearance:
Customize line colors, widths, and offsets for each currency pair via user inputs, enabling a personalized and clear display that fits your trading style.
This indicator is ideal for Forex traders who require a dynamic and highly customizable tool to monitor currency strength, adapt to different market sessions, and make informed trading decisions based on real-time performance data.
EMA + RSI + MACD + Support & Resistance Combined StrategyStrategy: Enhanced EMA + RSI + MACD + Support & Resistance
This strategy combines multiple technical indicators to create a robust system for identifying market opportunities. By leveraging Exponential Moving Averages (EMA), Relative Strength Index (RSI), and Moving Average Convergence Divergence (MACD) for trend confirmation, along with Support and Resistance levels to trigger breakout trades, this strategy aims to capture both trending and breakout movements.
Indicators Used:
EMA (5, 20, 50, 200): Helps identify the prevailing market trend, with short-term EMAs crossing longer-term ones as signals of trend shifts.
RSI (14): Confirms whether the market is in a bullish (RSI > 50) or bearish (RSI < 50) zone, adding additional filter to entries.
MACD (12, 26, 9): Used to confirm the momentum, where a MACD line crossing above the signal line indicates a bullish signal and vice versa for bearish.
Breakout Strategy (Support & Resistance):
Support & Resistance levels are dynamically calculated based on a user-defined period.
Buy Condition: Triggered when price breaks above resistance and confirms bullish indicators (EMA, RSI, MACD).
Sell Condition: Triggered when price breaks below support and confirms bearish indicators (EMA, RSI, MACD).
Exits & Risk Management:
Trailing Stop: A trailing stop is applied to lock in profits as the price moves in favor of the trade. The stop is dynamically adjusted with the market price, providing better protection during strong trends.
Stop Loss: The stop loss is set at key support and resistance levels to ensure a safe exit if the market moves against the trade.
This strategy aims to provide more frequent entries, take advantage of breakouts, and effectively manage risk with trailing stops. It is suitable for traders looking to capture both trends and breakouts across various timeframes.
Daily EMA Cloud on Smaller TimeframesI like to see the daily ema cloud on my intraday charts. This indicator lets you see the daily ema cloud on the any intraday chart. The ema lengths and colors are adjustable.
MDTrader DashboardMDtrader Script that looks at moving averages, weekly and daily levels to help guide the trading day and establish a bias
Global Foreigners SMA, WMA IndicatorThis Indicator is a custom technical analysis tool designed to overlay multiple moving averages on a price chart, helping traders analyze price trends and potential trading opportunities.
It features both a Simple Moving Average (SMA) and Weighted Moving Averages (WMAs) with different period settings.
Key Features:
1. SMA and WMA Calculations:
- SMA 1: A simple moving average (SMA) calculated over a user-defined period (default: 1).
- WMA 1 - WMA 5: Five weighted moving averages (WMA) with different periods (5, 10, 20, 30, 40). WMAs give more importance to recent price movements, helping to identify short-term trends.
2. Customizable Periods:
- The indicator allows users to adjust the lookback period for each moving average via input settings.
3. Color-Coded Moving Averages:
- Each moving average is assigned a unique color for easy differentiation:
- SMA 1 → Black
- WMA 1 (5-period) → Blue
- WMA 2 (10-period) → Peach
- WMA 3 (20-period) → Orange
- WMA 4 (30-period) → Lavender
- WMA 5 (40-period) → Purple
4. Line Thickness:
- Each moving average is plotted with a line width of 2, making them clearly visible on the chart.
How This Indicator is Used:
Trend Analysis:
The alignment of the WMA sequence (e.g., WMA 5 > WMA 4 > WMA 3 > WMA 2 > WMA 1) can
indicate a bullish trend.
The opposite alignment suggests a bearish trend.
Dynamic Support & Resistance:
Shorter-period WMAs (5 & 10) react faster to price changes and can be used as dynamic
support or resistance levels for short-term trades.
Longer-period WMAs (20, 30, 40) smooth out price fluctuations and are useful for detecting
long-term trends.
Signal Confirmation:
The SMA 1 acts as a quick price reference, and traders can look for crossovers between the
WMA lines to confirm trend changes.
Who Can Use This Indicator?
Scalpers & Day Traders:
The faster WMAs (5 & 10) can be used to catch quick price reversals.
Swing Traders & Position Traders:
The combination of short-term and long-term moving averages helps identify key trend
shifts.
Algorithmic Traders:
Can be used alongside other indicators for automated signal generation.
This indicator is not a buy/sell signal generator but rather a trend-following tool that helps traders visually interpret market movements using moving averages. It works well when combined with momentum indicators (e.g., MACD, RSI) to confirm entry and exit points.
SignalCore AI: Double Cloud SMA📈 SignalCore AI: Double Cloud SMA
Visualize market strength through multi-layered precision
The Double Cloud SMA is a visual and strategic module within the SignalCore AI framework, designed to highlight key price zones using two Simple Moving Average (SMA) bands combined with dynamic standard deviation projections.
🧠 What this script does:
Plots two SMA-based “clouds” (short-term and long-term), projecting upper and lower bands based on volatility.
Highlights Buy and Sell Zones (including “Strong” levels) using intuitive visual fills between key lines.
Helps identify compression areas, potential reversals, and trend continuation points.
🔍 Core Components:
Short-term SMA cloud: captures fast market movements.
Long-term SMA cloud: acts as a macro trend filter.
Volatility-based band projections (25% to 125%) create dynamic zones of interest.
Visual mapping of Buy Zones, Sell Zones, Strong Buy/Sell areas.
💼 Ideal for:
Scalpers, day traders, and swing traders who rely on moving averages.
Traders who use confluence strategies with RSI, Bollinger Bands, SAR, etc.
Anyone who wants clearer, smarter decision points on the chart.
⚙️ Customizable Inputs:
Short SMA Period: 224 (default)
Long SMA Period: 3320 (default)
Offset control for projecting into future or past bars
🔔 Pro Tip: Combine this script with other SignalCore AI modules for a complete multi-dimensional market view.
📩 For feedback, custom versions, or collaborations, feel free to reach out to the author.
www.youtube.com
Crypto MA Cross StrategyBuy with MA crossover. Take profit when price reaches your percentage target. Stops at defined percentage below the buy price
SMA 12, 36, 200 with Signals and AlertsFeatures:
✅ Simple Moving Averages:
SMA 12 (short-term)
SMA 36 (mid-term)
SMA 200 (long-term trend filter)
✅ Buy & Sell Signals:
Buy: When SMA 12 crosses above SMA 36
Sell: When SMA 12 crosses below SMA 36
✅ Built-in Alerts:
Receive real-time alerts when a signal is triggered.
🧠 Strategy Overview – Multi-Timeframe Trading
This script is designed to be used with multi-timeframe analysis:
1H Chart – Trend Direction
If the price is above the SMA 200 on the 1-hour chart → look for Long opportunities.
If the price is below the SMA 200 on the 1-hour chart → look for Short opportunities.
5-Min Chart – Entry Timing
Once the higher-timeframe trend is clear, switch to the 5-minute chart.
Use SMA 12 and SMA 36 crossovers to time your entry in the direction of the main trend.
This approach helps filter out false signals and improves overall trade accuracy.
5-Min EMA (5 & 20) + RSI + MACD StrategyThis strategy uses a combination of Exponential Moving Averages (EMA), Relative Strength Index (RSI), and the Moving Average Convergence Divergence (MACD) to identify potential buy (bullish) and sell (bearish) signals on a 5-minute intraday chart_______________By Million mantra Telugu
MA CloudsMA Clouds – Adaptive Moving Average Visualization (with Bollinger bands)
The MA Clouds indicator is designed to help traders visualize multiple moving averages simultaneously, providing a dynamic view of trend direction, momentum, and potential support/resistance zones. This tool overlays Simple Moving Averages (SMA) and Exponential Moving Averages (EMA) in an easy-to-read cloud format, allowing traders to interpret market structure at a glance.
Key Features:
✅ Customizable Moving Averages – Adjust SMA and EMA lengths to suit your strategy.
✅ Cloud-Based Visualization – Color-coded clouds between different moving averages highlight areas of potential trend shifts.
✅ Toggle Price Lines – Option to enable or disable individual price lines for a cleaner chart.
✅ Bollinger Bands Integration – Adds upper and lower bands for additional confluence in volatility analysis.
✅ Quick Trend Identification – Helps traders gauge short-term and long-term trend strength.
✅ Preset View Modes – Toggle between a simplified 5-10 SMA/EMA setup or a full multi-timeframe cloud setup with one click.
This indicator is ideal for traders looking to combine trend-following strategies with dynamic support/resistance insights. Whether you're scalping intraday moves or managing longer-term swing trades, MA Clouds provides an efficient way to keep market structure in focus.
EMA Trend Signal📈 EMA Trend Signal - Multi-Timeframe EMA Trend Indicator
Overview
The EMA Trend Signal indicator uses 7 Exponential Moving Averages (EMA) to identify market trends and provides Buy (BUY) / Sell (SELL) signals to help traders capture trend movements.
🔍 Features
✅ Bullish Alignment:
When the shorter-period EMAs are above the longer-period EMAs, the market is in a bullish trend. The EMAs will be displayed in Aqua, and a BUY signal will appear when the trend shifts.
✅ Bearish Alignment:
When the shorter-period EMAs are below the longer-period EMAs, the market is in a bearish trend. The EMAs will be displayed in Red, and a SELL signal will appear when the trend shifts.
✅ Neutral Trend:
If the EMAs are not clearly aligned, the EMAs will be displayed in Blue, indicating a ranging market or unclear trend.
✅ Buy/Sell Signals:
BUY Signal: When a bullish alignment occurs and the trend has just formed, a green upward arrow (BUY) appears below the candlestick.
SELL Signal: When a bearish alignment occurs and the trend has just formed, a red downward arrow (SELL) appears above the candlestick.
🎯 Suitable Markets
✅ Forex
✅ Gold
✅ Crypto
✅ Stocks
✅ Futures
🚀 Trading Strategy Recommendations
1️⃣ Only enter trades when the trend is clearly defined; avoid trading during ranging conditions.
2️⃣ Combine this indicator with support/resistance levels, volume, and candlestick patterns to optimize entry and exit points.
3️⃣ Best suited for short- to medium-term trading. Can be used alongside RSI, MACD, or other indicators.
📌 Risk Warning : This indicator is for technical analysis purposes only and does not constitute financial advice. Always use stop-loss orders!
Adaptive ROC-Based Trading Strategy
Developed a quantitative trading strategy leveraging Rate of Change (ROC) and RSI for momentum-based entries.
Implements adaptive ROC thresholds to filter noise and enhance signal accuracy.
Dynamically adjusts position entries using a hybrid mean-reversion and trend-following approach.
Integrates Cobra Metrics for performance visualization, enabling real-time strategy evaluation.
Optimized for efficient execution and minimal computational overhead in TradingView.
Let me know if you want to highlight specific improvements or add more detail!
[VectorAlgo] Smart Momentum OscillatorThe Smart Momentum Oscillator (SMO) is a powerful indicator that combines RSI, MACD, and Volume to provide enhanced trend confirmation. This unique approach helps traders make better-informed decisions by filtering out false signals and increasing reliability in market momentum analysis.
- RSI Integration: Measures relative strength with a 50-centerline.
- MACD Histogram Influence: Identifies trend strength and direction.
- Volume Normalization: Adjusts momentum signals based on trading volume impact.
- Zero-Centered Oscillator: Easy-to-interpret trend shifts.
- Visual Enhancements: Color-coded bars and background for quick insights.
How It Works
RSI Component: Calculates RSI and centers it around 50 to measure momentum.
MACD Component: Uses the MACD histogram to gauge trend strength.
Volume Component: Normalizes volume against the highest of the last 50 bars.
Final Calculation: Combines the three components into a single oscillator with smoothing.
Color Coding: Green when momentum is positive, red when negative.
Usage
Buy Signal: When SMO crosses above 0, indicating bullish momentum.
Sell Signal: When SMO crosses below 0, signaling bearish momentum.
Divergences: Watch for SMO divergences against price action for early trend shifts.
Customization
- Adjustable RSI Length, MACD Settings, and Volume Weighting.
- Modify colors and smoothing settings for personal preference.
Ichimoku Cloud Auto TF🧠 Timeframe Breakdown for Ichimoku Cloud Auto TF
Each timeframe in this indicator is carefully calibrated to reflect meaningful Ichimoku behavior relative to its scale. Here's how each one is structured and what it's best used for:
⏱️ 1 Minute (1m)
Tenkan / Kijun / Span B: 5 / 15 / 45
Use: Scalping fast price action.
Logic: Quick reaction to short-term momentum. Best for highly active traders or bots.
⏱️ 2 Minutes (2m)
Tenkan / Kijun / Span B: 6 / 18 / 54
Use: Slightly smoother than 1m, still ideal for scalping with a little more stability.
⏱️ 5 Minutes (5m)
Tenkan / Kijun / Span B: 8 / 24 / 72
Use: Intraday setups, quick trend capture.
Logic: Balanced between reactivity and noise reduction.
⏱️ 15 Minutes (15m)
Tenkan / Kijun / Span B: 9 / 27 / 81
Use: Short-term swing and intraday entries with higher reliability.
⏱️ 30 Minutes (30m)
Tenkan / Kijun / Span B: 10 / 30 / 90
Use: Intra-swing entries or confirmation of 5m/15m signals.
🕐 1 Hour (1H)
Tenkan / Kijun / Span B: 12 / 36 / 108
Use: Ideal for swing trading setups.
Logic: Anchored to Daily reference (1H × 24 ≈ 1D).
🕐 2 Hours (2H)
Tenkan / Kijun / Span B: 14 / 42 / 126
Use: High-precision swing setups with better context.
🕒 3 Hours (3H)
Tenkan / Kijun / Span B: 15 / 45 / 135
Use: Great compromise between short and mid-term vision.
🕓 4 Hours (4H)
Tenkan / Kijun / Span B: 18 / 52 / 156
Use: Position traders & intraday swing confirmation.
Logic: Designed to echo the structure of 1D Ichimoku but on smaller scale.
📅 1 Day (1D)
Tenkan / Kijun / Span B: 9 / 26 / 52
Use: Classic Ichimoku settings.
Logic: Standard used globally for technical analysis. Suitable for swing and position trading.
📆 1 Week (1W)
Tenkan / Kijun / Span B: 12 / 24 / 120
Use: Long-term position trading & institutional swing confirmation.
Logic: Expanded ratios for broader perspective and noise filtering.
🗓️ 1 Month (1M)
Tenkan / Kijun / Span B: 6 / 12 / 24
Use: Macro-level trend visualization and investment planning.
Logic: Condensed but stable structure to handle longer data cycles.
📌 Summary
This indicator adapts Ichimoku settings dynamically to your chart's timeframe, maintaining logical ratios between Tenkan, Kijun, and Span B. This ensures each timeframe remains responsive yet meaningful for its respective market context.
Buy vs Sell vs Total Volume📊 Buy vs Sell Volume with Customizable MA — Pine Script v5
This custom TradingView volume indicator breaks down each bar into Buy Volume (Green), Sell Volume (Red), and Total Volume (Orange). It also includes a customizable Moving Average (MA) line (default color: Blue) to help you visually track volume trends over time.
✅ What It Shows:
🔸 Orange bar = Total Volume
🟢 Green bar = Buy Volume
🔴 Red bar = Sell Volume
🔵 Blue line = Volume MA (SMA or EMA, with selectable length: 5, 10, 30, 50, 200)
⚙️ Customizable Settings:
Choose MA type: SMA or EMA
Choose MA length: 5, 10, 30, 50, or 200
Set your preferred MA line color
Volume bars stack and overlay proportionally to show exactly how much of each candle’s volume was buying vs selling
📈 How to Use It:
Look for spikes in Buy Volume (green) to spot accumulation
Spikes in Sell Volume (red) may signal distribution or pullback
Use the Volume MA line as a filter:
Above average volume = strong momentum
Below average volume = weak interest
This tool is especially useful for day traders and scalpers who want precise volume insights beyond the standard volume bar.
STH Unrealized Profit/Loss Ratio (STH-NUPL) | [DeV]STH-NUPL
The Short-Term Holder Net Unrealized Profit/Loss Ratio (STH-NUPL) is an analytical tool designed to approximate the unrealized profit or loss of Bitcoin’s short-term holders (STHs)—typically those holding coins for less than 155 days—within the constraints of TradingView’s price-based environment. Drawing inspiration from the canonical STH-NUPL metric, which assesses the difference between the market value and realized value of STH-held coins, this indicator adapts the concept into a normalized ratio using Bitcoin’s price data as a proxy. It offers a window into the sentiment and behavior of short-term market participants, who are often more sensitive to price fluctuations than long-term holders.
In its raw form, STH-NUPL oscillates around a break-even threshold of 0, where positive values indicate aggregate unrealized profits for STHs (market value exceeds realized value), and negative values suggest losses. This inflection point frequently acts as a key level: in bear markets, it can signal capitulation as STHs sell at break-even or below, while in bull markets, it may reflect reluctance to realize losses, providing support. The indicator enhances this metric with smoothing, a moving average overlay, and sophisticated visualization options, delivering a statistically informed perspective on short-term holder dynamics tailored for institutional-grade analysis.
STH-NUPL Settings -
Lookback Length (Default: 150 days): Defines the SMA period for estimating realized value. This 150-day window aligns with traditional STH definitions (e.g., <155 days), capturing a broad yet relevant historical cost basis for short-term holders, ideal for assessing cyclical behavior.
Smoothing Period (Default: 5 days): Applies an EMA to the raw STH-NUPL ratio, with a short default period to maintain responsiveness to recent price shifts while filtering out daily volatility. This setting is particularly suited for tactical analysis.
Moving Average Settings -
MA Lookback Length (Default: 90 days): Sets the period for the STH-NUPL’s moving average, offering a medium-term trend signal that contrasts with the 150-day lookback, enabling detection of momentum shifts within broader market phases.
MA Type (Default: EMA): Provides six moving average types, from the straightforward SMA to the volume-sensitive VWMA. The default EMA balances smoothness and reactivity, while options like HMA or VWMA cater to specialized needs, such as emphasizing recent action or volume trends.
Display Settings -
Show Moving Average (Default: True): Toggles the visibility of the STH-NUPL MA plot, allowing users to focus solely on the smoothed ratio when desired.
Show Background Colors (Default: True): Activates dynamic background shading to visually reinforce market regimes.
Background Color Source (Default: STH-NUPL): Enables users to tie the background to either the STH-NUPL’s midline (reflecting sthNupl > 0) or the MA’s trend direction (maNupl > maNupl ), aligning the visual context with the chosen analytical focus.
Analytical Applications -
Bear Market Capitulation: When the smoothed STH-NUPL approaches or falls below zero, it often signals loss realization among STHs, a precursor to capitulation in downtrends. A declining MA crossing zero can confirm this selling pressure.
Bull Market Support: Positive STH-NUPL values with a rising MA indicate STHs are in profit and reluctant to sell at a loss, forming support zones in uptrends as sell pressure wanes.
Sentiment Extremes: Significant deviations above or below zero highlight over-optimism or despair among STHs, offering contrarian opportunities when paired with price action or other on-chain metrics.
**Limitations**
As a TradingView-based approximation, this indicator uses price data (close) rather than true on-chain STH supply and realized price, which are available through providers like Glassnode. The 150-day SMA for realized value simplifies the cost basis, potentially underrepresenting the diversity of STH transactions. Despite this, the smoothed ratio and moving average overlay provide a practical proxy for tracking STH sentiment within TradingView’s ecosystem.
EMA Momentum Projection# EMA Momentum Projection 20 50 200
## Overview
Visualizes the relative strength of three EMAs (20, 50, 200) through histogram projections. Measures momentum direction and intensity using slope-based calculations.
## Key Features
- Multi-timeframe EMA comparison
- Customizable projection horizon
- Non-repainting calculations
- Clear histogram visualization
## Parameters
- `Projection Bars`: Forward-looking momentum estimate (1-10)
- `Slope Period`: Historical window for slope calculation (2-20)
## Usage
1. Apply to any market/timeframe
2. Compare histogram heights:
- Green (20EMA): Short-term momentum
- Blue (50EMA): Medium-term force
- Red (200EMA): Long-term bias
3. Look for alignment between timeframes
## Limitations
- Works best with trending instruments
- Requires confirmation with price action
- Not a standalone trading system
## Educational Purpose
Designed to help identify:
- Momentum divergences
- Trend acceleration/deceleration
- Relative strength between time horizons
> Combine with volume analysis and support/resistance levels for best results
*This tool does not predict future prices - it estimates momentum based on historical slope calculations.
EMA 20/50/200 FIIlEMA Trend Zone Indicator
Visualize multi-timeframe momentum with dynamic color-coded EMAs
Core Functionality
This indicator plots three Exponential Moving Averages (20, 50, 200 periods) with:
Trend-responsive colors: Each EMA changes color based on its direction
Interactive zones: Two fill areas between EMAs reflecting market alignment
Visual cross alerts: Color shifts highlight potential Golden/Death Cross formations
Key Components
EMA 20: Short-term momentum (Green/Rose)
EMA 50: Medium-term trend (Blue/Orange)
EMA 200: Long-term bias (Purple/Red)
20-50 Zone: Neon Green/Red/Yellow fills showing alignment
50-200 Zone: Blue/Red/Yellow fills indicating trend hierarchy
Practical Applications
Identify confluence between timeframes
Spot early trend reversal signals
Filter false breakouts using zone colors
Confirm momentum shifts across horizons
Usage Guidelines
Apply to preferred chart (works across all markets)
Combine with:
Price action patterns
Volume indicators
Support/resistance levels
Watch for:
Sustained zone color changes
EMA crosses with matching fills
Divergence between zones
Parameters & Customization
Default EMA periods: 20/50/200
Adjustable colors via Style tab
Transparency controls for zones
Limitations
Works best in trending markets
Requires confirmation from price action
Not optimized for sideways conditions
Development Notes
Built using Pine Script v5
No repainted calculations