
Introduction: Why Can Experienced Traders Make Money Just by Looking at Moving Averages, While We Keep Getting Slaughtered?
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?
1.Fast information capture: While monitoring the market, they have various news sources, Telegram groups, and Twitter all open. They know about important news the moment it breaks.
2.High judgment accuracy: Having seen countless market reactions, they can instantly tell which news is genuinely bullish and which is just hype.
3.Decisive action: After dual confirmation from technical signals + news sentiment, they enter when they should enter, cut losses when they should cut losses—no hesitation.
And what about us retail traders?
By the time we see the news, the price might have already risen 5%
We get excited seeing "major bullish news," only to find it's reheated news from three months ago
A golden cross appears, but we don't dare enter; a false breakout happens, and we chase the high
We scroll through news on our phones for ages and still don't know what to do
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:
Monitors RSS feeds from 9 mainstream news sources 24/7 without interruption
Automatically analyzes the sentiment intensity and relevance of the latest news
Combines technical signals (golden cross/death cross) with current position status
Provides specific trading recommendations according to preset risk control rules
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:
Not miss critical information: News scraping is automatic, working 24 hours
Maintain decision consistency: Won't make erratic moves due to emotional swings
Enforce risk control: Cut losses when needed, stay on the sidelines when needed
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.
**
I. Basic Concept of the Strategy
**
The entire strategy is divided into three layers:
1. Technical Signal Layer: Dual Moving Average System
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.
mylang
// 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."
- Sentiment Analysis Layer: RSS News Scraping The strategy fetches RSS feeds from 9 mainstream cryptocurrency news sources in real-time:
Cointelegraph
Bitcoin Magazine
CoinDesk
Crypto Briefing
Bitcoinist
Crypto.news
NewsBTC
CryptoPotato
99Bitcoins
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.
javascript
// 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);
- Decision Layer: AI Comprehensive Judgment 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:
Relevance weight: News directly mentioning the target coin gets weight 1.0, overall market environment 0.8, other coins 0.5
Timeliness weight: The newest 30% of news gets weight 1.0, middle portion 0.8, older news 0.6
Market correlation: The crypto market is highly correlated—major news about BTC/ETH affects all coins
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:
Hold a long position with 1500U profit → AI will suggest decisively closing to protect profits
Hold a long position with 300U loss → AI will be more cautious, possibly closing only part of the position to observe
Have no position → AI will evaluate whether it's suitable to open a short
Step Three: Provide Specific Action Recommendations
The AI won't just say "bullish" or "bearish." Instead, it outputs:
Specific action: Open long / Open short / Add to position / Close position / Hold off
Quantity: X units (considering maximum position limits)
Decision rationale: Why make this move
Risk warnings: What to watch out for
For example, output like this:
json
{
"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"
}
}
II. Decision Rule Design: Making AI Think Like a Veteran Trader
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.
Sentiment Level Classification
I divided news sentiment into 4 levels:
Typical Scenario Examples
Scenario 1: No position + Golden cross + Level 4 extremely strong bullish news
pine
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
mylang
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
pine
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
Impact of P&L Status
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:
Profitable when encountering opposing signal → Prioritize protecting profits, close more decisively
In loss when encountering opposing signal → Cut losses decisively, avoid expanding losses
Profitable when encountering confirming signal → Consider adding to position, expand profits
In loss when encountering confirming signal → Add cautiously, prioritize waiting to break even
This essentially simulates the mindset management of experienced traders.
III. Technical Implementation: The Power of Workflows
The entire strategy is implemented on a workflow platform, which is really well-suited for this kind of complex automated workflow.
Core Node Descriptions
Scheduled Trigger: Executes every 3 minutes (adjustable)
Initial Setup Node:
Set up exchange API
Initialize fund records
Generate visual status tables
K-line Fetch → Technical Indicator Calculation:
Fetch recent N candlesticks
Calculate short-term/long-term EMA
Determine golden cross/death cross
Conditional Logic:
If no signal → Output log, end
If signal detected → Trigger news fetch
9 RSS Reader Nodes Execute in Parallel:
Each node fetches one news source
Error handling configured (one source going down doesn't affect the whole)
RSS Consolidation Node:
Merge all news
Filter to last 24 hours
Sort by time in descending order
Clean HTML tags
Information Packaging Node:
Bundle technical signals, news, and position data
Format into JSON structure needed by AI
AI Agent:
Receive packaged data
Analyze according to preset rules
Output structured decision
Trade Execution Node:
Parse AI decision
Execute specific trading operations
Save results for next decision cycle
Status Visualization
When the strategy runs, it generates four tables on the FMZ platform:
Account Overview: Initial capital, current equity, cumulative P&L, return rate
Position Monitoring: Position direction, quantity, average price, unrealized P&L, remaining capacity
AI Decision Analysis: Technical signal, news sentiment, decision action, confidence level
Execution Results: Operation type, execution status, P&L settlement, decision reasoning
This allows you to see at a glance what the strategy is doing.
IV. Risk Control Design: Not Taking Reckless Risks Is How You Survive
The biggest fear in quantitative trading is one major loss wiping out all previous profits. So I designed several layers of risk control:
Maximum Position Limit
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.Tiered Decisions, Gradual Probing
Level 4 extremely strong signal: Open/add 2x position
Level 3 strong signal: Open/add 1x position
Level 2 and below: No action
This prevents shooting all your bullets at once.Sentiment and Technical Signals Must Align
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.Dynamic Position Closing Strategy
It's not simply "close all" or "don't close," but rather based on:
Signal strength (Level 4 closes all, Level 3 closes 2/3, Level 2 observes)
Position size (larger positions close more, smaller positions might close entirely)
P&L status (protect profits when winning, cut losses decisively when losing)
These factors are combined to determine the closing ratio.
V. Current Issues and Areas for Improvement
To be honest, this strategy still has quite a few problems:
Known Pitfalls
Inconsistent News Quality
Some news sources love clickbait headlines
The same story gets reported repeatedly
Old news gets recycled as new bullish developments
Improvement ideas: Add news deduplication, timeliness checks, source credibility scoringAI Sentiment Judgment Not Precise Enough
Sometimes judges neutral news as bullish
Insufficient understanding of market sentiment lag
Cannot recognize subtle situations like "buy the rumor, sell the news"
Improvement ideas: Collect historical data, train a specialized sentiment classification modelExecution Slippage and Fees Not Considered
Current code uses market orders
Doesn't calculate actual execution slippage
Impact of trading fees on returns not quantified
Improvement ideas: Add limit order logic, simulate real trading costsLack of Timely Take-Profit/Stop-Loss Mechanism
After opening positions, relies only on signal indicators and news for closing, may miss optimal exit timing
Cannot respond to sudden crashes (hacker attacks, regulatory bad news, etc.)
Profits may be fully given back, losses may expand indefinitely
Next Steps
Optimize news sources: Filter for higher quality information sources, reduce noise
Introduce multi-model competition: Have multiple AIs (like Claude, GPT, Gemini) analyze simultaneously, take the voted result
Add on-chain data: Incorporate exchange fund flows, whale position changes
Add take-profit/stop-loss workflow module: Set fixed stop-loss (e.g., -5% forced close), take-profit (e.g., +15% exit), trailing stop (8% drawdown from peak to protect profits), avoiding major losses from passive news-driven closing
VI. Usage Recommendations
If you want to try this strategy too, I have some sincere suggestions:
Start with paper trading: Don't use real money right away, observe performance for at least one or two weeks
Begin with small positions: Even for live trading, start with the minimum unit, don't fear missing opportunities
Regular reviews: Each week, look at the AI's decisions—which were right, which were wrong, and why
Don't over-rely on it: AI is just an auxiliary tool, final decision-making power remains in your hands
Prepare for the worst: Set a total account loss limit, stop when you hit that number
Maintain a learning mindset: Markets change, strategies must iterate accordingly
Conclusion
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! 🚀

Top comments (0)