← All Posts
·5 min read

From Sales Manager to Crypto Bot Builder: My Weekend Project That Got Out of Hand

CryptoTypeScriptTrading

I should start with a disclaimer: I am a sales manager who builds software on nights and weekends. I am not a quant, I do not have a finance degree, and before this project I could not explain an EMA crossover to save my life. But I have always been fascinated by the idea of automated trading, and one Saturday morning that fascination got the better of me.

How It Started

I had been watching crypto markets for a while, noticing patterns that seemed predictable enough to code. Moving averages crossing, RSI showing oversold conditions, volatility expanding and contracting. I thought, "What if I could just write rules for this?"

The first version was embarrassingly simple. A Node.js script that checked if the 9 period EMA was above the 21 period EMA and, if so, logged "maybe buy" to the console. That was it. But that tiny script opened a door I could not close.

The Strategy

Over the following weeks, the script evolved into a proper trading system. The core strategy uses three exponential moving averages (9, 21, and 50 period) combined with RSI for confirmation and ATR for volatility based position sizing. In plain English: it looks for momentum shifts, confirms them with an overbought/oversold indicator, then sizes each trade based on how volatile the market is.

The risk management layer was the part I cared about most. Every trade risks a maximum of 1% of the account. Position sizes are calculated automatically based on the distance to the stop loss. There is a maximum leverage cap of 3x, and the system has drawdown limits that shut everything down if losses exceed a threshold.

The Emotional Part

The first time I let the bot trade with real money, I could not sleep. I kept checking my phone, watching it open and close positions at 3 AM while I lay in bed staring at the ceiling. It took about two weeks before I trusted it enough to actually go to bed normally.

There is something deeply strange about watching code you wrote make financial decisions. When it wins, you feel like a genius. When it loses, you immediately start reviewing your logic. The key insight I had was that individual trades do not matter. What matters is whether the system has a statistical edge over hundreds of trades.

The Tech Stack

The bot is built in TypeScript, running on Node.js with the ccxt library for exchange connectivity. It connects to Coinbase Advanced Trade for execution and uses SQLite for the trade journal. Every trade, every decision, every metric is logged and queryable.

I also built a companion web dashboard at rngcrypto.com that reads from the SQLite database and displays live P&L, trade history, win rates, and strategy performance. Because what is the point of building a bot if you cannot obsessively watch its performance in real time?

Lessons Learned

Building a trading bot taught me more about risk management than any sales training ever did. The parallels between managing a trading portfolio and managing a sales pipeline are surprisingly deep: you need diversification, you need to cut losers quickly, you need to let winners run, and you need a system that operates consistently regardless of your emotional state.

Is the bot profitable? Let me just say it is still running, and I am still building it. The journey from that Saturday morning "maybe buy" console log to a full production trading system has been one of the most rewarding projects I have ever tackled.