THE EXCHANGE banner

THE EXCHANGE

2 devlogs
6h 2m 7s

The Exchange is a browser-based stock market simulator built entirely in HTML, CSS, and JavaScript. It features 15 fictional companies with a real-time price engine driven by four market forces — random volatility, trend drift, mean reversion, and…

The Exchange is a browser-based stock market simulator built entirely in HTML, CSS, and JavaScript. It features 15 fictional companies with a real-time price engine driven by four market forces — random volatility, trend drift, mean reversion, and live buyer/seller pressure. The UI includes a live line chart, an AI signal engine using RSI and moving average crossovers, a news event system that randomly pumps and dumps stocks, limit order support, a portfolio tracker, watchlists, and an achievements system.

This project uses AI

used chatGPT for generating the project banner, claude to solve my doubts, and writing the README file!!

Demo Repository

Loading README...

Sid Batra

Shipped this project!

built a browser-based stock market sim from scratch — 15 meme stocks, a live price engine, real-time news events that actually move markets, portfolio tracker, trade log, and a bankruptcy screen with a glitch effect for when you lose everything (which will happen).
no libraries, no build step, just vanilla JS, HTML canvas, and one very late night. used some AI help for content and unblocking myself when i got stuck. definitely not perfect — mobile’s broken, no save system, and HODL will do weird things if you wait long enough — but it runs and it’s genuinely fun for a few minutes.

Sid Batra

okay so. this is the last devlog and honestly i’m shipping this in a much different state than i originally imagined.
time got away from me pretty fast and there’s a lot i wanted to build that just didn’t happen — better mobile support, persistent saves, maybe a leaderboard, limit orders, sector-wide news events. the list was long. the hours were not.
that said i’m not mad at how it turned out. the price engine actually works, the news system genuinely moves markets, the UI has a vibe i’m pretty happy with. for something started at 11pm it held up.
a few honest notes: i used AI during this project — mostly for gathering content (the stock names, headlines, some CSS stuff) and for clearing up doubts when i got stuck. didn’t write the whole thing for me but it definitely helped me move faster than i would’ve otherwise. felt worth mentioning.
there’s a lot of room to improve this. the code isn’t clean in a lot of places, mobile is basically broken, and if you play long enough the prices get a little weird. but it runs, it’s fun for a few minutes, and i learned a bunch building it.
maybe i’ll come back to it. maybe not. for now — shipped.

Attachment
0
Sid Batra

okay so i finally started building The Exchange — a browser-based stock market simulator where you get $100 and trade 15 fake stocks without going broke. been thinking about this idea for like 2 weeks and today i actually sat down and did it.
first thing i set up was the HTML structure and CSS variables. i wanted it to look like a real trading terminal — dark theme, orange and red accents, monospace font. spent way too long on the color palette but honestly it looks sick so no regrets.
then i built the create account screen — the login page before the actual trading app. got the form working with name, email and password inputs and wrote the validation logic myself. checks for @ symbol in email, minimum password length, all that. figuring out how to show errors without refreshing the page was a small win — just updating a div with textContent dynamically.
the trickiest part was the screen transition. when you click OPEN TRADING ACCOUNT it should hide the login and show the trading app. i was staring at broken code for like 20 mins — turns out i had #app { display: none } in the CSS but forgot to write #app.on { display: flex } so adding the class did literally nothing 💀 used AI to help me spot that one.
after that i scaffolded the main three-column trading layout. used a bit of AI to help debug some overflow issues with the viewport height — kept getting random scrollbars appearing everywhere.
overall this project is tricky but so fun. loving every second of it.

Attachment
0