BuyAllSellAllStrategy: The "Coin Flip" Trading Strategy
A "laid-back" trading strategy — buy, sell, all determined by mood (random)
1. What's This Strategy All About?
This strategy's buy/sell decisions are determined by flipping a coin.
Not a metaphor — literally! The code uses np.random.randint(0, 2). Each candle that passes, it randomly shouts "buy!" or "don't buy!" Like flipping a coin to decide whether to eat instant noodles today.
The name is flashy — "buy all, sell all," as if decisive. But in reality:
- It doesn't know when to buy
- It doesn't know when to sell
- It scores purely based on luck
Conclusion: This is more like an experimental "counter-example" than a truly usable strategy.
2. Core Settings
| Parameter | Value | Translation |
|---|---|---|
| Stop-Loss | -25% | Won't admit defeat until losing a quarter |
| Timeframe | 5 minutes | 5-minute candles |
| Exit Signal | Enabled but unused | In name only |
| Technical Indicators | 0 | Not used a single one |
3. Buy Conditions
The answer: 0 real conditions!
def populate_entry_trend(self, dataframe, metadata):
# The entire core code is just this one line
dataframe["buy"] = np.random.randint(0, 2, size=len(dataframe))
return dataframe
This means:
- Each candle has 50% chance of generating a buy signal
- Regardless of price direction
- Regardless of volume size
- Regardless of trend direction
It's a random number generator with no emotions.
4. The Strategy's "Personality"
| Trait | Description |
|---|---|
| Personality | Overly "go with the flow" |
| Decision Method | Coin flip |
| Risk Awareness | Nearly none |
| Learning Ability | None |
| Suitable Career | Professional "support player" |
5. Summary: What's the Verdict?
This strategy is not suitable for anyone.
If you want:
- To make money → Don't use it
- To learn → Just look, don't emulate
- For comparison → Can serve as a "counter-example"
6. ⚠️ Final Warning
Say it three times:
- ❌ Do not use for live trading
- ❌ Do not use for live trading
- ❌ Do not use for live trading
Because:
- Random entry has negative expected returns
- Plus trading fees
- Long-term,必然会亏损
If you want to learn trading strategies, please refer to strategies using technical indicators.
📝 Tip: If you want to transform this strategy, try replacing the random numbers with real technical indicator signals, like RSI, MACD, moving average crossovers, etc. That's the only way to make it a truly meaningful strategy.