Quick Navigation
Help & User Guide
Everything you need to know about using Codebull
Getting Started
What is Codebull?
Codebull is a modern trading platform that allows you to paper trade, experiment with strategies, and deploy automated trading bots—all from your browser. Whether you're learning trading basics or testing sophisticated algorithms, Codebull provides a sandbox environment with real market data.
First Steps
- Create an Account: Sign up with email or Google to get started with a virtual $10,000 balance.
- Browse Instruments: Visit the Instruments page to explore available stocks and securities.
- Place Your First Order: Use the Quick Trade form on the Dashboard to buy or sell.
- Monitor Your Portfolio: Check your Portfolio to see positions and P&L.
Trading
Order Types
- Market Order: Executes immediately at the best available price.
- Limit Order: Sets a maximum (buy) or minimum (sell) price. Only executes when the market reaches your price.
- Stop Loss: Triggers a market order when price reaches your stop price—useful for limiting losses.
- Stop Limit: Combines stop and limit: triggers a limit order when stop price is reached.
- Trailing Stop: Dynamically follows the price at a specified distance, locking in profits as the market moves in your favor.
Placing Orders
Use the Quick Trade form on the Dashboard or visit the Orders page:
- Select a symbol (e.g., AAPL, TSLA)
- Choose Buy or Sell
- Enter quantity
- Select order type and set any required prices
- Click Submit
Order Matching
Codebull uses a real-time order book matching engine. Market orders execute immediately against the best available opposite orders. Limit orders wait in the book until matched with a counterparty.
Portfolio Management
Your Positions
The Portfolio page shows all your open positions with:
- Quantity held
- Average cost basis
- Current market value
- Profit/Loss (realized and unrealized)
Cash Balance
Your account balance tracks available cash and updates in real-time as you trade. Multi-currency support and auto-FX conversion are available in advanced tiers.
Instruments
Instrument Catalog
Browse available instruments on the Instruments page. Search by symbol, name, or ISIN. Real-time price data is provided via Yahoo Finance.
Market Data
Instruments automatically refresh in the background with gentle rate-limiting to respect data provider limits. Historical data is available for backtesting strategies.
Strategies & Automation
What are Strategies?
Strategies are automated trading bots written in Python that run server-side. They receive real-time price updates and can place orders automatically based on your logic.
Creating a Strategy
Visit the Strategies page and click "New Strategy":
- Write your strategy code in the editor
- Define an
on_new_tick(self, symbol, price, ctx)method - Use
ctx.place_order()to submit orders - Use
ctx.log()for debugging - Enable the strategy to start receiving ticks
Example Strategies
class Strategy:
def __init__(self):
self.last_price = None
def on_new_tick(self, symbol, price, ctx):
# Simple momentum strategy
if self.last_price and price > self.last_price * 1.01:
ctx.place_order(symbol, "buy", 10, "market")
ctx.log("Bought on uptrend", price=price)
self.last_price = price
Backtesting with Simulator
Test strategies on historical data using the Simulator. Set a date range, select symbols, and watch your strategy execute against past market conditions. Perfect for validating logic before going live.
Arena - Strategy Competition
What is Arena?
Arena is a competitive environment where multiple strategies compete against each other in a shared market. Each strategy starts with equal capital and trades on the same instruments over a defined period.
Creating an Arena
Visit the Arena page:
- Click "Create Arena"
- Select strategies to compete
- Set time range and symbols
- Configure starting capital
- Run and compare results in real-time
Understanding Results
Arena shows a leaderboard ranked by profit, displaying each strategy's ROI%, final balance, trade count, and win rate.
Frequently Asked Questions
Support & Resources
Documentation
- 📖 Interactive Tutorial - Learn trading basics step-by-step
- 🧩 Block Reference - Complete guide to all strategy blocks
💡 Quick Tips
- Start small: Test strategies with small quantities before scaling up
- Use the Simulator: Always backtest strategies on historical data first
- Monitor logs: Check strategy logs regularly to understand bot behavior
- Limit orders: Use limit orders to control execution price
- Risk management: Implement stop losses to protect against large losses