Build & Test Trading Algorithms in Python
Write strategy scripts, backtest them against real historical data bar-by-bar, and analyze every trade. Start from built-in templates or code from scratch — the Algo Playground gives you everything you need to develop and refine algorithmic trading strategies.
Everything You Need to Build Trading Algorithms.
A complete environment for writing, testing, and analyzing Python trading strategies — with built-in templates, real-time backtesting, and a Simulator API for bots.
Python Code Editor
Write strategies in Python with a full-featured Monaco code editor. Syntax highlighting and auto-completion, with errors reported in the output log when you run.
Built-in Templates
Start fast with pre-built strategy templates — SMA Crossover, RSI Scalper and Channel Breakout, plus a blank Custom template. Run them with adjustable parameters, or start from the blank template.
Real-Time Backtesting
Watch your strategy execute against real historical data bar-by-bar. Track account balance, positions, and P&L as the backtest runs.
Strategy Comparison
Save multiple runs and compare performance side-by-side. Test different parameters, timeframes, or instruments to find your edge.
Bot API
The Simulator API uses a common futures-gateway REST schema, so bots written against that schema run on TestMax with a base-URL change.
Trade Logs & Metrics
Every trade is logged with entry, exit, P&L, and duration. View equity curves, win rate, and drawdown for each strategy run.
How It Works
Choose a Template
Pick from built-in strategy templates or start with a blank canvas in the code editor.
Configure Your Backtest
Select the instrument, timeframe, date range, and execution speed for your strategy run.
Run & Monitor
Execute your strategy and watch it trade bar by bar on historical data. Adjust speed or stop at any point.
Analyze Results
Review trade logs, equity curves, and performance metrics. Save runs and compare across strategies.
Write Strategies in Pure Python
Code, Test, Iterate
The Algo Playground gives you a full-featured code editor with syntax highlighting and auto-completion; errors show in the output log when you run. Write your strategy logic in Python using a simple, intuitive API.
Every strategy receives market data bar-by-bar and can place orders, check positions, and manage risk — just like a real trading bot. When your strategy is ready, hit run and watch it execute against historical data in real time.
The Simulator API uses a common futures-gateway REST schema, so bots written against that schema run on TestMax with a base-URL change.
for i in range(MAX_BARS):
bar = get_next_bar()
if bar is None:
break
closes.append(bar["c"])
if len(closes) < 30:
continue
fast = sum(closes[-10:]) / 10
slow = sum(closes[-30:]) / 30
if fast > slow and position != "LONG":
place_order(ACCOUNT_ID, CONTRACT_ID, 0, 1) # buy
position = "LONG"
elif fast < slow and position == "LONG":
place_order(ACCOUNT_ID, CONTRACT_ID, 1, 1) # sell
position = NoneFrequently Asked Questions
What programming language does the Algo Playground use?
Do I need programming experience?
Is the Algo Playground a Pro feature?
Can I run my strategy outside the Playground?
Ready to Build Your First Strategy?
Start from a template or write your own from scratch. The Algo Playground gives you everything you need to develop, test, and refine trading algorithms.
Sign Up FreeNo credit card required. Free plan available.