Skip to main content

Babico_SMA5xBBmid Strategy: The "Old-School Craftsman" of Moving Average Crossovers

Nickname: Golden Cross/Death Cross Professional, Minimalist of the Code World
Profession: Follow the trend—buy on golden cross, sell on death cross
Timeframe: Daily (slow pace, stable life)


1. What Is This Strategy?

Simply put, Babico_SMA5xBBmid is a strategy that:

  • Super simple moving average crossover strategy
  • Buys and sells when 5-day MA crosses 20-day MA
  • Code is only a few dozen lines—so simple it's touching

Like an old-school craftsman 👴—doesn't do those flashy things, just uses the most classic technical analysis method: buy on golden cross, sell on death cross, crystal clear.


2. Core Configuration: So Simple It Doesn't Need Explanation

Profit-Taking Rules (ROI Table)

Holding Time        Target Profit Rate
──────────────────────────────────────
Immediately 10%
After 30 days 5%
After 60 days 2%

Translation:

  • Wants to earn 10% right after buying
  • After holding for 1 month without earning enough, target drops to 5%
  • After holding for 2 months without earning enough, target drops to 2%
  • The longer the time, the lower the requirement

Stop Loss Rules

Fixed Stop Loss: -10%
Trailing Stop: Activates after 3% profit, trailing幅度 1%

Translation:

  • Admit defeat at 10% loss
  • After earning 3%+, start protecting profits—sell if pullback 1%

3. 1 Buy Condition: Buy on Golden Cross

🎯 The Only Buy Signal: EMA5 Crosses Above Bollinger Band Middle Band

In Plain English:

"5-day moving average crosses above 20-day moving average—BUY!"

Why?

  • EMA5 represents short-term price trend
  • Bollinger Band middle band IS the 20-day moving average
  • Short-term MA crossing medium-term MA means short-term trend is strengthening

Classic Line:

When EMA5 > Bollinger Band Middle Band (just crossed)

→ "Golden Cross! Trend strengthening, BUY!"


4. 1 Sell Condition: Sell on Death Cross

📉 The Only Sell Signal: EMA5 Crosses Below Bollinger Band Middle Band

In Plain English:

"5-day moving average crosses below 20-day moving average—SELL!"

Why?

  • Short-term trend is weakening
  • Price has broken below medium-term average cost
  • May be about to decline

Classic Line:

When EMA5 < Bollinger Band Middle Band (just crossed)

→ "Death Cross! Trend weakening, RUN!"


5. Protection Mechanisms: 4 Lines of Defense

Protection TypeTrigger ConditionPlain English
Signal SellDeath Cross"Trend changed, retreat!"
ROI Profit-TakingReach target profit"Run when earned enough"
Fixed Stop Loss10% loss"Not working, stop loss!"
Trailing StopPullback 1% after 3% profit"Protect small profits"

Roast: Although this strategy is simple, the protection mechanisms are quite complete 😂


6. This Strategy's "Personality Traits"

✅ Strengths (Praise Session)

  1. Simple to the Extreme: Code less than 80 lines, understand at a glance
  2. Symmetric Logic: Buy and sell completely symmetric, no bias
  3. Classic Method: Moving average crossover is the oldest technical analysis
  4. Small Computation: Doesn't burn CPU, doesn't occupy memory
  5. Quadruple Protection: Signal + ROI + Stop Loss + Trailing Stop

⚠️ Weaknesses (Roast Session)

  1. Signal Lag: Moving averages are lagging indicators—by the time crossover happens, trend has already moved a segment
  2. Ranging Market Disaster: Repeated golden/death crosses in sideways markets, repeatedly get cut
  3. No Filtering: Believes every golden cross, no trend strength confirmation
  4. Single Parameters: 5-day and 20-day fixed, can't optimize

7. Applicable Scenarios: When to Use It?

Market EnvironmentRecommended ActionReason
📈 Clear Trend✅ Strongly RecommendedMoving average crossover most suitable for trend markets
🔄 Ranging Market❌ Don't UseWill be repeatedly cut like leeks
📉 Downtrend⚠️ CautionDeath cross exits timely, but bottom fishing may get trapped
📊 Low Volatility✅ UsableFew signals but high quality

8. Summary: How Is This Strategy Really?

One-Sentence Evaluation

"A minimalist moving average crossover strategy, code so simple it's touching"

Who Is It Suitable For?

  • ✅ Freqtrade beginners learning the ropes
  • ✅ Those who like simple strategies
  • ✅ Trend following enthusiasts
  • ✅ Want to adjust parameters themselves

Who Is It NOT Suitable For?

  • ❌ Want complex strategies
  • ❌ Pursuing high-frequency trading
  • ❌ Ranging markets primarily
  • ❌ Don't want to optimize themselves

My Suggestions

  1. Use as Learning Template: This is the best introductory case for learning Freqtrade strategy development
  2. Can Extend: Add RSI filtering, volume confirmation, trend strength, etc.
  3. Parameters Adjustable: Try EMA10, EMA20 or other combinations
  4. Don't Use in Ranging Markets: Really will get cut like leeks

9. In What Markets Can This Strategy Make Money?

9.1 Core Logic: Follow the Trend

