Modern algorithmic trading demands precision, flexibility, and real-time responsiveness. This comprehensive guide walks you through every essential component of a powerful modular trading client designed for futures, equities, and digital assets. From account integration and strategy deployment to advanced diagnostics and automated execution tools, this manual ensures you harness the full potential of your trading environment.
Whether you're managing live accounts, backtesting strategies, or fine-tuning performance, the system’s modular architecture provides intuitive control with enterprise-grade capabilities. Below, we break down each panel and function with clear instructions and best practices.
Core Features Overview
The trading interface is built on a modular integration framework, offering high customizability and visual clarity. Each functional module operates independently yet seamlessly synchronizes data across panels. This design enables:
- Dynamic layout adjustments based on user preference
- Real-time monitoring of trading, market data, and strategy performance
- Independent process management for accounts, strategies, and data sources
A key advantage is flexible statistical aggregation—for instance, the Position panel dynamically reflects holdings based on selected strategies or accounts, enabling granular performance tracking.
👉 Discover how to optimize your algorithmic workflow today.
Managing Trading Accounts
The Trading Account Panel allows full lifecycle management of trading connections, including adding, editing, launching, and deleting accounts across multiple brokers and asset classes.
Adding a New Account
To integrate a new trading account:
- Click the "Add" button in the Trading Account Panel.
Select the counter type: CTP (futures), XTP (equities), or SIM (simulation).
Note: SIM counter uses randomized data for testing purposes only.
Example: Adding a CTP Account
After selecting CTP, configure the following fields:
| Field | Description |
|---|---|
| Account Name | Internal label for identification |
| Account ID | Provided by broker (e.g., 089270) |
| Password | Broker-issued password |
| Broker ID | Broker code (e.g., 9999) |
| Auth Code | For穿透式 authentication; use 0000000000000000 for simulation |
| Client Name | Set as “KUNGFU” |
| Client ID | Use “TAURUS_KUNGFU_2.0” (live) or “simnow_client_test” (simulated) |
| Trade IP & Port | Provided by broker |
| Sync External Orders | Enables syncing orders from other platforms |
| Restore Today's Orders | Pulls当日 orders on startup |
| License Code | Required license key (purchased separately) |
Click "Confirm" to save. Then toggle the process switch to activate.
Similar steps apply for XTP (equity) and SIM (simulation) accounts with field variations specific to each counter.
Launching and Monitoring Accounts
Click the process toggle to start an account. A status of "Ready" indicates successful login.
Editing Account Settings
Click "Account Settings" to view or modify configurations.
Important: Changes take effect only after restarting the account process.
Accessing Logs
Click the log icon to open real-time logs in a new window—essential for troubleshooting connectivity or execution issues.
Deleting an Account
Deleting removes all associated data: order history, trade records, and logs.
Warning: Export critical data before deletion.
Configuring Market Data Feeds
The Market Data Panel connects to real-time price feeds. It pulls行情 from the same credentials used in trading accounts.
Adding a Market Source
- Click "Add" in the Market Data Panel.
- Choose counter: CTP, XTP, OKX (crypto), BinanceFuture, or SIM.
Supported Exchanges
- CTP/XTP: Traditional futures and equities
- OKX / BinanceFuture: Cryptocurrency derivatives
- SIM: Simulated market feed
Example: Setting Up OKX Market Feed
Upon selection, configure:
| Option | Purpose |
|---|---|
| Enable Ticker Push | Streams ticker updates (may increase memory usage) |
| Enable Transaction Push | Enables tick-level trade data |
| Enable Fee Push | Receives fee structure updates |
Click "Confirm" to activate.
Starting and Managing Data Streams
Toggle the process button to start. Status changes to "Ready" upon successful connection.
Edit settings via "Market Source Settings." Modifications require a restart if the feed is active.
Use the log viewer to monitor feed stability and latency.
Caution: Removing a market source disrupts dependent processes like strategies and algorithms.
Strategy Management Panel
This panel acts as a strategy workspace where users can import, edit, launch, and debug algorithmic logic in real time.
Adding a Strategy
- Click "Add."
Enter:
- Strategy ID: Unique identifier
- Strategy Path: Local
.pyfile path (must be on same drive as installation)
Note: Ensure trading (TD) and market data (MD) processes are ready before launching.
Launching and Stopping Strategies
Toggle the process button to start or stop execution.
Real-Time Code Editing
Built-in IDE supports live code editing. Click "Edit" to modify Python scripts—the system auto-saves changes instantly.
Strategy Logs
View runtime logs in a pop-up window for debugging logic flow and error detection.
Deletion Process
Click delete to remove a strategy. The system automatically stops its execution first.
Backtesting & Replay Tools
The Replay Tool enables post-trade analysis using historical sessions without affecting live operations.
Use Cases
- Debugging with detailed logs
- Simulating modified strategies using real market data
- Comparing performance under different fee structures
Increasing Log Detail
Change log level to debug during replay to trace deeper execution paths.
Testing Modified Logic
Edit strategy code (e.g., changing entry condition from price + 1 < 200 to price + 2 < 200), then replay against past sessions to simulate outcomes.
Fee Impact Analysis
Insert logging for commission:
context.log.info("[on_trade] OrderID: {}, Volume: {}, Commission: {}".format(trade.order_id, trade.volume, trade.commission))Modify fee settings in Global Settings → Futures Fees, then replay with Matcher enabled to see cost differences.
👉 Explore advanced backtesting techniques with precision tools.
Diagnostic & Journal Analysis
The Diagnostic Tool reads journal files—rich data logs capturing every system event, including quotes, trades, and internal messages.
Key Capabilities
- Filter by timestamp, message type, or keyword
- Visualize order flow relative to market movements
- Track latency between signal and execution
- Analyze multi-leg order sequences via
order_id
Access via the "eye" icon next to any process. Click "Enter Visualization" for graphical insights.
Large journals load 2,000 entries at a time—scroll to load more.
Use Ctrl+F to search within logs quickly.
Operator Panel: Efficient Computation Sharing
Operators reduce redundant calculations by decoupling heavy computations (e.g., ML models, K-line generation) from strategies.
Types of Operators
- Plugins: Pre-built modules (e.g., bar generators)
- Files: Custom Python scripts
Common Use Cases
- Generate minute-level K-lines from tick data
- Compute predictive factors (e.g., volatility indices)
- Calculate optimal target positions using models
Results are tagged as SyntheticData in diagnostics.
Adding a Bar Generator Plugin
Configure:
- Bar ID: Unique identifier
- Source: e.g., CTP, XTP
- Instruments: One or more symbols
- Period: In seconds (e.g., 60 = 1-minute bars)
Subscribing in Strategy Code
def pre_start(context):
context.subscribe_operator("bar", "my-bar")
def on_synthetic_data(context, data, loc, dest):
context.log.info("Received bar data: %s", data)Ensure dependency order when chaining operators (op2 after op1).
Position & Order Tracking Panels
Position Panel
Displays real-time holdings with:
- Search, refresh, and export functions
- Filtering by account or strategy
- Floating P&L, average entry price, latest market value
Customize displayed columns via Global Settings → Trading → Position Table Configuration.
Order Record Panel
Tracks all submissions with:
- Filtering by symbol or completion status
- Real-time statistics per instrument
- Actions: cancel, amend, pre-cancel
- Export by date range (night session orders roll into next business day)
Use right-click for detailed order info including order_id.
Trade Record Panel
Logs executed transactions with:
- Timestamps (exchange vs system)
- System delay metrics
- Search and export options
Real-time stats help assess fill quality and execution speed.
Automated Trading Tasks
Four task types support automated execution:
Conditional Orders
Trigger trades based on:
- Price thresholds
- Time-based triggers
- Combined conditions (all must be met)
Supports limit/market orders with volume splitting.
Excel-Based Orders
Schedule multi-instrument orders via CSV:
- Fields: time, instrument_id, price_type, volume, side
- Single-sheet support only
- Process auto-closes after completion
Iceberg Orders
Break large volumes into smaller visible chunks:
- Next order fires only after prior one fully fills
- Minimizes market impact
TWAP Strategies
Distribute orders evenly over time:
- TWAP Remaining Cumulative: Adds unfilled volume to next batch
- TWAP Remaining Average: Spreads remainder across remaining intervals
- Final order behavior differs: one cancels at end time; the other aggressively completes using limit prices
Both support protection prices and congestion alerts.
Interface & Workflow Enhancements
Depth Market Panel
Shows 10-level bid/ask ladder:
- Red: Buy side
- Green: Sell side
- Click any level to auto-fill order panel
Syncs dynamically when clicking symbols from other panels.
Quick Order Shortcuts
Use keyboard controls:
Ctrl/Cmd + Shift + 1: Focus order panelTab/Shift+Tab: Navigate fieldsEnter: ConfirmSpace: Toggle checkboxes
Speeds up manual interventions significantly.
Global Configuration Settings
Accessible via Ctrl + ,, settings affect overall behavior:
System
- Set home directory (no Chinese characters)
- Adjust log verbosity
- Enable auto-restart on disconnection
- Skip archiving for faster startup (developer mode retains all logs)
Performance
- Enable "Ultra Mode" for low-latency processing (requires >4 CPU cores)
- Offload UI calculations to background processes
- Activate pure monitoring mode for minimal resource use
Strategy Environment
Supports local Python 3.9.x with custom modules via .whl installation.
Risk Controls
- Enable price deviation alerts ("wrong-way" trade prevention)
- Set close threshold warnings to avoid accidental full liquidation
- Disable confirmation popups for high-frequency workflows
Frequently Asked Questions
Q: Can I run strategies without launching market data?
A: No—strategies depend on active market (MD) and trading (TD) processes to function correctly.
Q: Why isn’t my strategy placing trades during replay?
A: Replay simulates logic but does not submit real orders. Use it for debugging and performance comparison only.
Q: How do I reduce memory usage with crypto feeds?
A: Disable unnecessary data pushes like Ticker or Transaction streams in the OKX/BinanceFuture settings.
Q: What happens if I edit a strategy while it’s running?
A: Changes are saved immediately but take effect only after restarting the strategy process.
Q: Can multiple strategies share one operator’s output?
A: Yes—this is a primary benefit of operators: avoid redundant computation across strategies.
Q: Is it safe to enable “Skip Archiving”?
A: Yes for regular users who don’t need historical journal analysis. It improves startup speed by cleaning old logs.
👉 Unlock next-generation trading automation with integrated tools and low-latency execution.