
Let me start with a harsh truth: I know a guy who’s been trading futures for over a decade, and his trading interface is so simple it’s suspicious—just two moving averages, not even “fancy stuff” like MACD or RSI. Yet he consistently profits.
One day I couldn’t help asking him: “How do you know which golden cross is a real breakout and which is a false signal, just by looking at these two lines?”
He took a sip of tea and said casually: “I read the news.”
Me: ???
He continued: “For example, yesterday Bitcoin had a golden cross, but I saw news that a major exchange was under investigation and market panic was high. Nine times out of ten, a golden cross in that situation is a bull trap. But last week’s golden cross happened to coincide with news of BlackRock increasing their ETF holdings—institutions were scrambling to accumulate. Why wouldn’t you enter at that point?”
It suddenly clicked for me, and I instantly felt hopeless—isn’t this testing a person’s abilities?
Where Does the Experienced Trader’s Advantage Lie?
And what about us retail traders?
Simply put, anyone can read technical indicators, but combining technical signals with market sentiment to make judgments—that’s the real skill. The problem is this skill requires time, experience, and the energy to monitor markets 24⁄7.
So Can We Get AI to Do This Job?
Here’s my thinking: what if we could write a program that:
Wouldn’t this, to some extent, compensate for our shortcomings in information and experience?
Of course, I wouldn’t dare claim this strategy can replace human judgment, let alone that it can profit consistently (after all, it’s still in testing, and there are bound to be many pitfalls). But at least it can help us:
Just think of it as a “junior trading assistant” that helps us handle repetitive information gathering and basic judgment work. The real decision-making power should still remain in our own hands.
Alright, rant over. Let’s look at how this experimental strategy is actually designed.
The entire strategy is divided into three layers:
This is the most fundamental layer, using EMA (Exponential Moving Average). The code defaults to a short period of 7 and a long period of 25—you can adjust these according to your own trading style.
// Short-term moving average
EMA(7)
// Long-term moving average
EMA(25)
// Signal judgment
Golden Cross: Short-term EMA crosses above long-term EMA → Bullish
Death Cross: Short-term EMA crosses below long-term EMA → Bearish
There’s nothing special about this part—it’s classic trend following. But here’s the key point: I don’t blindly open positions based on golden crosses or death crosses. Instead, I pass this signal to the AI as a “reference opinion.”
The strategy fetches RSS feeds from 9 mainstream cryptocurrency news sources in real-time:
There’s a subtle consideration here: I only keep news from the last 24 hours, sorted in reverse chronological order (newest first). Why? Because the fresher the news, the faster the market reacts, so it should carry more weight.
// Filter news from the last 24 hours
const oneDayAgo = Date.now() - (24 * 60 * 60 * 1000);
// Sort by timestamp, newest first
result.sort((a, b) => b.timestamp - a.timestamp);
This is the core of the entire strategy. I package the technical signals, news data, and current position status into a JSON and throw it to Claude Sonnet 4.5 to make decisions according to preset rules.
The AI mainly does three things:
Step One: Evaluate News Sentiment Intensity (0-1 score)
I put considerable thought into designing the scoring rules here. It’s not simply about whether the news is positive or negative, but considers:
For example, if you’re trading SOL but the news says “SEC approves Bitcoin ETF,” the AI will also count this as significant bullish news because the entire market will be affected.
Step Two: Consider Position and P&L Status
This is something many quantitative strategies overlook. For the same death cross signal, if you:
Step Three: Provide Specific Action Recommendations
The AI won’t just say “bullish” or “bearish.” Instead, it outputs:
For example, output like this:
{
"decision": {
"action": "OPEN_LONG",
"multiplier": 2.0,
"reasoning": "Golden cross signal + sentiment 0.90 (Level 4 extremely strong) + latest news shows BTC breaking 100K, ETF approved, institutions entering → recommend opening long position at 2x base position size",
"riskWarning": "BTC often pulls back after breaking round numbers, recommend setting stop-loss"
}
}
This part is the soul of the entire strategy. I designed a fairly complete decision matrix with the core idea: technical signals provide direction, news sentiment provides confirmation, and position status determines intensity.
I divided news sentiment into 4 levels:
| Level | Score Range | Characteristics | Corresponding Action |
|---|---|---|---|
| Level 4 (Extreme) | 0.8-1.0 | Major bullish/bearish news, clear direction | Bold action, 2x position size |
| Level 3 (Strong) | 0.65-0.8 | Clearly positive/negative, consensus formed | Normal action, 1x position size |
| Level 2 (Neutral) | 0.5-0.65 | Unclear direction or mixed signals | No action, observe |
| Level 1 (Weak) | 0-0.5 | Contradicts signal direction or irrelevant news | No action, possibly false signal |
Scenario 1: No position + Golden cross + Level 4 extremely strong bullish news
Technical signal: Short-term EMA crosses above long-term EMA
News sentiment: 0.92 (BTC breaks 100K, ETF approved, institutional FOMO)
Current position: 0 units
→ AI decision: Open long position at 2x base position size
→ Reasoning: Technical and fundamental aspects highly aligned, a rare high-certainty opportunity
→ Risk warning: Round numbers often see pullbacks, set stop-loss
Scenario 2: Holding 3 units long (800U profit) + Death cross + Level 3 strong bearish news
Technical signal: Short-term EMA crosses below long-term EMA
News sentiment: 0.72 (BTC breaks support, liquidations surge)
Current position: 3 units, 800U unrealized profit
→ AI decision: Close 2 units, keep 1 unit for observation
→ Reasoning: Trend reversal risk rising, protect most profits first
→ Calculation logic: Large position (3 units) + profitable state + Level 3 strong signal = close 2/3
Scenario 3: Holding 2 units long (1500U profit) + Golden cross + Level 4 extremely strong bullish news
Technical signal: Short-term EMA golden cross again
News sentiment: 0.92 (parabolic move, institutions entering, rate cut expectations)
Current position: 2 units, 1500U unrealized profit
Maximum position: 3 units
→ AI decision: Add 1 unit to reach limit
→ Reasoning: Currently profitable + extremely strong trend + room to add
→ Risk warning: Maximum position reached, cannot add more, set trailing stop-loss
This is what I find particularly interesting about this strategy. For the same technical signal, the AI gives different recommendations based on your P&L status:
This essentially simulates the mindset management of experienced traders.
The entire strategy is implemented on a workflow platform, which is really well-suited for this kind of complex automated workflow.
Scheduled Trigger: Executes every 3 minutes (adjustable)
Initial Setup Node:
K-line Fetch → Technical Indicator Calculation:
Conditional Logic:
9 RSS Reader Nodes Execute in Parallel:
RSS Consolidation Node:
Information Packaging Node:
AI Agent:
Trade Execution Node:
When the strategy runs, it generates four tables on the FMZ platform:
This allows you to see at a glance what the strategy is doing.
The biggest fear in quantitative trading is one major loss wiping out all previous profits. So I designed several layers of risk control:
Controlled through the maxPos parameter. For example, if set to 3, then no matter how bullish the AI is, it can only hold a maximum of 3 base units. This way, even if the judgment is wrong, losses remain within a controllable range.
This prevents shooting all your bullets at once.
If there’s a technical golden cross but the news is overwhelmingly bearish (sentiment < 0.5), the AI will judge it as a false breakout and won’t open a position. And vice versa.
It’s not simply “close all” or “don’t close,” but rather based on:
These factors are combined to determine the closing ratio.
To be honest, this strategy still has quite a few problems:
Known Pitfalls
Improvement ideas: Add news deduplication, timeliness checks, source credibility scoring
Improvement ideas: Collect historical data, train a specialized sentiment classification model
Improvement ideas: Add limit order logic, simulate real trading costs
If you want to try this strategy too, I have some sincere suggestions:
Through this experiment, I’ve gained a deeper understanding of combining technical analysis with fundamental analysis. The reason veteran traders are so skilled isn’t because they know some mysterious indicators, but because they can quickly integrate multi-dimensional information and make rational judgments.
As ordinary retail traders, although we lack the veterans’ experience and intuition, we can use technical means to compensate. Let machines help us handle the tedious work of information gathering and basic analysis, while we focus on risk control and strategy optimization.
One final heartfelt word: quantitative trading is not a money printer, and AI is not omnipotent. This strategy is still quite rough and will definitely have various unexpected problems. If you use it, be mentally prepared for losses. Treat it as a learning tool, not a money-making machine.
That’s all for today’s sharing. If you have any thoughts or suggestions, feel free to discuss anytime. After all, we’re all fellow travelers exploring the path of quantitative trading.
Wishing everyone smooth trading and fewer pitfalls! 🚀
P.S. I’ve put the complete code at the beginning of the article. Friends who are interested can study it themselves. If you improve it into a better version, remember to share it too!