Babico_SMA5xBBmid is a classic moving average crossover strategy. Concise code, clear logic—

Its Profit Philosophy:

  • Golden Cross = Trend Strengthening: Short-term MA crosses medium-term MA, follow and buy
  • Death Cross = Trend Weakening: Short-term MA breaks below medium-term MA, follow and sell
  • Don't Guess Tops/Bottoms: Only follow trends, don't try to bottom fish or escape tops

9.2 Performance in Different Markets (Plain English Version)

Market TypePerformance RatingPlain English Explanation
📈 Clear Trend⭐⭐⭐⭐⭐"Born for this—golden cross buy, death cross sell, perfect"
🔄 Ranging Market⭐⭐☆☆☆"Repeated face-slapping, left slap right slap"
📉 Downtrend⭐⭐⭐⭐☆"Death cross runs timely, but rebound bottom fishing may fail"
⚡️ High Volatility⭐⭐⭐☆☆"More signals, but also more false signals"

One-Sentence Summary: A good friend of trend markets, a nightmare of ranging markets.


10. Want to Run This Strategy? Check These Configurations First

10.1 Trading Pair Configuration

ConfigurationRecommended ValueRoast
Timeframe1d (Daily)Default setting, reduce noise
Number of PairsAnyStrategy too simple, run as many as you want
Stop Loss-0.05 to -0.10Depends on your risk preference

10.2 Key Configuration File Settings

# config.json key configuration
"timeframe": "1d",
"stoploss": -0.10

10.3 Hardware Requirements (Important!)

Number of PairsMinimum MemoryRecommended MemoryExperience
Any2GB4GBEasy

Roast: This strategy is so simple, basically doesn't occupy resources 😂

10.4 Backtesting vs Live Trading

Backtesting May Be Okay:

  • Golden/death crosses in trend markets can indeed make money
  • Obvious trends in historical data will be captured

Live Trading Points to Note:

  • Ranging markets will frequently stop loss
  • Moving average lag may miss early trend
  • Recommend adding other filtering conditions

Recommended Process:

  1. Test on trend coins first
  2. Observe performance during ranging periods
  3. Consider adding trend strength indicators like ADX
  4. Small capital live trading verification

Don't go all-in immediately—this strategy will teach you a lesson in ranging markets!


11. Easter Egg: The Strategy Author's "Little Thoughts"

Look carefully at the code, and you'll find some interesting things:

  1. Calculated three bands for Bollinger Bands, only uses middle band

    "Upper and lower bands: Don't we deserve respect? 🤔"

  2. Only uses one EMA

    "Others use dual MA, triple MA—I just have one EMA5, enough!"

  3. Code only 60+ lines

    "Minimalism—never use two lines when one will do ✨"

  4. No filtering conditions at all

    "Golden cross is golden cross, don't care if it's strong or not 🤷"


12. Last But Not Least

One-Sentence Evaluation

"A minimalist moving average crossover strategy, learning value higher than practical value"

Who Is It Suitable For?

  • ✅ Freqtrade beginners
  • ✅ Want to learn strategy development
  • ✅ Like simple logic
  • ✅ Trend following believers

Who Is It NOT Suitable For?

  • ❌ Pursuing high returns
  • ❌ Coins primarily in ranging markets
  • ❌ Want complex strategies
  • ❌ Don't want to modify code themselves

Manual Trader Suggestions

  • EMA5/SMA20 golden/death cross is a classic technical analysis method
  • Can be used as an auxiliary tool for trend judgment
  • But really be careful in ranging markets—will be repeatedly face-slapped
  • Recommend combining with ADX, MACD and other indicators for filtering

13. ⚠️ Risk Re-emphasis (Must Read This Section)

Backtesting Is Beautiful, Live Trading Requires Caution

Moving average crossover strategies look pretty good in historical backtesting—but there's a trap:

Moving averages are lagging indicators—by the time of golden cross, trend has already moved a segment; by death cross, already pulled back quite a bit.

Simply put: Can only eat the middle of the fish—can't eat the head or tail.

Ranging Market Nightmare

Moving average crossover strategies in ranging markets will:

  • Frequent Crossovers: Golden cross today, death cross tomorrow
  • Repeated Stop Losses: Each stop loss 10%, a few times and you're down big
  • Fee Accumulation: In and out, fees more than profits

My Suggestions (Truthful Words)

1. Only use on coins with clear trends
2. Add trend strength filtering (e.g., ADX > 25)
3. Add volume confirmation
4. Pause trading or switch to other strategies during ranging periods
5. Test on demo account first to see strategy performance

Remember: No matter how simple the strategy, the market isn't simple. Light position testing, staying alive is most important! 🙏


Special Note: Why Is This Strategy Worth Learning?

Although simple, Babico_SMA5xBBmid is an excellent template for learning Freqtrade strategy development:

  1. Complete Structure: Has ROI, stop loss, trailing stop, buy/sell signals
  2. Concise Code: 60+ lines of code, clear at a glance
  3. Easy to Extend: Can easily add more indicators and conditions

Suggestion: Use this strategy as a template, gradually add:

  • RSI filtering
  • Volume confirmation
  • Trend strength (ADX)
  • Multi-timeframe analysis

This way you can upgrade from "beginner" to "advanced"!