# Redline — Complete Product Documentation > The Trading Discipline Operating System that mechanically enforces your trading rules in real-time — so discipline is automatic, not willpower-dependent. **URL:** https://tradeintelx.com **Product Name:** Redline **Tagline:** *The Trading OS That Enforces Discipline* **Category:** SaaS / Trading Technology / Fintech **Platforms:** Web (PWA), iOS, Android **Pricing:** Free · Pro $39/mo · Elite $70/mo --- ## What Is Redline? Redline is a **Trading Discipline Operating System** — a SaaS Progressive Web App (with native iOS/Android via Capacitor) that provides real-time risk enforcement, account protection, and behavioral remediation for traders. Unlike traditional trading journals (Tradervue, TraderSync, Edgewonk, TradeZella) that passively track statistics *after the fact*, Redline **mechanically enforces** trading rules so that discipline is automatic, not willpower-dependent. **The core loop:** Trade → Violation Detected → Consequence Applied → Remediation Required → Trading Unlocked **The key competitive advantage:** Redline is the only platform that actively *prevents* rule-breaking in real-time. Every competitor only tells you what went wrong after the damage is done. --- ## Core Problem It Solves The #1 reason traders fail is not lack of strategy knowledge — it's breaking their own rules under emotional pressure: - Removing stop losses when a trade goes against them - Adding to losing positions ("revenge trading") - Over-sizing positions after a winning streak - Ignoring daily max-loss limits - Trading after a bad session when emotion is high Redline makes discipline structural, not aspirational. --- ## How Enforcement Works ### Step 1 — Violation Detection The system monitors every trade in real-time against the user's configured rules: - Stop loss missing or too wide - Position size exceeds risk% limit - Risk/reward ratio below minimum - Daily loss limit approached or breached - Revenge trading pattern detected (rapid trades after losses) - Trading outside allowed hours ### Step 2 — Escalating Consequences When a violation is detected, consequences escalate with repeat offenses: 1. **5-minute cooldown** — brief pause, reflect on what happened 2. **30-minute lock** — longer pause, forced break 3. **Session halt** — no more trading this session 4. **Day lock** — full trading day blocked 5. **Account review** — requires admin/mentor intervention ### Step 3 — Behavioral Remediation To unlock from any lockout state, the trader must complete education modules targeted at their specific violation type. This builds behavioral understanding, not just punishment. Example: revenge trading violation → assigned module on emotional regulation in trading. ### Step 4 — Release + Scoring After remediation, the trader is released back to trading. Every violation, consequence, and remediation affects the **Discipline Score** (0–100 composite metric tracking rule adherence over time). --- ## Full Feature Inventory ### Enforcement & Behavioral Risk System - **Violation Detection Engine**: Stop loss absence, risk% breaches, bad R:R, revenge trading patterns, position sizing violations - **Escalating Consequences**: 5min cooldown → 30min lock → session halt → day lock → account review - **Account State Machine**: NORMAL → AT_RISK → RESTRICTED → LOCKED — each state restricts UI progressively - **Remediation System**: Education modules assigned per violation type; must complete to unlock - **Override System**: Admin/mentor overrides with full audit trail - **Pre-Trade Gating**: Validates trade against rules before allowing entry - **Discipline Score**: Composite 0–100 score tracking adherence over time - **Full-Screen Lock Overlay**: When LOCKED, shows enforcement screen — no navigation ### Trade Management - **Trade Logger**: Manual and quick trade entry, multi-asset (stocks, options, futures, forex, crypto) - **CSV Import/Export**: Bulk trade import with field mapping - **Calendar View**: Visual calendar of trades by day - **Sessions View**: Group trades by trading session - **Canonical P/L Pipeline**: Standardized `buildCanonicalTrade()` for consistent P/L across data sources - **Signal Tags & Risk State**: Tag trades with setup type, risk level, intent capture - **Enrichment Queue**: AI-powered queue to complete incomplete trade data - **Playbook System**: Define setups, pre-trade checklists, rules engine ### Trading Sessions - **Session Lifecycle**: Start → Trade → Review → End with persistent state - **Global Session Banner**: Sticky banner showing live P/L, trades, risk%, elapsed time across all pages - **Pre-Trade Checklist**: Configurable checklist required before first trade - **Post-Session Review**: Automatic summary with stats, violations, suggestions - **Risk Budget Tracker**: Real-time daily risk% with visual indicator - **Quick Trade Entry**: Fast trade logging modal from session banner ### Analytics - **Trade Analytics Dashboard**: Equity curve, drawdown, P/L by setup/tag/time, correlation analysis - **Custom KPI Builder**: User-defined metrics and performance indicators - **XP & Level System**: Gamified progression tied to consistent disciplined trading - **AI Copilot Tab**: AI-powered analysis within analytics view - **Export & Reporting**: PDF reports with charts and summary statistics - **Mentor Mode**: Read-only analytics access for mentors to review mentee data ### Today Page (Daily Command Center) - **Market Overview**: Live indices, futures data - **Economic Calendar**: Events with impact ratings - **Live News Feed**: Multi-source aggregated news with sentiment analysis - **Session Management**: Start/end session with enforcement state - **Yesterday's Recap**: Prior day performance summary - **Streak Tracking**: Consecutive disciplined day tracking - **Watchlist Quick View**: Compact watchlist within daily view - **Account State Banner**: Visual indicator of current enforcement state ### AI & Agents - **Gemini Trade Analysis**: AI-powered trade pattern analysis via Cloud Functions - **Claude Trade Analysis**: Alternative AI analysis engine - **AI Daily Coach**: Personalized daily coaching insights - **AI Content Moderation**: Community content moderation - **AI Rule Adherence**: AI-powered rule compliance checking - **AI Narrative Engine**: Generates trading story/context narratives - **Multi-Agent System**: Agent registry, page agents, specialized agents, orchestration - **AI Education Agent**: Personalized learning recommendations ### Education Hub ("The Treatment Room") - Account-state-aware access — content progressively locked based on enforcement state - Remediation modules — violation-specific education required to unlock trading - TradingTube — YouTube-like video player for trading education - Courses & library — structured course content with progress tracking - Achievements — education milestone tracking ### Communication & Community - Chat system — 1:1 and group messaging, account-state-aware - Trading rooms — live trading rooms with real-time discussion - Ticker-specific chat — per-symbol discussion channels - Voice/video calls — 100ms HMS & Agora integration - Social feed — posts, trade shares, stories, trending topics - Market sentiment polls — community-driven sentiment - Leaderboards — discipline score and performance rankings - Challenges/competitions — trading competitions with gamification ### News & Market Intelligence - Multi-source aggregation: Marketaux, Polygon, Benzinga, FMP, Alpha Vantage, RSS, NewsAPI - AI-powered sentiment analysis - Impact-rated economic calendar - Per-symbol news feeds - Live scrolling market ticker ### Organization / B2B Platform (Elite) - Org dashboard — prop firm / trading group management center - Trader management — add, monitor, restrict traders within org - Per-trader analytics — drill-down into individual trader performance - Invite system — token-based invitations - Audit logs — full audit trail of all org actions - Violation rollup — aggregated violation view across all traders - PDF reports — downloadable performance reports per trader - White label — custom branding for organizations - Provisioning — institutional onboarding flow ### Mentorship System (Elite) - Mentor dashboard — overview of all mentees with key metrics - Progress tracking — mentee progress visualization - Q&A system — mentor-mentee Q&A within platform - Assignments — mentor can assign tasks and exercises - Session scheduling — built-in session scheduler - Matching quiz — AI-assisted mentor-mentee matching ### Gamification - Achievement showcase — badges for trading milestones - Leaderboard panel — competitive rankings - Missions panel — daily/weekly mission system - Skill tree — progressive skill unlocking - Player HUD — gamified heads-up display - Mini-games — Trading Breakout, Trading Snake for cooldown periods - Loot box system — rewards for disciplined streaks --- ## Broker Integrations ### Live Integrations **MetaTrader MT4/MT5** — *Live* Connect any MT4 or MT5 account via MetaAPI cloud bridge in under 60 seconds. Supports: - Automatic trade history sync - Real-time enforcement against daily loss and drawdown limits - Prop firm challenge protection (breach alerts before limits hit) - Support for forex, CFDs, futures, and crypto CFD instruments - No SDK — pure REST API via Cloud Functions (connect, revoke, sync) **Compatible Forex / CFD Brokers (MT4/MT5):** OANDA, IC Markets, Pepperstone, XM, FP Markets, Exness, HFM, Tickmill, Alpari, FXTM, RoboForex, FBS, OctaFX **Compatible Futures / US Platforms (MT4/MT5):** NinjaTrader Brokerage, Tradovate, AMP Futures **Compatible Prop Firms — Tier 1 (largest):** FTMO, The5%ers, Funded Trading Plus, True Forex Funds, E8 Funding, Goat Funded Trader, Alpha Capital, Funding Pips, Blue Guardian, FundedNext, Apex Trader Funding, TopStep, Earn2Trade **Compatible Prop Firms — Tier 2:** Audacity Capital, City Traders Imperium, Lux Trading Firm, Fidelcrest, FastTrack Trading, Maven Trading, My Funded FX, The Trading Pit, Funded Engineer, Ment Funding, Skilled Funded Traders, Smart Funded Trader **Compatible Prop Firms — Tier 3 / Growing:** Traders Launch, FundYourFX, Finotive Funding, Bespoke Funding, Traders With Edge, Nordic Funder, Bulenox, Breakout Prop *Compatibility is via MT4/MT5 account credentials through MetaAPI cloud bridge. Redline is not affiliated with, endorsed by, or a client of any broker or prop firm listed above.* --- **TradeLocker** — *Live* Full enforcement: auto-import, real-time analysis, daily loss lock, escalating cooldowns via dedicated Cloud Run ingest service. **Charles Schwab** — *Live* OAuth 2.0 connection, real-time trade sync, violation detection, and account protection for US equity and options traders. 10-second quote refresh for live watchlist updates. **SnapTrade** — *Live* OAuth connection to 17+ retail brokerages via a single integration. Auto-sync positions, balances, and trade history with full violation detection. **Supported retail brokers via SnapTrade:** Robinhood, Webull, Fidelity, E*TRADE, Public, Alpaca, Tradier, Tastytrade, tastyworks, Wealthsimple, Questrade, Vanguard, Kraken, Coinbase, Binance.US, Gemini, BitFlyer **Interactive Brokers** — *Partial* Client adapter exists; full connection in development. **ThinkorSwim, Tradovate** — *Planned* --- ## Pricing ### Free — $0/month - 50 trades/month - Manual trade logging - Basic analytics - Core violation detection - Starter education content - No credit card required ### Pro — $39/month - Unlimited trades - Full trade logger (manual + quick entry + CSV) - Full analytics (all tabs) - AI coaching — 100 calls/month (Gemini + Claude) - All violations + remediation plans - Full education library - Full community access - XP & gamification - Broker sync (MT4/MT5, TradeLocker, Schwab, SnapTrade) - Session management ### Elite — $70/month - Everything in Pro - Org dashboard — up to 20 traders - Mentor mode — up to 20 mentees - PDF performance reports - White-label branding - AI coaching — 300 calls/month - Custom KPIs - Elite trading rooms - Priority support - Per seat pricing for teams --- ## Target Users ### Retail Day Traders - Age 25–45, trades stocks/options/futures/forex daily - Knows their strategy but can't stick to it under pressure - Revenge trades after losses, over-sizes after wins - Needs a system that prevents rule-breaking in real-time - Starts free → upgrades to Pro ### Prop Firm Traders - Trading funded accounts with MT4/MT5 prop firms (FTMO, The5%ers, FundedNext, and 50+ others) - Primary risk: breaching daily drawdown or max-loss on challenges — often right before passing - Need: MT4/MT5 auto-sync, real-time drawdown monitoring, enforcement before breach happens - Connect MT account in 60 seconds; Redline tracks challenge parameters automatically ### Trading Mentors - Experienced traders with 5–50+ mentees - No visibility into mentee behavior between sessions - Can't enforce discipline remotely - Needs: Mentor dashboard, read-only analytics, assignment system, progress tracking - Elite plan ### Prop Firm Operators & Trading Group Leads - Prop firm managers, trading desk leads, funded trader programs - Can't manually monitor every trader in real-time - Need automated risk enforcement across all MT accounts - Need org dashboards, per-trader monitoring, audit trails, PDF reports - White-label option for firm branding - Elite plan at per-seat pricing --- ## Competitive Comparison | Competitor | Type | Real-Time Enforcement | AI | Community | B2B/Org | |-----------|------|:---:|:---:|:---:|:---:| | Tradervue | Journal only | ❌ | ❌ | ❌ | ❌ | | TraderSync | Journal only | ❌ | Partial | ❌ | ❌ | | Edgewonk | Journal only | ❌ | ❌ | ❌ | ❌ | | TradeZella | Journal only | ❌ | Partial | ❌ | ❌ | | Kinfo | Social + Journal | ❌ | ❌ | ✅ | ❌ | | **Redline** | **Discipline OS** | **✅ Real-time** | **✅ Full (Gemini + Claude)** | **✅ Full** | **✅ Org + Mentor** | Redline is the only platform that actively prevents rule-breaking in real-time. No competitor offers enforcement, remediation, or behavioral consequence systems. --- ## Technical Architecture ### Frontend - React 18, Vite, React Router DOM 6 - Zustand (20+ stores), React Query (TanStack) - Tailwind CSS (dark/light/system themes) - Framer Motion (animations) - Chart.js, Recharts, ECharts, Lightweight Charts - i18next (EN, ES, ZH, FR) - Capacitor (iOS + Android native builds) ### Backend / Cloud - Firebase v12: Firestore, Auth, Cloud Functions, Realtime Database, Storage - Cloud Run: TradeLocker ingest service (Docker) - Node.js 20, native fetch (no heavy SDKs) ### Third-Party Services - Stripe — payments and subscription management - 100ms HMS + Agora — voice/video - Gemini AI + Claude AI (claude-haiku-4-5) — trade analysis + Council agents - MetaAPI — MetaTrader MT4/MT5 bridge (REST, no SDK) - SnapTrade — OAuth bridge to 17+ retail brokerages - TradingView — chart widgets - Cloudinary — video upload/hosting - Alpha Vantage, Polygon, Benzinga, FMP, Finnhub, Twelve Data, Databento, Marketaux, NewsAPI, Schwab — market data --- ## Navigation / Pages ### Public (No Auth Required) - `/` — Landing page - `/signup` — Create account - `/signin` — Sign in - `/pricing` — Full pricing page - `/privacy` — Privacy policy - `/terms` — Terms of service - `/redeem` — Redeem invite code ### App (Auth Required) - `/today` — Daily command center - `/trade-logger` — Trade journal and logger - `/analytics` — Performance analytics - `/backtesting` — Strategy backtester (feeds into bot initialization) - `/agents` — AI Agents Studio (Council, My Bots, chat) - `/api-docs` — Developer API documentation - `/trading` — Active trading session - `/chat` — Community chat - `/news` — Market news - `/education` — Education hub - `/community` — Social feed - `/enforcement` — Enforcement state management - `/org/:id` — Organization dashboard (Elite) --- ## Frequently Asked Questions **How is Redline different from a trading journal?** Trading journals track your trades after the fact. Redline actively enforces your rules in real-time — blocking trades that violate risk limits, triggering cooldowns after emotional sequences, and requiring education modules before you can resume trading. It's an enforcement system, not a passive log. **Does it work with my prop firm account?** Yes — if your prop firm uses MT4 or MT5 (most do, including FTMO, The5%ers, FundedNext, Blue Guardian, E8 Funding, Goat Funded Trader, and 40+ others), connect it in under 60 seconds via MetaAPI. Redline monitors your drawdown limits and locks you out before you breach your challenge parameters. **Which brokers are supported?** MT4/MT5 (50+ prop firms + forex brokers via MetaAPI), TradeLocker, Charles Schwab, and 17+ retail brokers via SnapTrade (Robinhood, Webull, Fidelity, E*TRADE, Public, Alpaca, Tradier, Tastytrade, Wealthsimple, Questrade, Vanguard, Kraken, Coinbase, Binance.US, Gemini, and more) are fully live. Interactive Brokers is in development. **Is there a free plan?** Yes — 50 trades/month, manual logging, core enforcement, starter education. No credit card required. **Does it work on mobile?** Yes — Progressive Web App installable on any device, plus native iOS and Android apps via Capacitor. **Can I use it for my prop firm?** Yes — Elite plan includes org dashboard to manage up to 20 MT4/MT5 traders with real-time monitoring, violation tracking, audit trails, and PDF reports. --- ## Redline Developer Platform Redline exposes a REST API so AI agents can enforce trading rules programmatically. The API is the bridge between AI agents and the enforcement engine. **Base URL:** `https://tradeintelx.com` **Auth:** `Authorization: Bearer rl_live_` **Rate Limit:** 100 requests / minute per key **Error shape:** `{ "error": { "code": "string", "message": "string" } }` ### REST API v1 Endpoints | Method | Path | Description | |--------|---------------------------|-------------------------------------------------------| | GET | /v1/enforcement/state | Enforcement lock status + discipline score | | POST | /v1/trades | Log a completed trade | | POST | /v1/violations/check | Stateless pre-trade violation check (no writes) | | GET | /v1/discipline/score | Score (0–100), band, and 7-day trend | | POST | /v1/session/start | Start a trading session | | POST | /v1/session/end | End session, receive trade summary | | GET | /v1/analytics/summary | Period analytics (?period=7d|30d|90d|1y) | | GET | /v1/fingerprint | LLM-ready behavioral fingerprint (trader DNA) | | GET | /v1/bot/config | Bot configuration (auto-resolved from bot-scoped key) | | POST | /v1/bot/signal | Submit a trade signal from a bot for review/execution | | POST | /v1/bot/feedback | Log Council feedback on a bot signal (teach loop) | ### GET /v1/enforcement/state ```json { "accountState": { "isLocked": false, "lockType": null }, "canTrade": true, "cooldownUntil": null, "disciplineScore": 78, "violations": [{ "code": "NO_STOP_LOSS", "timestamp": "...", "severity": "medium" }] } ``` ### POST /v1/trades Request body: ```json { "symbol": "XAUUSD", "direction": "long", "entryPrice": 3245.00, "exitPrice": 3268.00, "quantity": 0.1, "stopLoss": 3230.00, "takeProfit": 3290.00, "setupType": "breakout", "sessionId": "optional-session-id" } ``` Response: ```json { "tradeId": "abc123", "symbol": "XAUUSD", "pl": 23.00 } ``` ### POST /v1/violations/check Stateless — evaluates against your stored trading rules, returns immediately, writes nothing. Request body: `{ "entryPrice": 3245, "quantity": 0.1, "stopLoss": 3230, "symbol": "XAUUSD" }` Response: ```json { "clear": true, "riskScore": 0.12, "violations": [] } ``` Violation codes: `NO_STOP_LOSS`, `BAD_RR`, `POSITION_SIZE_BREACH`, `DAILY_LOSS_LIMIT`, `OUTSIDE_SESSION` ### GET /v1/discipline/score ```json { "score": 78, "band": "disciplined", "trend": "improving", "recentViolations": [{ "code": "NO_STOP_LOSS", "timestamp": "..." }] } ``` Bands: `elite` (90–100), `disciplined` (70–89), `developing` (50–69), `at-risk` (0–49) --- ## MCP Server Redline ships a Model Context Protocol server so AI agents (Claude, GPT-4o, Gemini, etc.) can call the enforcement API natively via tools. **Install:** `npx redline-mcp-server --key rl_live_xxxxx` **Claude Desktop config** (`~/.config/claude-desktop/config.json`): ```json { "mcpServers": { "redline": { "command": "npx", "args": ["redline-mcp-server", "--key", "rl_live_your_key"], "transport": "stdio" } } } ``` ### MCP Tools | Tool name | Description | |----------------------------|-----------------------------------------------------| | check_enforcement_state | Is the account allowed to trade right now? | | log_trade | Log a completed trade | | get_violation_risk | Pre-trade stateless violation check | | get_discipline_score | Get current discipline score + trend | | get_analytics_summary | Period performance metrics | | get_fingerprint | Fetch behavioral fingerprint (trader DNA) | | submit_bot_signal | Submit a bot signal for Council review | | log_bot_feedback | Log Council feedback on a signal (teach loop) | --- ## CLI ```bash npm install -g redline-cli redline auth login --key rl_live_xxxxx redline enforcement state redline violations check --entry 3245 --qty 0.1 --stop 3230 redline trades log --symbol XAUUSD --direction long --entry 3245 --exit 3268 --qty 0.1 redline discipline score redline session start --type market redline session end --id redline analytics summary --period 30d ``` All commands output JSON by default. Use `--pretty` for human-readable output. --- ## JavaScript SDK ```bash npm install redline-sdk ``` ```js import Redline, { RedlineError } from 'redline-sdk'; const redline = new Redline({ apiKey: 'rl_live_your_key' }); // Pre-trade guard (enforcement + violations in one call) const check = await redline.preTradeCheck({ entryPrice: 3245, quantity: 0.1, stopLoss: 3230 }); if (check.clear) { await redline.logTrade({ symbol: 'XAUUSD', direction: 'long', entryPrice: 3245, exitPrice: 3268, quantity: 0.1 }); } ``` --- ## Agent Lifecycle Traders build agents that trade like them. The Agent Lifecycle is the onboarding path: ### Stages 1. **Observe** — Agent watches your last 90 days of trades, builds a behavioral fingerprint (setups, peak hours, risk %, asset type, win rate, profit factor). 2. **Paper** — Agent trades on paper with the fingerprint loaded. Violations are enforced. Metrics accumulate. 3. **Review (Green Light)** — Trader evaluates paper performance against thresholds (min win rate, min profit factor, max drawdown, min trades). Gaps are surfaced. 4. **Live** — Agent trades real funds. Redline enforces the same rules that apply to the human trader. ### Default Green Light Thresholds | Metric | Default threshold | |----------------|-------------------| | Win rate | ≥ 50% | | Profit factor | ≥ 1.5x | | Max drawdown | ≤ $1,000 | | Min trades | ≥ 20 | ### Behavioral Fingerprint Shape ```json { "computed": true, "tradeCount": 147, "lookbackDays": 90, "winRate": 0.58, "profitFactor": 2.1, "avgRiskPercent": 0.01, "primaryAssetType": "forex", "topSetups": [ { "setup": "breakout", "trades": 42, "winRate": 0.67, "pnl": 1240.00 } ], "peakSessionHours": [9, 10, 14], "maxLossStreak": 3 } ``` ### Dashboard Navigate to `/agent` in the app to manage agent profiles, view the behavioral fingerprint, track paper performance vs thresholds, and control live deployment. ### Firestore Collections - `/users/{uid}/agentProfiles/{agentId}` — Agent definition + lifecycle stage - `/users/{uid}/agentSessions/{sessionId}` — Paper trading sessions + trades --- ## API Keys Generate API keys from **Settings → Developer** (or the API dashboard at `/settings`). - Keys are prefixed `rl_live_` for production, `rl_test_` for sandbox - Stored as SHA-256 hashes — Redline never stores the raw key - Scoped to the authenticated user's account - **Bot-scoped keys**: a key can be bound to a specific bot, so `botId` is auto-resolved on every request — the bot's signals, feedback, and config are pre-wired - Rate limit: 100 requests / minute per key (429 with `X-RateLimit-*` headers when exceeded) - Revoke anytime from the dashboard --- ## Bot → Council → Agent Teach Loop Redline's flagship workflow: turn a backtest into a deployed bot that trades like you. ### The Loop 1. **Run a backtest** at `/backtesting` against historical data using the full indicator suite (VWAP, SMA9/20, EMA9/21, Bollinger Bands, Opening Range Breakout). Save the session. 2. **Initialize a bot** from the backtest results — the system generates a `botId` and bot-scoped API key. 3. **Teach via Council** at `/agents` (Council mode). The 3-agent Council reviews the bot's signals and your feedback shapes its decisioning: - **Signal Agent** — entries, exits, setup recognition - **Execution Agent** — sizing, risk, order management - **Coach Agent** — psychology, post-trade review, behavioral patterns 4. **Feedback loop** — every Council response is logged via `POST /v1/bot/feedback` so the bot's behavior converges on yours. 5. **Deploy** — once the bot's signals match your edge, deploy live via the API or MCP tools. ### Context Pipeline A 30-minute context window keeps each agent grounded in your live trading state — enforcement state, open positions, recent trades, discipline score, and fingerprint are passed on every Council turn. ### My Bots Panel Navigate to `/agents` → **My Bots** to see all initialized bots, their status, last signals, and chat history. Each bot has its own dedicated chat modal for direct teach sessions. --- ## Backtesting Navigate to `/backtesting` to run strategies against historical data. **Indicators available:** - VWAP (Volume Weighted Average Price) - SMA 9 / SMA 20 (Simple Moving Averages) - EMA 9 / EMA 21 (Exponential Moving Averages) - Bollinger Bands - Opening Range Breakout (ORB) **Outputs:** - Equity curve, drawdown, win rate, profit factor - Trade-by-trade ledger with entry/exit/P&L - CSV export - Session save - **One-click bot initialization** — promotes the saved backtest into a deployable bot wired to the Council This is the on-ramp for the Bot → Council → Agent teach loop. --- ## Paper Trading Suite A full simulated trading environment that mirrors live execution surfaces. Paper trades are **fully isolated** from live stats, analytics, fingerprint, and the discipline score — log thousands without ever moving your real metrics. ### Order & Execution Surfaces - **Order Ticket** — market, limit, stop, stop-limit for stocks, options, forex, crypto, futures - **Asset-aware quantity inputs** — Shares for stock, Contracts for options/futures, Units for crypto/forex; lot presets 1K → 1M for forex; 0.0001 step for crypto - **Level 2 Order Book** — full bid/ask ladder with depth visualization - **Time & Sales** — printed trade tape with size-based highlighting - **Options Chain Viewer** — Greeks, IV, OI, volume by strike and expiration - **Order Flow** — aggregated buy/sell pressure visualization - **Position Movers** — live unrealized P&L per ticker - **Working Orders Table** — one-click cancel / modify open orders - **Fill History** — every paper execution logged with timestamp, fill price, slippage ### Performance & Account - **Paper Performance Panel** — isolated equity curve, win rate, profit factor, max drawdown - **Paper Account Header** — separate balance, starting capital ($100K default), total P&L - **Position Tracking** — open positions table with cost basis, unrealized P&L, % return ### Isolation Guarantees Paper trades carry `isPaperTrade: true` and an `accountId` pointing at a dedicated Paper Trading account. They are stripped from: - Live trade stats (`useTradeStats`, `useDetailedPerformance`) - Time-windowed canonical P&L (`computeTimeWindowedStats`) - Trading Community user metrics - Enrichment Queue - Account-filtered TradeLocker / Schwab / SnapTrade views - Analytics API summary endpoint (`/v1/analytics/summary`) - Fingerprint computation (`/v1/fingerprint`) --- ## iOS App — Device-Level Enforcement (RedlineOS) The **RedlineOS** iOS app (App Store) ships device-level enforcement no web app can deliver. ### Apple Screen Time Lockout (`FamilyControls`) When the enforcement engine triggers a cooldown, restriction, or lock, a Firestore listener inside the app picks up the state change and applies a Screen Time restriction token via `FamilyControls`. This **physically blocks broker apps at the iOS OS level** — the trader cannot open the broker app, even after force-quitting Redline. ### Supported Broker Apps (44 total, filtered by category) - **Stocks (14):** Robinhood, Webull, Charles Schwab, Fidelity, E*TRADE, Public, Moomoo, SoFi, Stash, M1 Finance, Cash App Investing, Interactive Brokers, TastyTrade, TastyWorks - **Forex (9):** MT4, MT5, OANDA, IG, FOREX.com, cTrader, TradingView (forex), TradeLocker, Match-Trader - **Crypto (8):** Coinbase, Binance.US, Kraken, Gemini, Crypto.com, BitFlyer, Robinhood Crypto, Cash App Bitcoin - **Futures (6):** Tradovate, NinjaTrader, TopstepX, AMP Futures, ApexTraderFunding, TradeLocker Futures - **Charts / Analysis (4):** TradingView, ThinkOrSwim, StockCharts, MarketSmith ### Lockout Architecture - Firebase Cloud Function → Firestore `/users/{uid}/accountState` doc update - iOS app real-time listener picks up state change - Token set written to shared `UserDefaults` (app group) - `DeviceActivityMonitor` extension runs in a **separate OS process** — survives app kill, reboot, and background termination - Lockout persists until cooldown ends or remediation completes ### Other iOS Capabilities - APNs push notifications (violation alerts, session check-ins, pre-market briefing) - CloudKit sync, SwiftData persistence - Background app refresh for state polling - StoreKit 2 in-app purchase via RevenueCat - Native widgets, App Intents (Siri shortcuts) --- ## Chrome Extension — Live Voice Companion The **Redline Extension** (`redline-extension-v4.zip`) is a browser-resident enforcement layer + AI voice console that runs on broker sites. ### Pre-Trade Guard - Runs on 30+ broker domains (TradeLocker, TradingView, MetaTrader Web, Schwab, TD, Fidelity, Robinhood, Webull, IBKR Web, E*TRADE, TradeStation, Tastyworks, Alpaca, Tradier + generic fallback) - Real-time lockdown overlay when account state is `RESTRICTED` or `LOCKED` - Visible state badge: `NORMAL` → `AT_RISK` → `RESTRICTED` → `LOCKED` ### Gemini Live Voice Council - Three-agent system (Signal / Execution / Coach) with bidirectional audio - 16 kHz PCM input → Gemini Live → 24 kHz PCM output - **Chart vision** — auto-captures broker screenshots and passes them to the Council - Pre-market briefing cards auto-render when a daily briefing doc exists ### Voice Intent Classification Claude-powered classifier with heuristic short-circuit. Eight discrete intents: `START_SESSION`, `END_SESSION`, `BRIEF_ME`, `TICKER_QUERY`, `NEWS_QUERY`, `CALENDAR_QUERY`, `WATCHLIST_ADD`, `FREEFORM` ### Trade Auto-Capture Per-broker DOM adapters (TradeLocker, TradingView, MT4/MT5, Schwab, TD, Fidelity, Robinhood, Webull, IBKR, E*TRADE, TradeStation, Tastyworks, Alpaca, Tradier + generic) detect executions via `MutationObserver` and fire `TRADE_DETECTED` events into Redline for auto-logging. ### Side Panel UI Multi-tab: **Council | Status | Trades | Settings**. Detachable to a floating window with remembered geometry. Quick-log modal, threaded chat with persistent memory, risk badge, account diagnostics. ### Feature Flags & Settings 11 togglable flags (voice, telemetry, AI inspector, memory, pattern learning, voice intents, proactive nudges, theme, etc.), custom Council instructions, memory inspection panel, dashboard sync. ### Telemetry PII-light event buffer, 200-event cap, 30 s flush, session-scoped, Firestore-persisted. --- ## Council Memory & Multi-Thread (v5.1) ### Persistent Trader Memory After every Council turn, `extractMemoryFacts` extracts durable facts about the trader (preferred setups, risk tolerance, weak hours, common leaks, asset preference, goals). Facts are stored in Firestore and re-injected into the system prompt of every future Council turn. Users typically accumulate **25+ facts in the first few sessions**. ### Similar Past Setups `findSimilarPastSetups` queries the trader's history for trades matching the current symbol + direction and injects win rate, P&L, and notable patterns into the Council prompt. Council answers reference your actual history, not hypothetical advice. ### Multi-Thread Sidebar - Sidebar of Council conversations (named threads, persistent across sessions) - `createCouncilThread`, `renameCouncilThread`, `archiveCouncilThread`, `deleteCouncilThread` Cloud Functions - Legacy single-history migration via `migrateCouncilHistoryToThreads` ### Council Consensus Pipeline (Phase A) `validateCouncilDecision` — server-side veto re-check before any Council recommendation reaches the trader. Persists the consensus result for audit. ### Streaming `claudeStream` SSE endpoint for token-by-token rendering in the extension and web app. --- ## Daily Pre-Market Briefing & Proactive Nudges ### Pattern Analyzer (Daily 02:00 ET) `analyzeUserPatterns` aggregates each trader's session telemetry, win rate by hour, common tilt windows, and revenge-trigger sequences. Writes a behavioral pattern profile that powers nudges and the briefing. ### Pre-Market Briefing (Daily 08:30 ET) `generatePremarketBriefing` builds a per-user briefing from: - Watchlist news (Benzinga, MarketAux, RSS, FMP, Polygon, NewsAPI) - Economic calendar events with impact ratings - Claude-generated haiku summary - Personalized lookback (yesterday's recap, current discipline score) Fans out via FCM push and appears in-app on the Today page. ### Proactive Nudges (Every 15 min, 07:00–10:30 ET) `runProactiveNudges` checks each active trader's pattern profile against the current time. Fires a one-shot nudge when the trader is within ±8 minutes of their personal pre-market lead window (e.g., *"Your best trading window opens in 12 minutes. Pre-market checklist ready?"*). --- ## News Intelligence (`/news`) Professional multi-asset news hub for stocks, options, futures, forex, crypto. ### Sources (parallel + deduped) Benzinga, MarketAux, FMP, NewsAPI, StockNews, Massive, Polygon, Schwab Movers, curated RSS (Federal Reserve, SEC EDGAR, Reuters, Bloomberg, Treasury, BLS, Investopedia) ### Features - **AI relevance scoring** — Claude rates each article 0–10 against the trader's watchlist and open positions - **Symbol AI modal** — ask Claude anything about a ticker with news + your trade history in context - **Sector heatmap** — visual sector performance with drill-down - **Multi-asset widget** — stocks / options / futures / forex / crypto tabs - **Sector flow visualization** — money rotation between sectors - **Schwab screener panel** — built-in screener with movers, gainers, losers - **Schwab options panel** — full chain with Greeks - **Economic calendar** — impact-rated, synced with sessions - **Top picks today** — AI-curated daily watchlist - **Relevance filter bar** — filter by High / Medium / Low relevance - **Breaking news banner** — sticky banner for high-impact events --- ## Achievements & Gamification ### Achievement System Badges with showcase: first trade, 10-win streak, zero-violation week, first-broker connection, first-session-completion, etc. Email notifications via `onAchievementUnlockedEmail`. Public profile showcase. ### Leaderboards Real-time rankings by P&L, win rate, Sharpe ratio. Weekly / monthly / all-time. Per-org leaderboards for Elite. ### XP / Level System Tied to consistent disciplined trading — XP for streaks, completed checklists, completed remediation, signal approvals. ### Missions Panel Daily and weekly mission system with reward unlocks. Example: *"Log 3 trades with stop loss this week."* ### Skill Tree Progressive skill unlocks gated by discipline + trading volume. Visual tree UI. ### Loot Boxes Earned for consistency streaks. Open via animated UI for virtual rewards, badge unlocks, theme variants. ### Mini-Games (Cooldown Mode) - **Trading Breakout** — playable during cooldown windows - **Trading Snake** — playable during cooldown windows ### Habit Tracker Daily streaks for trading prep, post-market review, journaling. --- ## Mentorship System (Elite) ### Mentor Dashboard - Mentee roster with key metrics: discipline score, recent violations, last session date - Read-only access to mentee analytics - Cross-mentee aggregation (average win rate, common violations) ### Mentor → Mentee Tools - **Assignments** — assign exercises, courses, journaling tasks - **Session Scheduler** — book live sessions - **Q&A System** — in-app threaded mentor-mentee Q&A - **Recordings** — upload session recordings - **Resources** — share files, links, playbooks - **Announcements** — broadcast to all mentees - **Progress Tracking** — visual progress vs goals ### Matching - **MentorMatchingQuiz** — questionnaire matches mentees to mentors by style / experience / asset class - **MentorshipAccessService** — gates mentor-only features --- ## Transactional Email Lifecycle (SendGrid + Resend) ### Lifecycle Emails (`functions/emailLifecycle.js`) - `onFirstTradeLogged` — congratulatory email - `onFirstViolationEmail` — first guardrail breach - `onFirstBrokerConnected` — broker link confirmation - `onSessionCompletedEmail` — post-session summary - `onAchievementUnlockedEmail` — badge milestone - `onAccountStateChanged` — `AT_RISK` / `LOCKED` / `RECOVERY` state change - `onTradeMilestone` — 10th, 100th, 1000th trade - `onSubscriptionWriteEmail` — tier upgrade / downgrade ### Drip Sequences (`functions/emailDrip.js`) - `onUserCreatedDrip` — initializes Day 1–30 drip cursor - `processDripQueue` — hourly fan-out (Day 1, 4, 7, 30 lifecycle emails) - `dripOptOut` — callable unsubscribe ### Campaign Sweeps (`functions/emailCampaigns.js`) - `trialAndRenewalSweep` — trial expiration + renewal reminders - `inactivitySweep` — re-engagement for inactive users - `cancelWinbackSweep` — cancellation win-back - `weeklyPrepBroadcast` — weekly Monday prep email ### Admin Campaign CMS `saveEmailTemplate`, `deleteEmailTemplate`, `listEmailTemplates`, `previewEmailSegment`, `sendCampaign`, `sendTestCampaign`, `processEmailTriggers` ### Other `sendBrandedPasswordReset`, `sendBrandedVerificationEmail`, `changeUserEmail`, `weeklyDigest` (Monday 9 AM discipline score email) --- ## Push Notifications (Firebase Cloud Messaging) - `onNotificationCreated` — Firestore trigger → FCM push (works when app closed / minimized) - `onViolationCreated` — guardrail breach → push - `onTradeCreatedNotify` — broker auto-import → push (single source of truth across tabs / devices) - Native APNs delivery on iOS via FCM - Web push via `firebase-messaging-sw.js` --- ## Authentication & Security ### Authentication - Email + password (Firebase Auth) - Google OAuth, Apple OAuth - `getUserEmailForSignIn`, `ensureUniqueGoogleProfile`, `deleteNoEmailAccounts` ### Two-Factor Authentication (TOTP) - `generateTOTPSetup` — QR code + secret - `verifyAndEnable2FA` — activate after verification - `disable2FA` — turn off - `verifyTOTPLogin` — login-time check ### Account Security - SHA-256 hashed API keys (never store raw) - Rate limiting per key + per endpoint (100 req / min default) - Audit logs (`logAdminAction`) for all admin operations - Firestore security rules enforce uid-scoped access - GDPR-compliant data wipe (`wipeAllTradeDataV2`, `completeProfileDeletion`) --- ## Payments ### Stripe (Web + Android) - `stripeCreateCheckoutSession`, `stripeCreatePaymentSheet`, `stripeCreatePortalSession` - `stripeWebhook` (state changes) - `stripeGetSubscriptionStatus`, `stripeCancelSubscription`, `stripeResumeSubscription`, `stripeChangeSubscription` - `stripeActivateFreeTier` ### RevenueCat (iOS In-App Purchase) - `rcActivateTier` — entitlement → tier mapping - `rcSyncCustomerInfo` — pull latest entitlement from RC - `rcWebhook` — event-driven tier sync ### Promo / Referral - `redeemPromoCode` — admin-managed promo codes - `claimReferral` — referral reward claim - `onSubscriptionWrite` — trigger referral bonus - `getReferralStats` — affiliate stats --- ## Organization / B2B Platform (Elite) ### Org Dashboard - Aggregate trader performance (win rate, P&L, discipline score by trader) - Real-time violation rollup across all members - Per-trader drill-down with read-only analytics - Compliance monitoring + enforcement override (with audit log) - PDF performance reports per trader ### White-Label - Custom org branding (logo, colors, name) - Custom domain support - Org-scoped landing page (`/org/:id`) ### Invitations - `createInviteToken`, `validateInviteToken`, `acceptInviteToken` - Token-based invitations with expiry - Per-seat pricing for Elite ### Audit - `logAdminAction` — every admin / mentor / operator action logged - `AuditLogViewer` page for compliance review ### Org Functions - `orgSaveBrokerCredentials` — org-wide broker server config - `deleteOrganization` — full cascade delete --- ## Education Hub Extensions ### Violation-Driven Curriculum Each violation type maps to a targeted remediation module. The *"Fix My Trading"* pinned card stays on top of the Education Hub until the assigned module is completed. Completion is the unlock condition for the next lockout tier. ### Official Courses CMS - `saveOfficialCourseDraft`, `submitCourseForReview`, `publishOfficialCourse`, `scheduleCoursePublish`, `archiveOfficialCourse`, `restoreCourseVersion` - `upsertInstructor` — instructor profile management - `issueCourseCertificate` — certificate on completion ### Live Classes - `submitClassRsvp` — registration + SendGrid confirmation - `sendClassReminders` — pre-class reminders - `getClassRsvps` — admin attendee list - Session 01 delivered live (10 attendees) - 6-session series planned - **Options Trading Blueprint** — 41-page book PDF ### AI Course Generator Generates personalized course modules from a trader's violation history + fingerprint. ### AI Tutor Chat In-course Q&A with Claude grounded in the course content + your trading data. ### TradingTube Video library with trade-based recommendations — after every trade, surfaces 1–3 relevant videos that address the setup, mistake, or psychology of the trade. --- ## OG Share, Branding, i18n ### `ogShare` Cloud Function Generates 1200×630 PNG social-share images on the fly. Example: `/ogShare?username=TigerTrader&score=87&streak=14&grade=A` Used for shareable session cards, achievement unlocks, leaderboard rank, milestone badges. ### Internationalization - i18next-driven translations - Languages: EN, ES, ZH, FR - Multi-language support from the **first onboarding screen** (selectable before account creation) --- ## Affiliates / Partnerships - **TradeLocker Affiliate** — 30% commission, founder partnership with Krešimir Lulić - **Trackdesk** — affiliate platform integration - **SnapTrade** — multi-broker integration partnership - **MetaAPI** — official cloud bridge partner --- ## Version & Release - Web: **v4.22.0** - iOS App: RedlineOS (App Store) - Chrome Extension: v4 (`redline-extension-v4.zip`) - MCP Server: `redline-mcp-server` 1.0.0 (npm + local install) - JS SDK: `redline-sdk-js` 0.1.0 - CLI: `redline-cli` 1.0.0 - Cloud Run TradeLocker Ingest: 1.0.0 --- ## Why Traders Subscribe — Outcomes That Compound Discipline is the only edge that compounds. Strategy edges decay as markets adapt. Information edges disappear as data democratizes. Behavioral edges *compound* — every clean session reinforces the next. Redline subscribers report: - **38% fewer rule violations** within the first 14 days on Pro - **2.3× higher trader pass rates** for prop firms running Elite org dashboards - **Sub-15% account blow-up rate** across all funded Pro+ traders vs the industry baseline of ~70% - **25+ persistent Council facts** learned per user in the first week — Council answers reference your actual history, not generic advice ### The Subscription Path | Step | What you do | Plan | |------|-------------|------| | 1 | [Sign up free](https://tradeintelx.com/signup) — no credit card | Free | | 2 | Connect 1 broker, log first 50 trades, see violation patterns | Free | | 3 | Unlock unlimited trades, AI Council, multi-broker sync, voice companion | **[Pro $39/mo](https://tradeintelx.com/pricing)** | | 4 | Add org dashboard, mentor mode, white-label, developer API | **[Elite $70/mo](https://tradeintelx.com/pricing)** | ### Money-Back & Cancellation - Cancel anytime from `Settings → Subscription` - 7-day refund window on first paid month - No long-term contracts - Free tier never expires --- ## Take Action - **[Start Free →](https://tradeintelx.com/signup)** — 50 trades / month, full enforcement engine, zero risk - **[Subscribe to Pro →](https://tradeintelx.com/pricing)** — $39/mo, unlimited trades, full AI Council, all brokers - **[Go Elite →](https://tradeintelx.com/pricing)** — $70/mo, org + mentor + white-label + API - **[Talk to founder →](mailto:support@tradeintelx.com?subject=Redline%20Demo)** — book a personal walk-through - **[Developer Docs →](https://tradeintelx.com/api-docs)** — REST, MCP, SDK, CLI for bot builders *Discipline is not a personality trait. It's a system.*