Projects

Trading bot

A trend-following bot for Kraken that paper-trades on live prices and sends a signal when it would buy or sell.

Tool Trading Paper trading

About

It trades SOL, ETH and XRP against the dollar. A 4-hour trend filter decides whether to trade at all, an hourly entry needs the trend, momentum and the state of Bitcoin to agree, and every position carries a stop that trails behind the price.

The same strategy runs in three places: on a PC with its own dashboard, inside this site's server with a dashboard in the admin, and in a backtester that replays real Kraken history through it. The copy on the server holds no exchange keys; it trades a simulated $10,000 account and emails its signals.

The strategy

Entries

Two ways in: a pullback that crosses back above the 21-period average, or a breakout after the Bollinger Bands squeeze inside the Keltner Channels. Either needs five of six checks to agree.

Exits

A stop 2.5 times the average true range below the entry, raised on every hourly close. Half the position is sold at twice the risk, and the stop moves to break even.

Risk

Each trade risks a fixed share of the account, smaller when the market is volatile, and a pair is left alone for a while after a losing trade.

Features

  • A 4-hour trend filter and a Bitcoin risk-on, risk-off switch
  • Two entry models: trend pullback and squeeze breakout
  • ATR trailing stop, partial take-profit and a move to break even
  • Position size scaled to volatility, and a cooldown after a loss
  • Paper trading with the exchange fee and slippage included
  • A backtester that replays real Kraken candles through the live code
  • A TradingView Pine Script version of the same strategy
  • Live dashboards over server-sent events, with email and desktop alerts
  • Plain Node.js with no npm packages

More projects