You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{CandleView}from"./CandleView";constApp=()=>{return(<CandleViewdata={candleData}title="Test"theme={theme}i18n={i18n}markData={a}height={800}leftpanel={true}toppanel={true}terminal={true}ai={true}timezone="America/New_York"timeframe="1m"isCloseInternalTimeFrameCalculation={true}// the internal timeframe calculation logic has been disabled.timeframeCallbacks={{"1m": ()=>{// Implement a custom data source switching mechanism for a 1m timeframe.},"5m": ()=>{// Implement a custom data source switching mechanism for a 5m timeframe.},"1D": ()=>{// Implement a custom data source switching mechanism for a 1D timeframe.},"1H": ()=>{// Implement a custom data source switching mechanism for a 1H timeframe.},"15m": ()=>{// Implement a custom data source switching mechanism for a 15m timeframe.},"30m": ()=>{// Implement a custom data source switching mechanism for a 30m timeframe.},"4H": ()=>{// Implement a custom data source switching mechanism for a 4H timeframe.},}}aiconfigs={[{proxyUrl: "http://localhost:3000/api",brand: "aliyun",model: "qwen-turbo",},{proxyUrl: "http://localhost:3000/api",brand: "deepseek",model: "deepseek-chat",},{proxyUrl: "http://localhost:3000/api",brand: "deepseek",model: "deepseek-chat-lite",},]}/>);};
Danmaku System
AI Features
Supported Brands
OpenAI: GPT series models
Aliyun (Alibaba Cloud): Tongyi Qianwen and other models
DeepSeek: DeepSeek series models
Claude: Anthropic models
Gemini: Google models
Function Types
Chart Analysis: AI analyzes current chart data, providing technical analysis, trend judgments, etc.
Predictive Analysis: AI performs price predictions and risk assessments based on historical data
How to Use
Enable AI Panel: Select the desired AI function from the left panel (e.g., "OpenAI Chart Analysis")
Select Model: Choose an appropriate model from the available list in the AI chat box
Configure API Key: Pre-configure API keys and models for respective brands in the aiconfigs property
Start Conversation: Input questions or analysis requests to receive professional financial analysis from AI
ohlcv-ai library provides official API calls for OpenAI, Aliyun, DeepSeek, and others.
Configuration Example
<CandleViewdata={candleData}title="Test"theme={theme}i18n={i18n}markData={a}height={800}leftpanel={true}toppanel={true}terminal={true}ai={true}aiconfigs={[// Simultaneously configure different models from multiple AI brands.{proxyUrl: "http://0.0.0.0/api",brand: "aliyun",model: "qwen-turbo",},{proxyUrl: "http://0.0.0.0/api",brand: "aliyun",model: "qwen-omni",},{proxyUrl: "http://0.0.0.0/api",brand: "deepseek",model: "gpt-4",},{proxyUrl: "http://0.0.0.0/api",brand: "openai",model: "gpt-3.5-turbo",},]}/>
Proxy Interface Standard
💡 Services that must be implemented in the domain configured by proxyUrl.
/analyzeOHLCV - A service specifically designed for processing OHLCV data.
Supports price event scripts
Multi Panel Performance
Performance in AI conversations
💻 Command System
Supported Commands
Basic Commands
Command
Description
Example
clear / cls
Clear terminal output
clear
help
Show all available commands and indicators
help
theme [light dark]
Switch theme
theme dark
history
Show recently executed command history
history
Indicator Operations
Command
Description
Example
open [indicator]
Open specified main or sub chart indicator
open ma
close [indicator]
Close specified main or sub chart indicator
close rsi
Main Chart Indicators
ma - Moving Average
ema - Exponential Moving Average
bollinger - Bollinger Bands
ichimoku - Ichimoku Cloud
donchian - Donchian Channel
envelope - Envelope
vwap - Volume Weighted Average Price
heatmap - Heatmap
marketprofile - Market Profile
Sub Chart Indicators
rsi - Relative Strength Index
macd - Moving Average Convergence Divergence
volume - Volume
sar - Parabolic SAR
kdj - KDJ (Stochastic Oscillator)
atr - Average True Range
stochastic - Stochastic Oscillator
cci - Commodity Channel Index
bbwidth - Bollinger Bands Width
adx - Average Directional Index
obv - On Balance Volume
Keyboard Shortcuts
Shortcut
Function
↑ / ↓
Navigate command history
Tab
Auto-complete current suggestion
Enter
Execute command or confirm completion
Ctrl + L
Clear input field
Ctrl + C
Cancel current operation
Esc
Clear input field and hide suggestions
Usage Examples
$ open ma # Open Moving Average indicator
$ close bollinger # Close Bollinger Bands indicator
$ theme light # Switch to light theme
$ history# View recent command history