Educational trading system source code and documentation, published for study. Selected projects are available at no cost, while advanced versions and premium educational code packages may be offered as paid digital downloads. Each project includes source, architectural documentation, and annotated commentary explaining the engineering decisions behind professional-grade trading infrastructure.
Each project below represents a complete, working system built by the Coronet Berkley team. The source code is published with full documentation so learners can study how professional trading infrastructure is designed, not just what it does, but why each decision was made.
A complete automated trading engine that connects to a brokerage API, reads live market data, evaluates configurable signal conditions, executes orders, and manages positions with automated stop-loss and take-profit logic. Built for micro futures contracts on the Schwab platform.
Studying this codebase teaches the full architecture of a production trading system: how to structure modular signal evaluation, how to implement risk management as a separate concern from signal generation, how to build trade logging for post-session analysis, and how to handle the real-world complexities of API authentication, rate limiting, and order lifecycle management.
A four-module indicator suite written in ThinkScript for the thinkorswim (Schwab) charting platform. The system evaluates trend structure, momentum conditions, volume confirmation, and volatility breakout levels, then presents the analysis through visual overlays, a real-time dashboard HUD, and configurable alert conditions.
Studying this codebase teaches how professional charting indicators are structured: how to layer multiple analytical frameworks into a cohesive system, how to build visual feedback that communicates signal quality at a glance, how to use VWAP deviation bands for context-aware entries, and how to design alerts that fire only when multiple independent conditions align.
The second-generation APEX indicator suite introduces a dynamic trend state engine that replaces the static EMA stack check used in v1. Where v1 could only report BULLISH, BEARISH, or MIXED, often lagging behind violent reversals, v2 detects trend weakening in real time by measuring EMA slope direction independently from stack alignment. The result is a five-state system (Trending Bull, Weakening Bull, Transition, Weakening Bear, Trending Bear) that catches momentum shifts before the moving averages cross.
Studying this codebase teaches how to evolve a first-generation indicator into a more responsive system: how to add leading indicators alongside lagging ones, how to build state machines in ThinkScript, how EMA slope detection works as an early-warning mechanism, and how to expand a scoring system from 6 to 8 conditions while recalibrating entry thresholds.
Download the zip file below. Right-click the zip, select Extract All. You will get five files: four .ts ThinkScript modules and a README_v2.txt.
Windows may associate .ts files with a media player. Right-click each file, choose Open With, then select Notepad to see the ThinkScript code inside.
Open thinkorswim. Go to the Charts tab, click the beaker icon (Studies), then Edit Studies, then Create. For each module: clear the editor, paste the code from Notepad (Ctrl+A, Ctrl+C, Ctrl+V), name the study exactly as shown below, then click Reformat Code to verify zero errors before saving.
APEX_Main_v2
APEX_Dashboard_v2
APEX_Alerts_v2
APEX_VolumeEngine_v2
In Edit Studies, check all four v2 modules. Modules 1 through 3 are upper-chart studies. Module 4 is a lower subgraph (volume panel). If upgrading from v1, uncheck the old modules but do not delete them.
Recommended timeframes: 1-minute or 5-minute for day trading, 15-minute for intraday swing. Remove the default Volume study if present, as Module 4 replaces it. Resize the volume panel to approximately 20 to 25 percent of total chart height.
Launch price: $79. Educational ThinkScript source code and documentation for thinkorswim.
A two-part options flow analysis system: a Python scanning engine that monitors options chains across a configurable watchlist, detecting unusual volume, premium flow imbalances, IV surface anomalies, and large institutional trades; and a ThinkScript overlay that provides real-time options context directly on thinkorswim charts including IV percentile, put/call ratios, and composite flow scoring.
Studying this codebase teaches how institutional options positioning can be inferred from publicly available data: how to compare volume against open interest to identify new positions, how to calculate net premium flow to gauge directional conviction, how to detect IV surface anomalies (skew inversions, term structure inversions) that signal expected catalysts, and how to aggregate multiple independent signals into a composite score.
Textbooks explain concepts. Source code shows how those concepts survive contact with reality. A chapter on risk management describes the theory; a working risk module shows how that theory handles edge cases, API failures, and the difference between a backtest and a live market. We publish our code because we believe the architecture of a trading system teaches as much as the strategy behind it.
Every project in this library is built by the Coronet Berkley team using the same engineering standards we teach in our programs. The code is annotated, the design decisions are documented, and the systems are functional. Learners are free to study, fork, modify, and build upon anything published here. The only thing we ask is that you understand the risks of deploying trading systems with real capital, and that you take responsibility for your own decisions.
We publish new open-source trading systems and indicator suites periodically. Leave your email to hear about them first.
Code releases only. No marketing, no spam.
Yes. All source code in this library is provided at no cost for educational study. You are free to read, modify, and learn from it. If you choose to deploy any code in a live trading environment, you do so at your own risk and are solely responsible for the outcome.
The code is functional, but it is published as educational material, not as a production-ready trading product. If you deploy it, you should thoroughly understand every module, test extensively in a paper trading environment first, and never risk capital you cannot afford to lose. We do not guarantee the profitability or reliability of any system.
The source code is provided as-is with documentation. For guided instruction on trading system architecture, signal design, and risk management frameworks, explore our educational programs, which cover these topics in depth with structured curriculum and direct instruction.
For the ThinkScript indicator suite, minimal programming knowledge is needed. ThinkScript is a domain-specific language designed for non-programmers. For the Python trading engine, intermediate Python experience and familiarity with API concepts are recommended. Both projects include documentation that explains the code line by line.
Most commercial trading bots are black boxes: you pay, you run them, you hope they work. This library takes the opposite approach. Every line of logic is visible, documented, and explained. The goal is not to give you a tool to run blindly, but to teach you how trading systems are engineered so you can build, evaluate, and improve your own.