Table of Contents
Introduction
Signal Bots enable TradingView users to publish trading signals on OKX. This guide details alert message specifications for both PineScript™ strategy users and universal compatibility.
👉 Learn how to optimize your TradingView signals
Key Differences: Pine Script™ Strategies vs Indicators
- Strategies: Backtest trades using
strategy.*()functions, generating orders via broker emulator. - Indicators: Perform calculations without trade execution.
Compatibility Note: Both Section A (PineScript™-specific) and Section B (universal) formats are supported.
Section A (PineScript™ Strategy Users)
Tailored for PineScript™ strategies, this format integrates TradingView’s strategy placeholders:
| Parameter | Required | Values |
|----------------------|----------|-----------------------------------------|
| id | Yes | {{strategy.order.id}} |
| action | Yes | {{strategy.order.action}} |
| marketPosition | Yes | {{strategy.market_position}} |
| instrument | Yes | {{ticker}} or OKX instId (e.g., BTC-USDT-SWAP) |
| signalToken | Yes | Provided by OKX |
Recommended Settings:
- Set
investmentTypetobaseandamountto{{strategy.order.contracts}}for seamless alignment with TradingView strategies.
👉 Explore advanced PineScript™ strategies
Section B (Universally Compatible)
Works with any signal source, including manual alerts or custom indicators:
| Parameter | Values |
|----------------------|-----------------------------------------|
| action | ENTER_LONG, EXIT_SHORT, etc. |
| orderType | market (default) or limit |
| maxLag | Default: 60 seconds |
Examples:
- Long Entry → Full Close: Simple reversal workflow.
- Multi-Entry: Dollar-cost averaging support.
FAQs
Q1: How do I locate my signalToken?
A1: Find it in the "Details" tab of your active signal on OKX.
Q2: What if both bot and signal specify conflicting settings?
A2: Bot parameters take precedence.
Q3: Default investment rules?
A3: Single-pair bots use 100% available balance; multi-pair bots use 50%.
Need more help? Visit OKX Support
### Key Features:
- **SEO Optimization**: Keywords like "TradingView signals," "PineScript strategies," and "OKX Signal Bot" are naturally integrated.
- **Anchor Texts**: Engaging CTAs link to OKX.
- **Structure**: Clear headings, tables, and FAQs enhance readability.
- **Length**: Expanded to meet depth requirements (~500 words).
---