Skip to main content

Get Your First Predictions in 5 Minutes

This quickstart guide will help you set up CryptoView Pro and generate your first cryptocurrency price predictions using machine learning.
Prerequisites: Python 3.8+ installed on your system. Check with python --version or python3 --version.

Quick Setup

1

Clone the Repository

Get the CryptoView Pro source code:
git clone https://github.com/your-username/cryptoview-pro.git
cd cryptoview-pro
2

Create Virtual Environment

Set up an isolated Python environment:
python -m venv venv
venv\Scripts\activate
You should see (venv) appear in your terminal prompt when activated.
3

Install Dependencies

Install all required packages:
pip install -r requirements.txt
This installs:
  • streamlit: Web interface
  • ccxt: Exchange connectivity
  • xgboost: ML model for short-term predictions
  • prophet: ML model for long-term predictions
  • plotly: Interactive charts
  • Plus supporting libraries (pandas, numpy, scikit-learn)
4

Launch the Application

Start the Streamlit dashboard:
streamlit run app.py
The app will automatically open in your browser at http://localhost:8501

Your First Prediction

Once the application launches, follow these steps to generate your first forecast:
1

Select Cryptocurrency

In the sidebar, choose your cryptocurrency:
  • BTC/USDT - Bitcoin (most liquid, default)
  • ETH/USDT - Ethereum
  • SOL/USDT - Solana
  • And 9 more options
Start with BTC/USDT for the most stable predictions and best data quality.
2

Choose Timeframe

Select your analysis timeframe:
  • 1h - Recommended for general analysis (default)
  • 4h - For swing trading
  • 1d - For position trading
  • 15m - For active day trading
Shorter timeframes (1m, 5m) require more data points and may have higher noise.
3

Set Prediction Horizon

Choose how far ahead to predict:
  • Short-term: 6-24 hours (uses XGBoost)
  • Medium-term: 3-7 days (uses Hybrid model)
  • Long-term: 1-4 weeks (uses Prophet)
Or use Custom to set a specific number of hours.
4

Fetch Data & Train

Click the ”🚀 Fetch Data & Train Model” button.The system will:
  1. Connect to the exchange (Kraken by default)
  2. Download historical OHLCV data
  3. Calculate technical indicators
  4. Train the selected ML model
  5. Display real-time metrics
Initial training takes 10-30 seconds depending on the model and data size.

Understanding Your Results

After training completes, you’ll see several visualizations and metrics:

Price Chart with Predictions

# CryptoView Pro generates an interactive Plotly chart showing:
# - Historical prices (candlesticks)
# - Predicted future prices (orange line)
# - Confidence intervals (shaded area)
# - Technical indicators (RSI, MACD, Bollinger Bands)
The main chart displays:
  • Blue candlesticks: Historical price action
  • Orange line: Model predictions
  • Shaded area: 95% confidence interval
  • Technical overlays: Moving averages, Bollinger Bands

Key Metrics

Current Price

Latest market price from the exchange

Predicted Price

Forecast price at your selected horizon

Expected Change

Predicted percentage movement (green = up, red = down)

Confidence

Model confidence in the prediction (wider bands = less confidence)

Technical Indicators

Relative Strength Index below the main chart:
  • Green zone (>70): Overbought - potential selling pressure
  • Red zone (<30): Oversold - potential buying opportunity
  • Middle (30-70): Neutral momentum

Example: Bitcoin 24-Hour Forecast

Here’s a typical workflow for predicting Bitcoin’s price 24 hours ahead:
1

Configuration

# Settings selected in sidebar
cryptocurrency = "BTC/USDT"
timeframe = "1h"              # 1-hour candles
prediction_horizon = 24        # 24 hours ahead
model = "xgboost"             # Best for short-term
2

Data Collection

from data.collectors import CryptoDataCollector

# Initialize collector
collector = CryptoDataCollector('kraken')

# Fetch last 1000 hours of data
df = collector.fetch_ohlcv(
    symbol='BTC/USDT',
    timeframe='1h',
    limit=1000
)

# Data includes: open, high, low, close, volume
# Plus calculated: returns, log_returns
3

