BACK TO CLAUDE SKILLS
◈
identify_trend_direction
Chart AnalysisAnalysisTrend
INSTALLATION
$python -c "exec(open('identify_trend_direction.py').read())"
#or paste directly into your Claude Code terminal
[ ABOUT ]
Classifies the current market trend by computing the percentage spread between a fast EMA (default 20) and a slow EMA (default 50) at the most recent bar. A spread greater than +1.5% is classified as Bullish; below -1.5% as Bearish; between those bounds as Sideways.
The threshold values are calibrated for daily crypto charts where EMA spreads are wider than in equity markets due to higher volatility. The function intentionally returns a string label rather than a numeric score to make it directly usable as a filter condition in scan loops and Claude prompt templates.
[ USAGE EXAMPLE ]
[ FULL CODE ]
[ METADATA ]
CategoryChart Analysis
ComplexityBeginner
LanguagePython 3.10+
TagsAnalysis, Trend
[ ASK CLAUDE ]
Ask AI about this skill before installing it.