
3 AM on Black Friday, you’re scrolling through your phone and see BTC breaking through new lows. Your heart races, your finger hovers over the “Buy” button. Countless thoughts flash through your mind:
You press the button. The next day you wake up to an 8% crash, liquidated and out of the game. This is the daily reality for 90% of retail traders. I was one of them, until I built this tool.
What this tool does is very simple:
Your trading impulse → Forced to write down reasons → AI rational analysis → Provides actionable plan → Records growth trajectory
The key lies in three unique design elements:
The form requires filling in “trading rationale”. When you try to describe in words “why you want to make this trade”, many impulses naturally fade away.
❌ Vague impulse: "Feels like it's going up"
✅ Specific reasoning: "Breakout above 120-day MA + MACD golden cross + volume expansion"
The system automatically collects 4 types of data and conducts comprehensive analysis:
Data Collection:
Position Info ──┐
Sentiment Analysis ──┼──→ Data Merge → AI Analysis
Technical Indicators ──┤
Trading Rationale ──┘
AI’s 4 Analysis Dimensions:
Outputs comprehensive analysis across multiple fields:
{
"original_rationale": "Down 5%, should be the bottom",
"rationale_evaluation": "Unreasonable",
"fatal_flaw": "Anchoring bias—5% drop doesn't mean sufficient",
"validation_result": "MACD=-213 deep bearish, RSI=31 no bullish divergence",
"execution_advice": "Abandon trade",
"suggested_entry_price": "Not recommended",
"stop_loss_price": "$115,000",
"take_profit_target_1_price": "$125,000",
// ...
}
Each trading insight analysis is automatically saved to a CSV file. After a month, you’ll see:

This is your evolution from impulse to rationality.