Model Training

from models.xgboost_model import XGBoostCryptoPredictor

# Initialize model
predictor = XGBoostCryptoPredictor(
    n_estimators=200,
    learning_rate=0.07,
    max_depth=6
)

# Train on historical data
metrics = predictor.train(df, train_size=0.8)

# Training creates 50+ features including:
# - Price returns (1h, 4h, 24h, 7d)
# - Moving averages (7, 14, 30, 50 periods)
# - Volatility measures
# - Momentum indicators
# - Volume ratios
4

Generate Predictions

# Predict next 24 hours
predictions = predictor.predict_future(df, periods=24)

# Results include:
predictions_df.head()
#                      predicted_price  lower_bound  upper_bound
# 2026-03-07 01:00:00        98450.25     97200.00     99700.50
# 2026-03-07 02:00:00        98523.75     97250.30     99797.20
# 2026-03-07 03:00:00        98601.20     97310.60     99891.80
# ...

Quick Model Comparison

Test different models to see which performs best for your use case:
# Best for: 1-72 hours
from models.xgboost_model import XGBoostCryptoPredictor

predictor = XGBoostCryptoPredictor()
predictor.train(df)
predictions = predictor.predict_future(df, periods=24)

# Strengths:
# - Fast predictions (2-3 seconds)
# - High accuracy for short horizons
# - Captures non-linear patterns

Enable Telegram Alerts (Optional)

Get instant notifications for price movements and trading signals:
1

Create Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the instructions
  3. Copy your bot token (looks like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11)
2

Get Chat ID

  1. Start a chat with your new bot
  2. Send any message to the bot
  3. Visit: https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
  4. Find your chat_id in the JSON response
3

Configure Environment

Create a .env file in the project root:
.env
TELEGRAM_BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
TELEGRAM_CHAT_ID=987654321

# Optional: Exchange API keys for private endpoints
BINANCE_API_KEY=your_api_key_here
BINANCE_API_SECRET=your_api_secret_here
Never commit .env files to version control. Add .env to your .gitignore.
4

Restart Application

streamlit run app.py
You’ll now receive alerts when:
  • Price changes exceed 5%
  • RSI enters overbought/oversold zones
  • Volume spikes above 2x average
  • MACD crossovers occur

Troubleshooting

The dependencies weren’t installed correctly.Solution:
pip install --upgrade pip
pip install -r requirements.txt
You’re making too many requests to the exchange.Solution:
  • CCXT automatically handles rate limiting
  • Increase CACHE_TTL in config/settings.py
  • Switch to a different exchange: CryptoDataCollector('binance')
The model may need more training data or better parameters.Solution:
  • Increase data limit: limit=2000 in fetch_ohlcv()
  • Try a different model (Hybrid for medium-term)
  • Use a longer timeframe (4h or 1d instead of 1h)
  • Check for market anomalies (news events, flash crashes)
Port is already in use.Solution:
streamlit run app.py --server.port 8502
Or kill the existing process:
# Find process
lsof -ti:8501

# Kill it (macOS/Linux)
kill -9 $(lsof -ti:8501)

Next Steps

Deep Dive: Installation

Complete installation guide with dependencies explained

Model Selection Guide

Learn when to use XGBoost vs Prophet vs Hybrid

Technical Analysis

Master RSI, MACD, and Bollinger Bands

Backtesting

Evaluate model performance on historical data

Exchange Configuration

Connect to Binance, configure API keys

Alert Configuration

Customize alert thresholds and notification rules

Example Projects

Goal: Predict Bitcoin movements for intraday trading
# Configuration
crypto = 'BTC/USDT'
timeframe = '15m'         # 15-minute candles
horizon = 12              # 3 hours ahead (12 * 15min)
model = 'xgboost'         # Fast, accurate short-term

# Strategy
# 1. Monitor RSI for overbought/oversold
# 2. Use MACD for entry/exit signals
# 3. Set alerts for 3% price movements
# 4. Re-train model every 4 hours
Reminder: These examples are for educational purposes. Always perform your own analysis and risk management before trading.

Build docs developers (and LLMs) love