An AI-powered trading bot that combines Gemini 3.5 Flash vision analysis, multimodal chart recognition, and 6 independent signal layers to make disciplined, emotionless trading decisions — 24 hours a day.
Human traders sleep. They panic. They get greedy. Markets don't care about any of that.
BTC moves 8% at 3AM. You're asleep. The opportunity — or the risk — is already gone before you open your eyes.
Fear and greed override logic every time. A bot has no ego to protect and no fear to paralyze it. Every decision is mathematical.
5-minute windows close before analysis is complete. By the time a human reacts, the entry is gone and risk:reward is destroyed.
Phantom Trader solves all three — permanently.
Full cycle completes in under 90 seconds. From data pull to order confirmation — every step is logged.
Every trade includes stop-loss + take-profit in a single atomic bracket order. No partial fills without protection.
Runs 24/7 via PM2 process manager. Survives internet drops. Survives reboots. Position audit runs on every restart.
Every 4 hours, Phantom takes a screenshot of the live candlestick chart via Puppeteer and sends it to Gemini 3.5 Flash for multimodal analysis. The AI identifies patterns, trend direction, support/resistance, and momentum from the actual visual chart — not just numbers.
The 1H loop runs full AI analysis with chart screenshots and sets the trend direction. The 5-min scalp engine then calls Gemini text-only every 5 minutes — passing the 1H reasoning as context — to find precise entry points within the confirmed trend.
Four independent signals feed a weighted scoring formula. Technical indicators (35%), AI chart analysis (30%), news sentiment (20%), and the Crypto Fear & Greed Index (15%) combine into a single score. Trade only fires when score ≥ 0.45 AND AI confidence ≥ 70% AND ADX ≥ 25.
At 50% of the take-profit distance, the system exits half the position and locks in guaranteed profit — then moves the stop to breakeven. The remaining half rides a trailing stop that follows price upward, capturing extended moves without giving back gains.
Entry, stop-loss, and take-profit are sent to Alpaca as one single atomic request. Physically impossible to open a position without protection. If the bracket is rejected, the entire trade is cancelled. After every restart, a position audit verifies all open trades have stops.
Before every 1H analysis, Phantom injects the last 5 closed trade outcomes — including what the AI said at entry and whether it won or lost — into the Gemini system prompt. The model learns from its own mistakes in-context, progressively improving its signal calibration over time.
Full Gemini analysis with Puppeteer chart screenshot every 4 hours. Slower, more deliberate. Catches major trend moves. Best for operators who want reliability over frequency.
1H sets the trend via full AI analysis. The 5-min engine then calls Gemini text-only with the 1H context every 5 minutes for precise entries. Up to 5 trades per 4-hour window.
The system measures current ATR against its 20-period average. Volatile (ATR > 1.3× average) → scalp mode. Calm and trending → swing mode. No manual intervention needed.
| Feature | Swing | Scalp | Auto |
|---|---|---|---|
| AI per cycle | Full | Full* | Full* |
| Puppeteer screenshot | Yes | 1H only | 1H only |
| Trades per day | 1–3 | 3–15 | 3–12 |
| Stop distance | 2× ATR | 1× ATR | Adaptive |
| Take profit | 6× ATR | 1.5× ATR | Adaptive |
| Recommended for | Beginners | Experienced | Any level |
Fractional Kelly Criterion calculates optimal bet size based on historical win rate and risk:reward ratio. Hard cap at 1% of portfolio per trade. No single loss can meaningfully damage the account.
ATR-based stops adapt to actual market volatility. Stop distance = 2×ATR for swing trades, 1×ATR for scalps. Sent as part of the bracket order — lives on Alpaca's servers permanently after entry confirmation.
Two automatic circuit breakers. Daily loss limit: portfolio down 5% → all trading halted until midnight. Drawdown limit: portfolio down 10% from peak → all trading halted indefinitely until manual reset.
Maximum 3 open positions simultaneously. Maximum 3% of total portfolio at risk across all open trades. Correlation guard prevents opening BTC and ETH simultaneously — 90% correlated assets.
Phantom Trader operates on a strict 30-day paper trial before any live capital is deployed. Six measurable criteria must all pass — no exceptions, no shortcuts.
No crashes, no missed cycles, no silent failures. Full operational stability under real market conditions.
Every analysis cycle logged. No missing entries. Full decision trail from signal to execution.
Over the full 30-day period. Combined with 3:1 R:R, this generates meaningful positive expectancy.
Expected value per trade must be greater than $0 when calculated over the sample. Math must work.
The kill switch must never trigger during the paper trial. If it does, the trial resets.
Total gross profits divided by total gross losses must exceed 1.2 across the full sample period.
30-day autonomous paper trading on BTC/USD and SPY. Full audit log generation and performance analysis. Gemini prompt tuning based on observed signal quality.
Goal: All 6 success criteria met with statistical significance.
Activate dual mode with small live capital. Philippine bank wire or crypto deposit to Alpaca. Monitor live vs paper performance divergence closely.
Goal: Live P&L matches paper P&L within ±15% variance.
Migrate from local laptop to AWS EC2 (t3.small or t3.medium). 24/7 uptime without keeping home PC running. CloudWatch monitoring, SNS alerts on kill switch triggers, S3 backup of audit logs.
Goal: 99.9% uptime. Zero missed analysis cycles due to infrastructure.
Add ETH/USD, QQQ, AAPL to active assets. Build web dashboard for real-time monitoring. Explore multi-account management. Consider open-source release with full documentation.
Goal: Production-grade multi-asset autonomous system.
Currently running on a local laptop in the Philippines. This creates five structural failure points that no amount of good code can solve:
With AWS Startup Credits, Phantom Trader moves from a bedroom experiment to a production-grade system with the infrastructure professional algorithmic traders rely on — at a cost that doesn't burn through trading capital.
Questions about the system architecture, collaboration opportunities, or AWS infrastructure decisions? Reach out directly.
Send a Message