Overview
Technical indicators are mathematical calculations based on price, volume, and open interest data. CryptoView Pro uses these indicators both for visual analysis and as features for machine learning models. Location:utils/indicators.py
All indicators are calculated automatically when data is loaded and are available for visualization and model training.
Indicator Catalog
RSI (Relative Strength Index)
Description
RSI is a momentum oscillator that measures the speed and magnitude of price changes. It ranges from 0 to 100 and identifies overbought/oversold conditions.Calculation
utils/indicators.py
Interpretation
Oversold
RSI < 30Price may have fallen too far, potential buy signal
Neutral
30 ≤ RSI ≤ 70Price in normal range, no clear signal
Overbought
RSI > 70Price may have risen too far, potential sell signal
Example Values
Visual Representation
RSI is displayed as a line chart below the main price chart:- Overbought line at 70 (red dashed)
- Oversold line at 30 (green dashed)
- RSI line in cyan
Usage in Models
XGBoost uses three RSI-derived features:MACD (Moving Average Convergence Divergence)
Description
MACD is a trend-following momentum indicator that shows the relationship between two exponential moving averages. It consists of three components:- MACD Line: Difference between 12-day and 26-day EMAs
- Signal Line: 9-day EMA of MACD line
- Histogram: MACD line minus Signal line
Calculation
utils/indicators.py
Interpretation
- MACD Line
- Signal Line Crossovers
- Histogram
Above 0: Bullish momentum (short-term MA > long-term MA)Below 0: Bearish momentum (short-term MA < long-term MA)Crossing 0: Potential trend change
Visual Representation
MACD is displayed in a separate chart with three elements:- MACD line in teal
- Signal line in red/orange
- Histogram as bars (green when positive, red when negative)
Usage in Models
XGBoost creates two MACD features:Bollinger Bands
Description
Bollinger Bands consist of a middle moving average band with upper and lower bands that represent standard deviations. They expand and contract based on market volatility.Calculation
utils/indicators.py
Interpretation
Band Width
Wide bands: High volatility, large price swings expectedNarrow bands: Low volatility, potential breakout coming (“Squeeze”)
Price Position
Above upper band: Overbought, potential reversalBelow lower band: Oversold, potential reversalNear middle band: Neutral zone
Band Bounces
Bounce off lower band: Bullish reversalBounce off upper band: Bearish reversalBreak through band: Strong trend continuation
Statistical Basis
Assuming normal distribution, approximately 95% of price action occurs within the bands (±2 standard deviations).
Visual Representation
Bollinger Bands overlay the main price chart:- Upper band in light blue (transparent)
- Lower band in light blue with fill between bands
- Middle band typically hidden (coincides with 20-day SMA)
Usage in Models
XGBoost uses Bollinger Band position:Exponential Moving Averages (EMAs)
Description
EMAs are weighted moving averages that give more importance to recent prices, making them more responsive to price changes than simple moving averages (SMAs).Calculation
utils/indicators.py
Standard Periods Used
CryptoView Pro calculates four EMA periods:EMA 9
Very short-termTracks immediate price action, used for scalping
EMA 21
Short-termIntraday and swing trading, quick trend changes
EMA 50
Medium-termKey support/resistance, shown on main chart (orange)
EMA 200
Long-termMajor trend indicator, shown on main chart (purple)
Interpretation
Trend Direction
Trend Direction
Price above EMA: UptrendPrice below EMA: DowntrendLonger EMAs = stronger signal
Support and Resistance
Support and Resistance
EMAs often act as dynamic support/resistance:
- In uptrend: EMA acts as support (buy zone)
- In downtrend: EMA acts as resistance (sell zone)
- Bounce or break determines continuation/reversal
EMA Crossovers
EMA Crossovers
Golden Cross: EMA 50 crosses above EMA 200 → Strong bullish signalDeath Cross: EMA 50 crosses below EMA 200 → Strong bearish signalThese are major trend-change signals for position traders.
Multiple EMA Strategy
Multiple EMA Strategy
When EMAs stack in order (9 > 21 > 50 > 200):
- Bullish alignment: Strong uptrend
- Bearish alignment: Strong downtrend (reverse order)
- Mixed: Consolidation or transition phase
Visual Representation
EMA 50 and EMA 200 overlay the main price chart:- EMA 50 in orange (dashed line)
- EMA 200 in purple (dashed line)
- Crossovers visually apparent
Usage in Models
XGBoost uses EMAs and price-to-EMA ratios:Additional Indicators
Volatility
Calculation: Rolling standard deviation of returns- High volatility: Large price swings, increased risk and opportunity
- Low volatility: Price stability, potential breakout ahead
- Used for position sizing and risk management
Momentum
Calculation: Absolute price change over period- Positive momentum: Upward price pressure
- Negative momentum: Downward price pressure
- Magnitude indicates strength of move
Volume Features
Calculations:volume_ratio > 2.0: High volume, strong convictionvolume_ratio < 0.5: Low volume, weak conviction- Rising volume + rising price = healthy uptrend
- Rising volume + falling price = potential reversal
OHLC Ratios
Calculations:high_low_ratio > 1.05: High intrabar volatilityclose_open_ratio > 1.0: Bullish candleclose_open_ratio < 1.0: Bearish candle
Signal Generation
Location:TechnicalIndicators.get_signals(df)
CryptoView Pro aggregates indicators into actionable signals:
utils/indicators.py
Signal Display
The overall signal is shown in the metrics dashboard:- 🟢 COMPRA (Buy): At least 2 bullish indicators
- 🔴 VENTA (Sell): At least 2 bearish indicators
- 🟡 NEUTRAL: Conflicting or neutral indicators
Indicator Integration
Automatic Calculation
All indicators are calculated when data is loaded:app.py
Caching
Indicator calculations are cached for 60 seconds to avoid redundant computation:- First load: Calculate all indicators
- Subsequent loads (within 60s): Use cached results
- After 60s: Refresh data and recalculate
Usage Across System
Visualization
Plotted on main chart and indicator subplots
ML Features
Fed into XGBoost as engineered features
Signals
Used for alert generation and notifications
Configuration
Indicator parameters are configurable inconfig/settings.py:
config/settings.py
Best Practices
Use Multiple Indicators
Never rely on a single indicator. Confirm signals across RSI, MACD, and Bollinger Bands for higher confidence.
Confirm with Volume
Strong price moves should be accompanied by above-average volume. Low-volume moves are less reliable.
Consider Timeframes
Check indicators across multiple timeframes (1h, 4h, 1d) for trend confirmation.
Context Matters
RSI >70 during strong uptrend ≠ immediate reversal. Look for divergence and other confirming signals.
Common Patterns
Bullish Divergence
Setup: Price makes lower low, but RSI/MACD makes higher low Signal: Momentum weakening to downside, potential reversal upBearish Divergence
Setup: Price makes higher high, but RSI/MACD makes lower high Signal: Momentum weakening to upside, potential reversal downBollinger Squeeze
Setup: Bands narrow significantly (low volatility) Signal: Breakout imminent, direction determined by band breakMACD Histogram Reversal
Setup: Histogram peaks and starts shrinking toward zero Signal: Momentum fading, potential trend changeFurther Reading
Architecture
See how indicators fit into the overall system
ML Models
Learn how indicators are used as model features
Technical analysis is one tool among many. Combine with fundamental analysis, market sentiment, and proper risk management for best results.