MagicTradeBot determines market direction using a behavior-based detection system rather than relying solely on traditional indicators. The core tested and working approach is based on signal density and signal imbalance analysis over a defined time window.
The system continuously analyzes how many:
- Long signals
- Short signals
are generated within a rolling 30-minute interval.
This method has proven effective in identifying real market pressure shifts, especially during extreme volatility.
🧠 Core Logic: Signal Counting Algorithm
The primary working algorithm:
- Count number of long signals detected in last 30 minutes
- Count number of short signals detected in last 30 minutes
Compare:
- Total signal volume
- Imbalance between long and short signals
- Spike intensity relative to normal behavior
This provides a behavioral measure of market pressure.
📊 Normal / Neutral Market Conditions
In stable or neutral markets:
- 1–2 signals may be detected per 30 minutes
- Long and short signals appear relatively balanced
- No aggressive spike in one direction
Example:
- 2 long signals
- 1 short signal
This suggests:
- Balanced activity
- No strong directional pressure
- Market considered Neutral
📈 Bullish Market Detection
Bullish direction is identified when:
- Long signals significantly outnumber short signals
- Signal count increases above normal levels
Example:
- 15 long signals
- 2 short signals
This indicates:
- Strong upward pressure
- Consistent bullish momentum
- Buyers dominating market structure
If spike intensity increases (e.g., 30–50 long signals within 30 minutes), it may indicate:
- Extreme bullish condition
- Breakout phase
- High volatility rally
📉 Bearish Market Detection
Bearish direction is identified when:
- Short signals dominate
- Signal count spikes abnormally high
Example:
- 20 short signals
- 1 long signal
This suggests:
- Market selling pressure
- Potential crash or strong correction
During extreme crash conditions, short signals may spike dramatically:
Example:
- 50+ short signals
- 0 long signals
This indicates:
- Aggressive liquidation cascade
- Panic selling
- Extreme bearish phase
🚨 Why Signal Spikes Matter More Than Price Alone
Price movement alone does not always reflect underlying pressure.
However, when signal detection jumps from:
Normal:
- 1–2 signals
To extreme:
- 10–20–50 signals in same 30-minute window
It shows:
- Structural breakdown
- Indicator alignment across multiple conditions
- Market behavior shift
This spike-based detection acts as an early warning system.
🔄 Adaptive & Improving System
While signal counting is the current tested and working algorithm, the system is designed to evolve.
Future enhancements may include:
- Volatility expansion measurement
- Trend strength scoring
- Volume confirmation
- Market structure analysis
The goal is continuous refinement of market state detection.
🎯 Direction Classification Summary
| Condition | Signal Pattern | Market Classification |
|---|---|---|
| 1–2 balanced signals | Low volume, no imbalance | Neutral |
| 10+ long signals dominating | Upward spike | Bullish |
| 10+ short signals dominating | Downward spike | Bearish |
| 30–50+ extreme imbalance | Massive directional pressure | Extreme Bullish / Bearish |
🧠 In Simple Words
MagicTradeBot determines market direction by analyzing:
- How many signals are being generated
- Which side (long or short) dominates
- How sharply signal volume increases
If signals remain calm → Market is Neutral If long signals spike → Market is Bullish If short signals spike → Market is Bearish
This behavioral approach allows the bot to adapt dynamically and react to real market pressure rather than relying on static assumptions.