Skip to content

darkvolg/Trading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

165 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TrendRider β€” Open-source crypto trading strategy

Open-source strategy Built on Freqtrade Live stats Paper-trading GPL-3.0

TrendRider β€” Open-Source Crypto Trading Strategy

A multi-indicator confluence strategy for Freqtrade, running on Bybit USDT-perpetual futures. Code is open. Numbers are public. Failures are documented.

πŸ”— Live dashboard β†’ trendrider.net/live (updates every 5 minutes from the bot's database)


TL;DR

Value
Live since April 1, 2026 (paper-trading on $500)
Live stats Real-time on trendrider.net/live β€” trades, P&L, win rate, drawdown
Backtest stats Latest hyperopt+walk-forward results published on /live per strategy version
Pairs 13 USDT-perp (BTC, ETH, SOL, DOGE, XRP, ADA, AVAX, DOT, POL, NEAR, ATOM, SUI, OP)
Timeframe 1h candles
Risk Hyperopt-tuned stoploss + ROI ladder + trailing stop, 8 protections (cooldown, stoploss-guard, max-drawdown), max-open-trades cap

No real money is at risk yet. This is a public dry-run experiment β€” paper-trading first, real capital only after a long honest track record.


Why This Repo Is Different

The crypto-bot space is full of black boxes promising 200% APY. This isn't that.

  • βœ… Open source β€” every line of strategy code in TrendRiderStrategy_public.py. No hidden logic, no API key required to read what it does.
  • βœ… Public live performance β€” every trade, every loss, on trendrider.net/live. API serves directly from the bot's SQLite DB. No edits possible.
  • βœ… Honest post-mortems β€” 13 days of breakeven trading documented publicly, including the moment one fix turned -$0.06 into +$6.42.
  • βœ… Walk-forward validated β€” every hyperopt run holds out a final period as out-of-sample. If new params don't beat baseline on the held-out window, they don't ship. Process is committed to git β€” every parameter change is traceable.
  • βœ… Conservative claims β€” paper-trading first, real money only after a long honest track record. No promises of life-changing returns.

Strategy Logic (1-minute version)

For each candle, every pair is scored across 8+ technical indicators:

Indicator What it measures
EMA fast/slow crossover Trend direction
RSI Overbought / oversold
MACD histogram Momentum shift
ADX Trend strength
Bollinger Bands Volatility envelope
ATR Volatility magnitude
Volume ratio Conviction
Market regime classifier Bull / Bear / Ranging / High-Vol

Each indicator scores 0-2 points (bear/neutral/bull). Total 0-10. Trades fire only at high confidence in the current regime. Exact thresholds are hyperopt-tuned and live in the strategy file.

Exits use a hyperopt-tuned ROI ladder + custom_exit cascade:

  • early_loss_cut_2h / 4h / 8h / 16h β€” staged early-exit ladder if a trade isn't working
  • time_exit_24h β€” hard cap on holding period
  • trend_broken β€” exit if structural EMA setup reverses
  • Hyperopt-tuned ROI ladder + trailing stop layered on top

Concrete numeric thresholds live in TrendRiderStrategy_public.py and update each time we re-run hyperopt with fresh data.


Quick Start

Prerequisites: Python 3.10+, Docker (recommended), a Bybit account (testnet for dry-run).

# 1. Clone this repo
git clone https://github.com/darkvolg/Trading.git
cd Trading/FreqtradeBot

# 2. Install Freqtrade (follow https://www.freqtrade.io/en/stable/installation/)

# 3. Copy config and add your Bybit testnet API keys
cp config.json my-config.json
# Edit my-config.json β€” set "key" and "secret"

# 4. Download historical data (one-time)
freqtrade download-data --exchange bybit --timeframe 1h \
  --pairs BTC/USDT:USDT ETH/USDT:USDT SOL/USDT:USDT DOGE/USDT:USDT \
  --timerange 20260104-20260423

# 5. Run a backtest to verify the same numbers we publish
freqtrade backtesting --config my-config.json \
  --strategy TrendRiderStrategy --strategy-path user_data/strategies \
  --timerange 20260104-20260423

# 6. Go live in dry-run mode (paper trading)
freqtrade trade --config my-config.json --strategy TrendRiderStrategy

Full setup walkthrough: Freqtrade Tutorial 2026: From Zero to Live Trading Bot


How to Verify Our Claims

Don't trust β€” verify. Here's how to check every claim on this page yourself:

Claim How to verify
Backtest stats Clone repo, run backtest command above. Reproduce locally on the same data the bot uses.
Live stats Visit /live β€” JSON API at /api/live-stats.json updated every 5 min directly from the bot's SQLite DB
Walk-forward validation Read git history β€” every hyperopt commit includes the in-sample + out-of-sample numbers, so curve-fitting is visible if it happened
No external paid APIs Search the strategy file β€” only TA-Lib indicators, no requests calls to paid services
Open-source You're reading the source.

Repo Structure

Trading/
β”œβ”€β”€ FreqtradeBot/                      # Bot configuration + strategy
β”‚   β”œβ”€β”€ config.json                    # Pair whitelist, max trades, exchange
β”‚   └── user_data/strategies/
β”‚       └── TrendRiderStrategy_public.py   # The strategy itself
β”œβ”€β”€ landing/                           # trendrider.net source code (Next.js)
β”‚   β”œβ”€β”€ app/blog/                      # 50+ articles on bot design, SEO
β”‚   β”œβ”€β”€ app/live/                      # Public live dashboard
β”‚   └── components/                    # UI
└── README.md                          # This file

The strategy file is the only file you need to run the bot. The landing/ folder is the marketing site source β€” included for transparency, not required for trading.


Live Performance Methodology

The /live dashboard is fed by scripts/export_live_stats.py (on the production server) which:

  1. Reads tradesv3.dryrun.sqlite β€” the bot's SQLite trade log
  2. Aggregates: total/closed/open trades, P&L, win rate, exit-reason breakdown
  3. Writes JSON to /var/www/trendrider/api/live-stats.json
  4. Cron runs this every 5 minutes

Numbers can't be massaged β€” the JSON is direct from the database the bot writes to.


Hyperopt + Walk-Forward Methodology

Parameters (entry thresholds, ROI ladder, stoploss, trailing stop) are tuned via Freqtrade hyperopt β€” periodically re-run with fresh data.

Process:

  1. Train (in-sample) β€” hyperopt searches parameter space on the bulk of historical data
  2. Hold-out (out-of-sample) β€” a final ~14 days is reserved and never seen during hyperopt
  3. Validation gate β€” new params must beat the previous baseline on the hold-out window. If they don't, they don't ship
  4. Commit β€” every parameter change goes to git with the in-sample + out-of-sample numbers, so curve-fitting is visible after the fact

When a hyperopt run fails the validation gate (it has happened β€” we've rolled back), the live bot stays on the previous baseline rather than chasing pretty in-sample backtests. The most recent successful set of params is what's running on /live.


Roadmap

  • PR #334 merged into freqtrade/freqtrade-strategies
  • First monthly performance report (end of April 2026)
  • 30 days of live data β†’ switch from $500 paper to $500 real-money
  • Pro Pack: pre-tuned config + monthly hyperopt updates (paid tier)
  • Multi-exchange support (Binance, OKX) β€” currently Bybit only

Disclaimer

This is not financial advice. Past performance does not guarantee future results. Cryptocurrency trading involves substantial risk of loss. Backtests model historical conditions and may not reflect future market behavior. Live results so far are paper-trading only β€” no real money has been risked.

If you choose to run this strategy with real funds:

  • Start with the smallest amount you can afford to lose entirely
  • Keep dry-run mode active for at least 30 days first
  • Monitor the bot's behavior in your specific market conditions
  • Understand that any bot can have a losing streak

Contributing

Issues and PRs welcome. Particularly interested in:

  • Bug reports with reproducible scenarios
  • Ideas for additional indicators or exit logic (please backtest first)
  • Documentation improvements

License

GPL-3.0 β€” same license as Freqtrade itself, the framework this strategy runs on. You're free to use, modify, and redistribute, as long as derivative works remain open-source under the same license.

See LICENSE for full text.


Links

About

Open-source crypto trading strategy for Freqtrade. Multi-indicator confluence + hyperopt-tuned. Live performance public, every trade verifiable.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors