Skip to content

Python Code Editor Documentation

Welcome to the comprehensive documentation for the SpeedBot Python Code Editor. This guide will help you develop custom trading algorithms using Python.

Quick Start

Get started with your first algorithm in just a few steps:

  1. Environment Setup - Set up your development environment
  2. Quick Start Guide - Create your first algorithm
  3. Core Concepts - Understand the fundamentals

What You'll Learn

This documentation covers everything you need to know about developing custom trading algorithms:

Core Concepts

  • Initialization - Setting up your algorithm environment
  • Execution - Running your strategy logic
  • Pre-built Functions - Leveraging provided tools and utilities

Essential Methods

  • _init - Algorithm initialization and setup
  • _ontick - Main execution logic
  • _post_init - Post-initialization configuration

Trading Functions

  • Entry/Exit - Placing and managing trades
  • Stop Loss & Target - Risk management
  • Re-entry & Re-execution - Advanced trading strategies

Key Features

  • Easy Setup - Simple environment configuration
  • Rich API - Comprehensive set of pre-built functions
  • Flexible Trading - Support for equities, options, and futures
  • Risk Management - Built-in stop loss, target, and trailing stop loss
  • Advanced Strategies - Support for spreads, straddles, and complex strategies

Documentation Structure

graph TD
    A[Getting Started] --> B[Environment Setup]
    A --> C[Quick Start]
    A --> D[Installation]

    E[Core Concepts] --> F[Overview]
    E --> G[Initialization]
    E --> H[Execution]
    E --> I[Pre-built Functions]

    J[Essential Methods] --> K[_init Method]
    J --> L[_ontick Method]
    J --> M[_post_init Method]

    N[Functions Reference] --> O[Setup Functions]
    N --> P[Trading Functions]
    N --> Q[Data Functions]
    N --> R[Utility Functions]

    S[Examples] --> T[Basic Algorithm]
    S --> U[Stop Loss & Target]
    S --> V[Re-Entry Strategy]
    S --> W[Spread Strategy]
    S --> X[Straddle Strategy]
    S --> Y[Re-Execution Strategy]
    S --> Z[MTM Strategy]

    AA[Advanced Topics] --> BB[Day-wise Settings]
    AA --> CC[Momentum Trading]
    AA --> DD[Range Breakout]
    AA --> EE[Trailing Stop Loss]

    FF[API Reference] --> GG[Classes]
    FF --> HH[Enums]
    FF --> II[Methods]

Prerequisites

Before you begin, ensure you have:

  • Basic knowledge of Python programming
  • Understanding of trading concepts
  • Access to the SpeedBot platform

Support

If you need help or have questions:

  • Check the Examples section for working code samples
  • Review the API Reference for detailed function documentation
  • Contact our support team for additional assistance

Ready to start? Begin with the Environment Setup guide.

Back to top