With the launch of the Signals Bot, TradingView users and signal providers can now publish and configure a signals bot using their TradingView alerts. Follow this step-by-step guide to start trading with signals on OKX.
Step 1: Access the Signals Bot
- Log in to your OKX account.
- Navigate to Trade > Trading Bot > Marketplace.
- Select the Signals Bot subtab and click Create.
Step 2: Create Your Signal
- Click Add Custom Signal.
- Name your signal and add an optional description (up to 500 characters).
- Select Create Signal to proceed.
Key Configurations:
- TradingView Scripts: For users leveraging
strategy.*()functions. - Custom Alerts: For indicators, chart alerts, or third-party programs.
Step 3: Configure TradingView Alerts
Method A: Strategy Scripts (Pine Script™)
- Add Script: Save and add your Pine Script™ strategy to the chart.
- Set Alerts: Configure alerts via the "Alerts" button, selecting "Only Completed Orders."
- Webhook URL: Paste the OKX-generated webhook URL under "Notifications."
Method B: Custom Alerts
- Condition: Set alert conditions based on indicators or chart patterns.
- Alert Message: Use OKX’s preformatted
AlertMsgtemplate. - Webhook Integration: Link the OKX webhook URL.
Step 4: Set Up Your Signals Bot
Basic Settings:
- Select trading pairs.
- Set leverage ratio and margin amount.
Advanced Options:
- Choose order type (market/limit).
- Configure take-profit (TP) and stop-loss (SL) levels.
- Confirm: Finalize bot creation.
Step 5: Monitor and Manage Your Bot
- Real-Time Tracking: View performance metrics and open positions.
Manual Adjustments:
- Add/remove margin.
- Place manual orders.
- Close positions instantly.
- Stop Bot: Halts all trading activity and cancels pending orders.
FAQ Section
Q1: Can I use custom Pine Script™ indicators?
A1: Yes! Both strategy scripts (strategy.*()) and custom indicators (alertcondition()) are supported.
Q2: What’s the minimum margin required?
A2: No fixed minimum. Allocate funds based on your risk tolerance.
Q3: How do I troubleshoot failed signals?
A3: Check:
- Webhook URL accuracy.
- Alert message formatting.
- TradingView subscription status (paid plan required).
Appendix
Example 1: MACD Alert Script
//@version=5
indicator('MACD Alert')
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
alertcondition(ta.crossover(macdLine, signalLine), "Golden Cross", "")Example 2: Python Webhook Request
import requests
signal_data = {
"action": "ENTER_LONG",
"instrument": "BTC-USDT-SWAP",
"signalToken": "YOUR_TOKEN",
"timestamp": "2023-10-01T12:00:00.000Z"
}
response = requests.post("https://www.okx.com/join/BLOCKSTARalgo/signal/trigger", json=signal_data)👉 Explore Advanced Trading Strategies
👉 Download Free TradingView Scripts
For further details on AlertMsg specifications, refer to OKX’s official documentation.