๐ง How the prediction engine works
1 ยท Data pipeline (in โ out)
Min1/5/15 klines ร600โ MEXC WebSocket
live ticks ยท trades ยท candlesโ Engine
7 methods per secondโ Score โ100โฆ+100
+ confidenceโ Your browser
ticket ยท chart ยท push
On startup each market's history is fetched natively for every timeframe (so 5m and 15m each have 600 real candles, not aggregated approximations). Then a single MEXC websocket streams live trades, ticker and the forming candle; the server recomputes all indicators once per second and a 10-minute REST re-sync self-heals any gaps. Everything you see is MEXC's own market data.
2 ยท The seven methods (what predicts what)
Each method looks at the candles and votes a direction with a confidence 0โ100%. This is classic technical analysis โ each captures one real market behaviour:
| Method | What it actually measures | Weight |
|---|---|---|
| EMA trend | Three exponential moving averages (21/55/200). When the fast is above the slow and price is above the 200, the market is structurally rising. This is the backbone โ trend is the single most reliable edge. | 30 |
| RSI 14 | Relative Strength Index โ is momentum healthy (55โ72) or exhausted/overbought (>72). Filters out chasing a move that's already spent. | 18 |
| MACD | Difference of two EMAs vs its signal line โ measures whether momentum is still accelerating. Rising histogram = fuel left in the move. | 15 |
| Bollinger | 20-period band ยฑ2ฯ. A tight "squeeze" that then breaks a band signals a volatility expansion โ often the start of a fast move. High confidence when breaking out of a squeeze. | 14 |
| VWAP | Volume-Weighted Average Price for the session โ the day's fair value. Above it, buyers are in control; below it, sellers. Institutions anchor to VWAP. | 12 |
| Volume surge | Current candle volume vs its 20-period average. A >1.8ร surge confirms real conviction behind a move rather than a thin-liquidity fakeout. | 10 |
| ADX gate | Average Directional Index โ trend strength, not direction. It doesn't vote; it multiplies the whole score ร1.15 in a strong trend (ADXโฅ25) and ร0.55 in chop (ADX<18), because signals lie in sideways markets. | gate |
3 ยท How they become one number
The score is a weighted, confidence-scaled vote, then gated by trend strength:
for each method: contribution = direction(โ1|0|+1) ร weight ร (confidence / 100) score = ( ฮฃ contribution / ฮฃ weight ) ร 100 score = score ร ADX_multiplier // ร1.15 strong ยท ร0.55 chop score = clamp(score, โ100, +100)
| Score | Verdict |
|---|---|
| โฅ +55 | STRONG LONG |
| +25 โฆ +54 | LONG |
| โ24 โฆ +24 | NEUTRAL โ stand aside |
| โ54 โฆ โ25 | SHORT |
| โค โ55 | STRONG SHORT |
Confidence
Separate from the score: confidence = how much the directional methods agree with the final verdict, weighted. Six of seven methods pointing the same way โ high confidence. A split vote โ low confidence even if the score crosses a threshold. That's the number in the "Methods used" panel.
4 ยท From verdict to a trade you can place
When there's a signal, the engine builds the ticket from ATR (Average True Range โ the market's live volatility):
stop-loss = entry โ 1.2 ร ATR // stop breathes with volatility take-profit 1 = entry ยฑ 1.2 ร ATR // risk:reward 1:1 (close 50%) take-profit 2 = entry ยฑ 2.4 ร ATR // risk:reward 1:2 (let it run) recommended leverage = clamp( round(0.5 / stop%), 2, 10 ) // Safe mode
In Degen mode the recommended leverage scales toward the market's real max (up to 500ร) by confidence โ and the calculator always shows the liquidation distance versus your stop, with a red DANGER warning if leverage would liquidate you before the stop is hit.
5 ยท Honest limits (what it does NOT do)
- It reads price action only โ no order-book depth, no funding-rate positioning, no news or on-chain flow yet.
- Indicators are lagging by nature โ they describe what price is doing, they don't foresee shocks (liquidation cascades, listings, macro headlines).
- It has no memory of its own hit-rate โ every method's weight is fixed by hand, not learned from results.
- It cannot predict the future. It estimates probabilities from patterns that tend to repeat. Leverage magnifies being wrong.
6 ยท "Price went up but it still says SHORT?!"
This is normal for a trend-following system and usually correct. The verdict reads the whole trend (200-EMA, MACD, VWAP) โ not the last tick. In a downtrend, a small up-move is a pullback, and selling into a bounce is often a better short entry, not a reason to flip.
So the dashboard now shows a separate short-term momentum line on the ticket. When price is moving against the signal, you get an amber counter-move warning: the trend still favours the trade, but wait for the short-term move to stall before entering โ and if it keeps pushing against the signal, treat it as a possible early reversal and stand aside. The entry price on the ticket is now the live order-book fill price (bid for shorts, ask for longs), so it matches exactly what you'd get on MEXC.
7 ยท How we make it smarter (the roadmap)
- Multi-timeframe confluence โ only fire STRONG when 5m and 15m agree; require the higher timeframe as a directional filter. Removes most chop false-signals.
- Order-book & depth โ MEXC streams full depth; add bid/ask imbalance and large-wall detection to catch moves the candles haven't shown yet.
- Funding-rate signal โ extreme funding = crowded positioning; fade it. Cheap, high-value contrarian input already in the data.
- RSI / MACD divergence โ price makes a new high but momentum doesn't โ early reversal warning, one of the few genuinely leading signals.
- Adaptive weights (self-learning) โ log every signal's outcome, then re-weight each method by its recent hit-rate per market. The engine tunes itself instead of using my hand-set numbers.
- Backtesting page โ replay the last N days so you (and the engine) can see the win-rate, average R, and drawdown of these exact rules before trusting size.
- Volatility-regime switch โ use trend-following rules in trends and mean-reversion rules in ranges, chosen automatically by ADX/Bollinger width.
- Machine-learning layer (later) โ once enough labelled outcomes accumulate, a gradient-boosted model can combine the same features with learned, non-linear weights.
Tell me which of these to build next โ backtesting and multi-timeframe confluence give the biggest accuracy jump for the least risk.