High-accuracy prediction system for OTC (Over-The-Counter) markets including Volatility Indices and Crash/Boom markets.
- Real-time price data from Deriv WebSocket API
- Multiple strategies: Mean reversion, momentum, pattern recognition
- High win rate target: Optimized for 60%+ accuracy
- Live predictions: WebSocket support for real-time updates
- Performance tracking: Automatic win/loss tracking and statistics
- Web dashboard: Beautiful UI for monitoring predictions
- RESTful API: Easy integration with trading platforms
- Volatility Indices: V10, V25, V50, V75, V100
- Crash Indices: Crash 300, 500, 1000
- Boom Indices: Boom 300, 500, 1000
- Go 1.21 or higher
- Internet connection for real-time data
# Clone repository
git https://github.com/gatiella/otc-predictor.git
cd otc-predictor
# Install dependencies
go mod download
# Run the application
go run cmd/main.go- Application starts collecting data (wait 30 seconds)
- Open dashboard:
http://localhost:8080 - Select a market and get predictions!
otc-predictor/
โโโ cmd/
โ โโโ main.go # Application entry point
โโโ internal/
โ โโโ api/ # REST API & WebSocket
โ โโโ collector/ # Data collection from Deriv
โ โโโ indicators/ # Technical indicators (RSI, EMA, BB)
โ โโโ predictor/ # Prediction engine
โ โโโ storage/ # In-memory data storage
โ โโโ strategy/ # Trading strategies
โ โโโ tracker/ # Performance tracking
โโโ pkg/
โ โโโ types/ # Data structures
โโโ web/
โ โโโ dashboard.html # Web dashboard
โโโ config.yaml # Configuration
โโโ go.mod # Dependencies
Edit config.yaml to customize:
strategy:
min_confidence: 0.65 # Minimum confidence to trade
rsi_period: 14
rsi_overbought: 75
rsi_oversold: 25
risk:
max_predictions_per_minute: 10
min_ticks_required: 200GET /api/predict/:market/:duration
Example: curl http://localhost:8080/api/predict/volatility_75_1s/60GET /api/stats/:market
Example: curl http://localhost:8080/api/stats/volatility_75_1sws://localhost:8080/api/stream/volatility_75_1s?duration=60GET /api/health- Health checkGET /api/markets- List active marketsGET /api/predict/:market/:duration- Get predictionGET /api/predict/all/:duration- All predictionsGET /api/stats- All statisticsGET /api/stats/:market- Market statisticsGET /api/results/:market- Trade resultsGET /api/performance- Performance summary
- Connects to Deriv WebSocket API
- Collects real-time price ticks
- Stores last 1000 ticks per market in memory
- RSI: Identifies overbought/oversold conditions
- EMA: Detects trends (9, 21, 50 periods)
- Bollinger Bands: Finds price extremes
- Momentum: Measures price velocity
- Patterns: Detects double tops/bottoms
For Volatility Indices:
- Mean reversion (strongest for OTC)
- Momentum following
- Bollinger Band squeeze
- RSI extremes
For Crash/Boom:
- Spike detection
- Between-spike trends
- Volatility analysis
- Multiple strategies vote
- Weighted by historical accuracy
- Only predicts if confidence > 65%
- Quality filters prevent bad trades
- Monitors each prediction
- Checks outcome after duration
- Calculates win rate automatically
- Updates statistics in real-time
{
"market": "volatility_75_1s",
"direction": "UP",
"confidence": 0.68,
"reason": "3/4 strategies agree UP: [MeanReversion(โ68%), Momentum(โ63%), RSI(โ62%)]",
"current_price": 1456.32,
"duration": 60,
"indicators": {
"rsi": 22.4,
"ema_9": 1458.21,
"bb_position": -0.85
}
}- Select Market: Choose from dropdown
- Set Duration: 30s, 60s, 120s, etc.
- Get Prediction: Click button or enable live mode
- Live Mode: Real-time updates every 3 seconds
- View Stats: See win rates and performance
The system automatically tracks:
- Total trades per market
- Win/loss ratio
- Win rate percentage
- Profit/loss (assuming $10 stakes)
- Current win streak
- Best win streak
View performance:
curl http://localhost:8080/api/performanceEdit internal/strategy/combined.go:
meanReversionWeight: 0.4 // Most reliable for OTC
momentumWeight: 0.3
patternWeight: 0.3Edit config.yaml:
strategy:
min_confidence: 0.70 # Higher = fewer but better tradesrisk:
max_predictions_per_minute: 10 # Prevent overtrading- Wait 30-60 seconds for data collection
- Check internet connection
- Verify Deriv API is accessible
- Increase
min_confidencein config - Wait for more data (200+ ticks)
- Avoid high volatility periods
- Auto-reconnects after 5 seconds
- Check Deriv API status
- Verify websocket URL in config
This software is for educational purposes only. Trading financial instruments carries risk. Past performance does not guarantee future results. Always:
- Start with demo accounts
- Never risk more than you can afford to lose
- Understand that even high win rates can result in losses
- Use proper risk management
MIT License - Use at your own risk
Contributions welcome! Areas for improvement:
- Additional technical indicators
- Machine learning models
- Backtesting framework
- More markets support
For issues and questions:
- Open an issue on GitHub
- Check the logs in console
- Review API responses for errors
Remember: The goal is consistent profitability, not every single trade. The system is designed to skip uncertain trades to maintain high accuracy.
Good luck! ๐