Workflow Trigger → Form Input → Null Value Check → [Data Collection] → Data Consolidation → AI Analysis → Storage → Export CSV
↓
┌───────────────────┼───────────────────┐
↓ ↓ ↓
Position Info Sentiment Analysis Technical Indicators
Type: Wait Node (Form Mode)
// Form field configuration
{
"tradingAsset": "text", // e.g., BTC
"tradingDirection": "dropdown", // LONG/SHORT/COVERLONG/COVERSHORT
"tradingQuantity": "number", // e.g., 1
"tradingRationale": "text" // Core! Must fill in reason
}
Key Design:
Node Name: Collect Position Information
Type: accountInfo Node
// Query current asset position
symbol: "{{ $json['tradingAsset'] }}_USDT.swap"
operation: "getPosition"
// Output example
{
"symbol": BTC, // Position asset
"amount": 0.5, // Position quantity
"price": 110003 // Direction
}
Node Name: Collect Sentiment Data → Sentiment Information Analysis
Type: MCP Client + AI Agent
Step 1: Get News
// Alpha Vantage MCP interface
endpointUrl: "https://mcp.alphavantage.co/mcp?apikey='YOUR_KEY'"
tool: "NEWS_SENTIMENT"
tickers: "CRYPTO:{{ $json['tradingAsset'] }}"
Step 2: AI Extract Sentiment
// AI structured sentiment analysis output
{
"shortTermSentiment": {
"category": "Positive",
"score": 0.7,
"rationale": "Broke key resistance in 24 hours, social media heat rising"
},
"longTermSentiment": {
"category": "Neutral",
"score": 0.0,
"rationale": "Regulatory uncertainty persists, institutional entry slowing"
}
}
Why is sentiment data important? One of the biggest gaps between retail traders and institutions is information access capability. Through recent news sentiment analysis, we can timely understand:
This fills critical information gaps.
Node Name: Signal Indicators Calculation
Type: tradingPlugin Node
function main(inputData) {
const symbol = inputData + "_USDT.swap"
const records = exchange.GetRecords(symbol)
// Data validation
if (records.length <= 10) {
Log("Error: Insufficient data");
return null;
}
// Calculate technical indicators (using talib library)
const macd = talib.MACD(records);
const rsi = talib.RSI(records, 14);
const atr = talib.ATR(records, 14);
const obv = talib.OBV(records);
// Get last 10 values
function getLast10Values(arr) {
if (!arr || arr.length === 0) return [];
return arr.slice(-10);
}
return {
MACD: {
macd: getLast10Values(macd[0]),
signal: getLast10Values(macd[1]),
histogram: getLast10Values(macd[2])
},
RSI: getLast10Values(rsi),
ATR: getLast10Values(atr),
OBV: getLast10Values(obv)
};
}
Returned Technical Indicators:
Directly passed from form, including asset, direction, quantity, trading rationale.
Node Name: Data Consolidation
Type: Code Node (JavaScript)
// Initialize containers
let posData = null;
let contentData = null;
let technicalIndicators = null;
let tradeIdea = null;
// Iterate through all inputs from merge node
for (const item of items) {
// =============== Position Data ===============
if (item.json.operation === 'getPosition' && item.json.result !== undefined) {
posData = item.json.result;
// Key conversion: numbers → readable text
posData.amount = posData.amount == 0 ? "No position" :
posData.amount > 0 ? "Long position" : "Short position";
}
// =============== Sentiment Analysis Results ===============
if (item.json.output !== undefined) {
try {
contentData = JSON.parse(item.json.output);
} catch (e) {
contentData = item.json.output;
}
}
// =============== Technical Indicator Data ===============
if (item.json.MACD !== undefined || item.json.RSI !== undefined) {
technicalIndicators = {
"Trend Indicator MACD": item.json.MACD,
"Oscillator RSI": item.json.RSI,
"Volatility Indicator ATR": item.json.ATR,
"Volume Analysis OBV": item.json.OBV
};
}
// =============== Trading Intention ===============
if (item.json["tradingAsset"] !== undefined) {
tradeIdea = {
"tradingAsset": item.json["tradingAsset"],
"tradingDirection": item.json["tradingDirection"],
"tradingQuantity": item.json["tradingQuantity"],
"tradingRationale": item.json["tradingRationale"] // Core!
};
}
}
// =============== Return Aggregated Results ===============
return [{
json: {
"positionData": posData,
"sentimentAnalysis": contentData,
"technicalIndicators": technicalIndicators,
"tradingIntention": tradeIdea
}
}];
Why do we need this node?
Node Name: AI Trading Spark Validation
Type: Agent Node
This is the soul of the entire system. The prompt design includes a strict analysis framework:
Analysis Framework (4 Dimensions):
0️⃣ Trading Logic Validation (Highest Priority)
1️⃣ Technical Signal Verification
2️⃣ Emotional Risk Assessment
3️⃣ Entry Timing Judgment
Output Requirements: Complete Analysis Fields
{
"analysisTime": "2025-10-11T10:30:00.000Z",
"tradingAsset": "BTC",
"tradingDirection": "LONG",
"tradingQuantity": "1",
"originalRationale": "Down 5%, should be the bottom",
"rationaleEvaluation": "Unreasonable",
"validationResult": "MACD=-213 deep bearish, RSI=31 no bottom divergence, OBV continuous outflow",
"fatalFlaw": "Anchoring bias—5% drop doesn't constitute reversal reason",
"executionAdvice": "Abandon trade",
"confidence": "High",
"basis_logicValidation": "Trading logic has serious flaws",
"basis_technicals": "MACD/RSI/OBV all show bearish trend not ended",
"basis_riskPoints": "Blind bottom fishing may encounter double bottom, potential loss 15%+",
"suggestedEntryPrice": "Not recommended",
"suggestedEntryCondition": "Trading logic has major flaws",
"suggestedEntryTime": "Abandon current plan",
"stopLossPrice": "$115,000",
"stopLossReason": "Break below key support",
"takeProfit1_price": "$125,000",
"takeProfit1_position": "50%",
"takeProfit1_reason": "Backtested resistance",
"takeProfit2_price": "$132,000",
"takeProfit2_position": "Remaining position",
"takeProfit2_reason": "Key round number",
"coreRisk": "Currently in mid-downtrend, bottom fishing too early may trigger stop loss",
"riskRewardRatio": "0.5:1",
"potentialReturnPercent": "5%",
"maxLossPercent": "10%",
"riskLevel": "High risk",
"operationSummary": "Abandon bottom fishing plan, wait for MACD golden cross + RSI bottom divergence",
"decisionValidity": "Until technicals show clear reversal signal",
"reviewCondition": "MACD golden cross or RSI forms bottom divergence or volume surge"
}
Field Analysis
Special Case Handling Rules:
The prompt specifically defines 3 special cases:
1、When “trading rationale” is clearly unreasonable
2、When market is extremely volatile
3、When technical indicators contradict
Type: Code Node
const rawData = $input.first().json.output;
// Function to extract JSON content (handles possible markdown wrapping)
function extractJSON(outputString) {
const jsonMatch = outputString.match(/```json\n([\s\S]*?)\n```/);
if (jsonMatch && jsonMatch[1]) {
return JSON.parse(jsonMatch[1]);
}
// If no markdown wrapping, parse directly
return JSON.parse(outputString);
}
const result = extractJSON(rawData);
Log("Current trade analysis:", result);
// Use _G global storage function (key!)
let tradelog = _G('tradelog') || []; // Initialize fallback
// Add latest record
tradelog.push(result);
// Persistent save
_G('tradelog', tradelog);
return tradelog;
Value of _G Function:
Type: convertToFile Node
Converts JSON array to CSV format, including all fields.
Type: writeFile Node
Saves to local tradelog.csv.
Long-term Value of CSV File:
This file records your trading mindset evolution:
Week 1: 10 ideas → 7 "unreasonable" → Cognitive bias: FOMO
Week 2: 8 ideas → 5 "unreasonable" → Starting to realize problems
Week 4: 6 ideas → 3 "unreasonable" → Learning to wait for technical signals
Week 8: 5 ideas → 1 "unreasonable" → Thinking starts maturing
...
This is a trading master’s growth diary.
This tool is not omnipotent:
❌ Cannot predict the future: AI based on historical data, fails when black swans arrive ❌ Cannot replace intuition: Veteran traders’ “market sense” is hard to quantify ❌ Cannot guarantee profits: Can only improve decision quality, not guarantee every trade wins ❌ Cannot fight extreme markets: When market goes crazy, rational analysis might backfire
But it can:
✅ Let you know the risk of every trade ✅ Help identify cognitive biases ✅ Record your growth trajectory ✅ Avoid the most basic mistakes
Short-term Optimization:
Further Improvements:
Click the strategy link at the end of the article, click copy strategy.
Need to configure 3 APIs:
1、Alpha Vantage (sentiment data): Configure in MCP client node 2、OpenAI (AI model): Configure in two OpenAI model nodes 3、Exchange (position query, needed for live trading): Configure in exchange section
tradelog.csv location:
# 1. Enter custodian log directory
cd ~/logs/storage
# 2. Find your strategy ID directory (e.g., 620669)
cd 620669/files
# 3. View trading log
cat tradelog.csv
Fill out the form every time you have a trading impulse, let AI help you analyze calmly. Suggest reviewing tradelog.csv every weekend to see which mistakes you make most often (FOMO? Blind bottom fishing?). After 1-2 months of continuous use, you’ll clearly see your evolution from impulse to rationality.
The greatest value of this tool is not how much money it helped you make, but:
It forces you to ask yourself before every order: Why am I making this trade?
The ultimate goal of trading is not to beat the market, but to understand yourself. Understand your greed, fear, and self-righteousness. This trading log file is your path to self-awareness.
Technical Support: Welcome to discuss in comments
Disclaimer: Tool for learning only, trading has risks, please make careful decisions
If this article helped you, feel free to share with friends also struggling on the trading path. We all need a calm voice to say when impulse arrives: “Wait, are you sure?”
Strategy Link: https://www.fmz.com/strategy/511853
Note: This framework is just an initial implementation, needs more bug fixes and feature improvements.