CodePilot Quick Start Guide
This guide explains how to use CodePilot correctly to build:
- Automated trading robots (cBots)
- Custom indicators
- Risk and trade management tools
- Charting and visual trading tools
CodePilot works best when used iteratively.
Following this guide reduces build errors and wasted credits.
Core Rule
Warning
Always build in small steps.
Start with a working baseline, then add one feature at a time.
Most build problems come from requesting too many features in a single step.
Recommended Build Workflow
Use this loop for every trading tool:
- Request a baseline build
- Compile and test in cTrader Algo
- Verify behaviour
- Request one change
- Repeat
Note
Do not skip steps. Each step assumes the previous one is working.
Step 1: Start With a Baseline Build
Your first request should ask for a core or baseline version only.
A baseline build should include:
- Correct indicator or cBot structure
- Required parameters
- Minimal logic
- No advanced features
Example Baseline Prompts
Indicator
Build a baseline cTrader indicator with a moving average plotted on the chart.
No alerts and no trading logic.
cBot
Build a baseline cTrader cBot with parameters and OnBar logic.
Do not place any trades yet.
Step 2: Copy and Build in cTrader Algo
When CodePilot returns a full source file:
- Copy the entire file
- Paste it into cTrader Algo
- Build immediately
Do not continue until:
- ✅ The code compiles without errors
- ✅ The indicator or cBot loads correctly
Danger
If the code does not build, stop here and fix it before continuing.
Step 3: Test Existing Features
Before asking for anything new:
- Attach the indicator to a chart, or
- Run the cBot in backtest or demo
Confirm:
- Parameters behave as expected
- Visual output is correct
- No runtime errors occur
Step 4: Add One Feature at a Time
Once the current version works, request one change only.
Good Examples
- Add an alert
- Add a stop loss rule
- Add a second indicator
- Add a chart drawing element
Bad Examples
- Add alerts, risk management, filters, UI panels, and optimisations
Example Incremental Prompt
Add a configurable alert when the moving average crosses price.
Do not change any other logic.
Step 5: Repeat the Loop
After each change:
- Copy the full file
- Build in cTrader Algo
- Test again
Success
This incremental approach is how professional trading tools are built.
Using Workflows (Strongly Recommended)
CodePilot includes guided workflows to improve accuracy.
Use a workflow when:
- Building a new indicator or cBot
- Modifying existing code
- Converting from MT4, MT5, or Pine Script
- Adding risk or trade management
Use free typing when:
- Asking conceptual questions
- Exploring ideas
- Understanding behaviour
Info
Workflows define intent before code is generated, reducing ambiguity and errors.
Important Behaviour to Understand
- CodePilot returns full source files, not snippets.
- Each response assumes the current version is correct.
- CodePilot cannot see local build errors unless you paste them back.
If something breaks:
- Paste the compiler error, or
- Paste the full current source file
- Ask for a fix only, not new features
Common Mistakes to Avoid
- Requesting many features at once
- Not compiling between changes
- Editing code manually without telling CodePilot
- Mixing indicator logic with trade execution
- Skipping baseline builds
Before You Ask for the Next Feature
Confirm that:
- ✅ The code builds successfully
- ✅ Existing features work
- ✅ You know exactly what you want to add next
If yes, continue.
If no, stop and fix first.
Final Advice
Quote
CodePilot is a development partner, not a magic button.
Follow the workflow. Build iteratively.