WorkLeverage
LIVETRADING

Leverage

9-factor perpetuals engine. Conviction-scaled. Six risk gates.

Leverage interface
180
Tests
92%
Coverage
20×
Max Leverage
6
Risk Gates
// What It Does

Leverage trades Phemex USDT-margined perpetuals using a 9-factor PolyEdge signal engine ported from Foresight, adapted for continuous futures markets. 251 tests, 92% coverage. Runs on testnet in conservative mode by default — when it goes live, it goes live with discipline.

The signal engine builds a composite score (0–100) anchored to InDecision's directional bias (35 pts). Price momentum adds another 35 pts from ATR-adjusted velocity. Technical analysis — RSI, MACD, Bollinger Bands, TD Sequential — contributes up to 30 pts. Volume, news sentiment via Perplexity, and funding rate gate round out the stack. Scores ≥65 open a position. Scores ≥80 go in at STRONG conviction: 10× leverage, 3% account size.

PR #12 (March 2026) added trailing stops (activates at 1× ATR profit), partial take-profit (50% off at 1.5× ATR), funding rate gate (blocks adverse funding before entry), and Discord webhook alerts for every trade open, close, and circuit breaker event. The P&L CLI lets you check performance from anywhere.

Six risk gates enforce the math: margin utilization capped at 70%, daily loss limit 10%, consecutive loss circuit breaker, max 2 concurrent positions, leverage ceiling at 20×. Gate evaluation is ordered — the first gate that fires wins. No exceptions.

// Live Interface
LEVERAGE · PHEMEX PERPS
2 OPEN · +$1,500.00
BTC/USDTSHORT10×
score: 82
ENTRY
$67,240
CURRENT
$65,890
P&L
+$1,350.00
ROE
+2.01%
ETH/USDTSHORT
score: 74
ENTRY
$3,410
CURRENT
$3,380
P&L
+$150.00
ROE
+0.88%
6 risk gates active · max 20× cap● Phemex CLOB connected
// Architecture
LEVERAGE — 9-FACTOR SIGNAL ENGINE
Binance WS feed → Score (0–100) → Conviction-scaled leverage → Phemex CLOB
SIGNAL FACTORS (0–100 composite)
FACTOR
MAX
WHAT IT MEASURES
indecision_bias← anchor
35
InDecision Engine directional feed
price_momentum
35
ATR-adjusted price velocity
technical_analysis
30
RSI · MACD · BB · TD Sequential
volume_confirmation
10
Volume profile confirms the move
trend_alignment
+5/−10
Multi-TF agreement bonus/penalty
news_sentiment
10
Perplexity context layer
funding_rate
10
Penalizes adverse perp funding
CONVICTION SCALING
LEVEL
SCORE
LEV
SIZE
STRONG
≥80
10×
3%
MODERATE
≥70
2%
WEAK
≥65
1%
hard cap 20× · conservative mode: STRONG≥80
RISK GATES (6)
1
Margin check — never risk > max % of balance
2
Circuit breaker — halt after N consecutive losses
3
Daily loss limit — 10% drawdown = bot stops
4
Funding rate gate — skip if funding is adverse
5
Position cap — max 2 concurrent open
6
Leverage hard cap — 20× absolute ceiling
STOP-LOSS
1.5× ATR
TAKE-PROFIT
2.5× ATR
TRAILING STOP
activates at 1× ATR profit
PARTIAL TP
50% off at 1.5× ATR
// Ecosystem Connection
CONSUMES SIGNALS FROM