DEV Community

Sohaib
Sohaib

Posted on

Building an aesthetic trading automation tool

I built BinancyXBot, a Python bot that trades crypto on Binance by itself, and a Unity city where you can watch it happen. One important note first: every dollar in it is virtual. The bot is still in testing, so it paper-trades or uses the Binance testnet, and no real money is at stake.
The bot runs six kinds of strategy, each with its own account: EMA crossover, breakout, momentum, RSI dip buying, Bollinger dip buying and a gradient-boosted ML classifier. Buy-and-hold runs alongside them as the benchmark. Every strategy is checked with a walk-forward test: it picks its settings from past data only, then gets scored on months it has never seen, with fees included.

Turning it into a neon city in Unity

The Python side streams live prices and every agent's trades to Unity. Each strategy becomes a skyscraper:

• Its height follows the account value.
• Its window lights follow its performance.
• Its neon trim shows the coin it holds, and turns red during a drawdown.

At the centre stands the exchange tower, with holographic rings and price boards. Each trade fires a beam of light between the exchange and a tower: buys fly in, sells fly out. Rain, haze, bloom and a cinematic camera mode for recording finish the look.

Seeking Claude's help

I designed the project and made the calls, and I used Claude as a coding partner along the way. It helped me write parts of the walk-forward lab, debug the trading logic and tune the Unity shaders. Next, I plan to rerun the lab on 3-minute candles before any money goes near it.

Top comments (3)

Collapse
 
koda2026 profile image
Harun - solo dev •

sohaib, this is a brilliant fusion of quantitative finance and real-time 3d visualization. mapping account equity to skyscraper height and drawdowns to red neon trim is a fantastic way to make abstract portfolio metrics instantly readable.

the commitment to walk-forward testing with fees included is what separates toy bots from serious quant systems. too many devs just do standard k-fold cross-validation and get destroyed by look-ahead bias in live markets.

you mentioned planning to rerun the lab on 3-minute candles. that’s a massive jump in data granularity and market noise. for the gradient-boosted ml classifier, how are you handling feature drift and the increased transaction cost drag at that timeframe? are you adjusting the walk-forward training window size (e.g., using a shorter anchor period) to prevent the model from overfitting to micro-structure noise, or are you relying on the fee-included scoring to naturally penalize the over-trading?

would love to hear how the 3m backtest compares to the higher timeframes!

Collapse
 
sohaibs_ea168b94720 profile image
Sohaib •

I am only relying on the fees costing structure to penalize the model and I had lab run the tests only on 1h candles so i have yet to test the 3m candles making specific adjustments to the window size and an explicit turnover penalty. I would let you know once what I have be doen with these experiments

Collapse
 
koda2026 profile image
Harun - solo dev •

sohaib, relying on the fee-costing structure as the primary penalty is a highly robust approach. it naturally filters out the "death by a thousand cuts" overtrading that plagues most ml classifiers in backtests.

looking forward to hearing how the 3m candle experiments pan out. adding an explicit turnover penalty will definitely be the key to stabilizing the model at that higher frequency. keep me posted on the results! 📈🐯