An open API service indexing awesome lists of open source software.

https://github.com/dextergocode/ultimate-crypto-trading-bot

A comprehensive Pine Script trading strategy designed specifically for cryptocurrency markets, combining multiple technical indicators with risk management and market structure analysis.
https://github.com/dextergocode/ultimate-crypto-trading-bot

altcoin bitcoin bot cryptocurrency dogecoin ethereum pinecode pinescript pinescript-strategies technical-analysis trading trading-strategies tradingbot-auto-trading

Last synced: 2 months ago
JSON representation

A comprehensive Pine Script trading strategy designed specifically for cryptocurrency markets, combining multiple technical indicators with risk management and market structure analysis.

Awesome Lists containing this project

README

          

# Ultimate Crypto Trading Bot 🚀

image

[![TradingView](https://img.shields.io/badge/TradingView-PineScript-blue.svg)](https://www.tradingview.com)
[![Version](https://img.shields.io/badge/Version-1.0.0-green.svg)](https://github.com/dextergocode/ultimate-crypto-bot/releases)

A comprehensive Pine Script trading strategy designed specifically for cryptocurrency markets, combining multiple technical indicators with advanced risk management and market structure analysis.

## ⚠️ **RISK WARNING**
Trading cryptocurrencies involves substantial risk of loss. This software is for educational purposes only and should not be considered as financial advice. Past performance does not guarantee future results. **Use at your own risk.**

## 🎯 Features

### Technical Analysis
- **Multi-Timeframe Analysis**: Higher timeframe trend confirmation
- **Moving Averages**: Fast (9), Slow (21), and Long-term (200) SMA
- **RSI**: Relative Strength Index with customizable overbought/oversold levels
- **MACD**: Moving Average Convergence Divergence with signal line
- **Bollinger Bands**: Dynamic support/resistance levels
- **Stochastic Oscillator**: Momentum indicator for entry timing
- **Volume Analysis**: Volume spikes and moving average confirmation

### Market Structure Analysis
- **Trend Structure**: Higher highs/lows and lower highs/lows detection
- **Support & Resistance**: Pivot point identification
- **Candlestick Patterns**: Bullish/bearish engulfing detection
- **Volatility Filter**: ATR-based volatility measurement

### Risk Management
- **Dynamic Stop Loss**: Percentage-based stop loss
- **Take Profit Targets**: Configurable profit targets
- **Risk/Reward Ratio**: Customizable risk-reward calculations
- **Position Sizing**: Equity-based position sizing
- **Volatility Filter**: Prevents trading in high volatility conditions

### Performance Tracking
- **Real-time Metrics**: Win rate, total trades, PnL tracking
- **Visual Dashboard**: Performance table with key metrics
- **Alert System**: Entry/exit signal notifications

## 📊 Strategy Logic

### Long Entry Conditions
- Fast MA > Slow MA and price > 200 MA (bullish trend)
- RSI between 40-80 (not overbought)
- MACD line > signal line with rising histogram
- Stochastic %K > %D and between 20-80
- Volume confirmation (above average)
- Higher timeframe trend alignment (optional)
- Low volatility environment

### Short Entry Conditions
- Fast MA < Slow MA and price < 200 MA (bearish trend)
- RSI between 20-60 (not oversold)
- MACD line < signal line with falling histogram
- Stochastic %K < %D and between 20-80
- Volume confirmation (above average)
- Higher timeframe trend alignment (optional)
- Low volatility environment

### Exit Conditions
- Stop loss or take profit hit
- Trend reversal signals
- RSI extreme levels (>70 for longs, <30 for shorts)

## 🛠️ Installation

1. Open TradingView and go to the Pine Editor
2. Copy the Pine Script code from `src/ultimate_crypto_bot.pine`
3. Paste it into the Pine Editor
4. Click "Add to Chart"
5. Configure the settings according to your risk tolerance

## ⚙️ Configuration

### Basic Settings
- **Higher Timeframe**: Default 1D for trend analysis
- **Fast MA Period**: 9 (short-term trend)
- **Slow MA Period**: 21 (medium-term trend)
- **RSI Length**: 14 periods
- **MACD Settings**: 12, 26, 9 (standard settings)

### Risk Management
- **Stop Loss**: 3% (adjustable)
- **Take Profit**: 6% (adjustable)
- **Risk/Reward Ratio**: 2:1 (adjustable)
- **Position Size**: 10% of equity (adjustable)

### Advanced Options
- **Volume Threshold**: 1.5x average volume
- **Volatility Threshold**: 2.0% ATR
- **Bollinger Bands**: 20 period, 2.0 multiplier

## 📈 Performance Metrics

The strategy includes a real-time performance dashboard showing:
- Total number of trades
- Win rate percentage
- Total PnL
- Current RSI value
- Market volatility percentage

## 🔧 Customization

### Indicator Modifications
You can easily modify the strategy by adjusting:
- Moving average periods
- RSI overbought/oversold levels
- MACD parameters
- Bollinger Band settings
- Volume thresholds

### Adding New Indicators
The code structure allows for easy addition of new technical indicators in the "TECHNICAL INDICATORS" section.

## 📚 Documentation

- [Strategy Explanation](docs/strategy_explanation.md)
- [Configuration Guide](docs/configuration.md)
- [Backtesting Results](tests/backtest_results.md)

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

## 🙏 Acknowledgments

- TradingView for the Pine Script platform
- The cryptocurrency trading community for inspiration
- Technical analysis pioneers for the indicators used

## 📞 Support

If you find this strategy helpful, please:
- ⭐ Star this repository
- 🐛 Report bugs in the Issues section
- 💡 Suggest improvements
- 📢 Share with other traders

## 📊 Backtesting Results

| Metric | Value |
|--------|-------|
| Total Trades | 150+ |
| Win Rate | 65% |
| Max Drawdown | 15% |
| Profit Factor | 1.8 |
| Sharpe Ratio | 1.2 |

*Results based on BTC/USD 1-hour timeframe over 6 months*

## 🔮 Roadmap

- [ ] Add more candlestick patterns
- [ ] Implement machine learning filters
- [ ] Add support for multiple timeframes
- [ ] Create automated parameter optimization
- [ ] Add more risk management options

## 📄 Changelog

### v1.0.0 (Current)

---

**Disclaimer**: This trading strategy is provided for educational purposes only. Cryptocurrency trading involves substantial risk of loss. The author is not responsible for any financial losses incurred through the use of this strategy. Always do your own research and consider consulting with a financial advisor before trading.