Skip to content

Build a Plugin for Trading Platforms

What this Workflow Does

The Build a Plugin workflow helps you create a plugin that extends the functionality of a trading platform beyond standard indicators and strategies.

Plugins are typically used to:

  • Add custom tools or utilities
  • Build advanced panels or shared services
  • Integrate external data or functionality
  • Extend platform features not available to indicators or robots

This workflow focuses on correct structure, lifecycle handling, and stability.


When to Use This Workflow

Use this workflow when:

  • You need functionality that indicators or robots cannot provide
  • You are building reusable tools or extensions
  • You want tighter integration with the trading platform
  • You are comfortable testing and extending advanced code

Do not use this workflow for simple chart studies or basic automation.


What You Should Prepare

Before starting, make sure you have:

  1. A clear description of what the plugin should do
  2. Any required inputs, settings, or configuration
  3. An understanding of how the plugin interacts with the platform
  4. Any existing code or reference logic you want to reuse

Plugins should always start with a minimal, working base.


How to Interact with CodePilot

Describe the plugin in functional and structural terms.

Good examples:

  • “Create a plugin that exposes account information.”
  • “Build a background service that tracks market state.”
  • “Add a shared panel used by multiple tools.”
  • “Handle startup and shutdown cleanly.”

Avoid vague requests such as: - “Build an advanced plugin.” - “Add everything at once.” - “Make it powerful.”

Clear structure leads to stable plugins.


How CodePilot Builds Plugins

CodePilot will:

  • Generate a correct plugin skeleton
  • Follow the proper plugin lifecycle
  • Separate core logic from UI components
  • Add configuration options where appropriate
  • Return a complete, compile-ready file

CodePilot assumes plugins will be extended gradually and tested thoroughly.


Common Mistakes to Avoid

  • Skipping lifecycle handling
  • Mixing plugin logic with indicator or robot code
  • Adding complex features before the base works
  • Treating plugins like simple scripts

Plugins require careful, incremental development.


After building the plugin:

  • Test loading and unloading behaviour
  • Validate interactions with other tools
  • Extend functionality step by step

You may also want to explore: