Building Your Own Trading Bot in F#
summary
Codebase is open source and written in F# and connects to Gemini (and adapters for Interactive Brokers / Alpaca), with a websocket reader thread filling a preallocated circular array thread‑safe datastore to avoid GC pauses. A client execution thread runs strategies (double moving average, mean reversion, momentum, Bollinger bands), supports backtesting on historical feeds, and demo shows a live Gemini candle feed and a sample bot executing bracketed orders with a cloud kill switch.
AI-written summary · about
chapters (22)
- 0:00Intro
- 1:08Objectives
- 2:08What is a Trading Bot
- 3:47Why do I need a Trading Bot
- 9:43Functional Programming
- 12:11Reference Architecture
- 15:34Code
- 16:10Circular Array
- 18:22Code Structure
- 19:56Data Source
- 21:40Reader Thread
- 24:59WebSocket
- 26:48Buffer
- 27:29Bucket
- 28:07Reset
- 29:43Live Feed
- 34:32Execution
- 36:05Backtesting
- 36:59Technical Indicators
- 38:19Trend Indicators
- 42:39Market is a Spring
- 45:55Questions
related talks
51mF# for Trading
53mREPL Driven Development, Scrum, and the Wright Brothers
51mClosing Keynote
40mSleeping Through the Volatility: Building an AI Agent for Automated Crypto Trading
50mAutomated algorithmic trading bot
37mAsyncio, websockets, and BTC sitting in a tree
30mPython for developing an automated trading platform
56mBuilding a Telegram Bot in Haskell (Part 1)
