ALPHX Terminal is an institutional-grade cryptocurrency web terminal built with Next.js 14 App Router, TypeScript, Tailwind CSS, and Zustand. Designed for professional traders and quantitative researchers, it pairs with the ALPHX Quantitative Backend to visualize real-time candlestick charts with custom technical overlays (Support/Resistance, Fair Value Gaps, ATR levels), display multi-model consensus signals, manage dual-currency capital (USD $ & INR βΉ), and execute orders seamlessly across Manual, Semi-Automatic, and Autonomous Sentinel modes.
- Interface & Layout Architecture
- Core Feature Breakdown
- Dual-Currency (USD $ & INR βΉ) Precision System
- Execution Workflow Modes
- Telegram Signal Broadcaster & Channel Linking
- Interactive TradingView Chart Canvas & Overlays
- Project Structure
- Installation & Development Guide
- Production Deployment
- Environment Variables
- License
The terminal is engineered as a responsive, high-density 3-column workspace with persistent top and bottom telemetry docks:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TOPBAR: Brand Logo β Active Ticker ($ & βΉ) β Trading Mode (Futures/Margin/Spot) β Balance Pill ($/βΉ) β Controls β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ€
β LEFT: MARKET β CENTER: INTERACTIVE TRADINGVIEW CHART β RIGHT: QUANTITATIVE HUB β
β SCREENER β β’ High-performance Candlestick Canvas β β’ Quantitative Verdict Card β
β β’ Search & Filter β β’ Dynamic Overlays: S&R, FVG, ATR Target Bands β (Consensus, Confidence %) β
β β’ USDT / INR / BTC β β’ Timeframe Switcher (1m, 5m, 15m, 1h, 4h, 1d) β β’ Model Vote Telemetry β
β β’ 24h Price & Volume β β’ Auto-Zoom / Fit Candle View β β’ Execution Center β
β β’ Favorites Tracking ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ (Leverage, Dual Currency) β
β β CHART BOTTOM ACTION BAR: Live Price β Quick Buy/Sell β TG β β’ Factor Reasoning Accordion β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β’ Live Telemetry Matrix β
β β BOTTOM DOCK: Active Positions Table β Spot & Margin Balancesβ (RSI, ADX, ATR, MACD, BB) β
ββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ
1. Market Screener (MarketScreener.tsx)
- Multi-Quote Currency Filtering: Switch effortlessly between
ALL,USDT,INR, andBTCdenominated pairs. - Instant Dynamic Switching: Selecting any market immediately repopulates the central chart, resets WebSocket feeds, updates order book depth, and synchronizes signal models.
- Smart Search: Filter pairs by base or quote symbol with debounced indexing.
2. Interactive Chart Canvas (TradingViewChart.tsx)
- Engineered on Lightweight Charts v4: Capable of streaming 60fps tick updates with zero browser thread lag.
- Algorithmic Canvas Overlays:
- Support & Resistance (S&R): Clusters price pivot levels with color-coded horizontal boundary bands.
- Fair Value Gaps (FVG): Visualizes 3-candle institutional liquidity imbalances with transparent bounding boxes.
- ATR Dynamic Setup: Overlays entry lines, dynamic stop losses, and multi-tier take profit targets directly onto the canvas.
- Auto-Fit View: Re-scales and fits historical candle geometry instantly upon asset selection.
3. Chart Bottom Action Bar (ChartActionBar.tsx)
- Persistent command strip directly under the candlestick canvas.
- Displays clean market pair name, live Dollar price, and INR equivalent side by side.
-
1-Click Quick Execution:
-
[ π BUY / LONG ]: Executes a long order sized to$2%$ portfolio risk. -
[ π» SELL / SHORT ]: Executes a short order sized to$2%$ portfolio risk.
-
- Telegram Broadcast Trigger: 1-click dispatch to your linked Telegram channel.
4. Quantitative Signal & Model Consensus (SignalCard.tsx)
- Displays consensus direction (
STRONG BUY,STRONG SELL,HOLD / NEUTRAL). - Consensus Tag: Displays model agreement level (
UNANIMOUS (3/3),MAJORITY (2/3), orSPLIT). - Telemetry Breakdown: Displays individual voting probabilities across technical and statistical engines.
- Dynamic Setup Levels: Shows exact ATR calculated Entry, Stop Loss, and Take Profit 1 with dual-currency values.
5. Execution Center (TradePanel.tsx)
-
Leverage Slider: Supports variable leverage from
$1\times$ to$25\times$ . -
Dual-Currency Sizing Input: Toggle between
$ USDandβΉ INRinputs with real-time cross-currency conversions. - Auto-Risk Calculation: Automatically sizes quantities based on account equity and stop loss distance to enforce strict capital preservation.
6. Positions & Balances Dock (BottomDrawer.tsx)
- Collapsible bottom drawer displaying active positions with real-time Mark Price, Liquidation Price, and Unrealized PnL in both USD and INR (
+$16.00 (+βΉ1,599)). - 1-Click Position Exit with exchange synchronization.
- Balances tab displaying total and available funds with native currency symbols (
βΉfor INR,$for USDT).
To provide frictionless experience for Indian and global traders, all components display dual currencies side by side:
| Component | USD Display | INR Equivalent Display |
|---|---|---|
| Topbar Balance | $TotalUsd |
(βΉTotalInr) |
| Market Tickers | $Price |
(βΉPriceInr) |
| Trade Setup Levels |
$Entry, $SL, $TP1
|
(βΉEntry), (βΉSL), (βΉTP1)
|
| Trade Execution | $ Custom USD Amount |
βΉ Custom INR Amount |
| Unrealized PnL | +$PnL_USD |
(+βΉPnL_INR) |
| Asset Balances | $ Amount (USDT) |
βΉ Amount (INR) |
The live conversion rate is synchronized dynamically from the backend currency provider (with
The terminal supports 3 execution philosophies configured via terminalStore.ts:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EXECUTION ENGINE SELECTOR β
βββββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββ€
β 1. MANUAL β 2. SEMI-AUTO β 3. AUTO β
β Trader controls β 15s High-Priorityβ Sentinel Loop β
β every execution β Approval Modal β Hands-off Auto β
βββββββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββ
-
Manual Mode:
- Trader inspects quantitative reasoning and executes manually via the Execution Center or Chart Bottom Bar.
-
Semi-Automatic Mode:
- When the backend emits a directional signal with confidence
$\ge 70%$ , a high-priority 15-Second Confirmation Modal (SemiAutoModal.tsx) appears with an auditory chime. - Trader can click Approve & Execute or let it expire safely.
- When the backend emits a directional signal with confidence
-
Autonomous Mode (Sentinel Auto-Trade):
- Background hook (useAutoTrade.ts) automatically places verified orders on CoinDCX/Paper trading when high-confidence signals trigger, with built-in deduplication against double execution.
The terminal integrates with @alphx_signal_bot for instant signal distribution:
- Open your Telegram Channel or Group.
- Navigate to Channel Settings
$\rightarrow$ Administrators$\rightarrow$ Add Administrator. - Search for
@alphx_signal_botand grant permission to Post Messages. - In your channel, send any test message (e.g.
test), or send/startto@alphx_signal_botin a private chat. - In the ALPHX Terminal Topbar, click Telegram (or the gear icon in the Chart Bottom Bar).
- Click β‘ Auto-Detect Chat ID β the bot will discover your channel and auto-fill the Chat ID.
- Click Send Test Ping to verify message delivery.
- Enable Auto-Broadcast if you want high-confidence signals pushed automatically!
AI_singal/
βββ src/
β βββ app/
β β βββ layout.tsx # Root layout & font configurations
β β βββ page.tsx # Main 3-column trading terminal canvas
β β βββ globals.css # Tailwind & custom terminal styling rules
β βββ components/
β β βββ chart/
β β β βββ TradingViewChart.tsx # Lightweight Charts canvas & overlay drawing
β β β βββ ChartActionBar.tsx # Persistent chart bottom execution bar
β β βββ execution/
β β β βββ TradePanel.tsx # Execution Center & dual-currency risk controls
β β β βββ SemiAutoModal.tsx # 15s high-priority trade approval modal
β β βββ layout/
β β β βββ Topbar.tsx # Global header, balance pill, mode switcher
β β β βββ ExchangeModal.tsx # CoinDCX API connection modal
β β βββ positions/
β β β βββ BottomDrawer.tsx # Active positions & balances docking drawer
β β βββ screener/
β β β βββ MarketScreener.tsx # Searchable asset screener with quote tabs
β β βββ signal/
β β β βββ SignalCard.tsx # Quantitative verdict & model consensus gauge
β β β βββ ReasoningAccordion.tsx # Expandable technical factor breakdown
β β β βββ IndicatorMatrix.tsx # 6-indicator live technical telemetry grid
β β βββ telegram/
β β β βββ TelegramModal.tsx # Telegram bot configuration & chat discovery
β β βββ ui/
β β β βββ AlphxLogo.tsx # Terminal vector branding badge
β β βββ webhook/
β β βββ WebhookModal.tsx # Inbound TradingView webhook automation
β βββ hooks/
β β βββ useAutoTrade.ts # Automated trade execution listener
β β βββ useWebSocket.ts # Real-time CoinDCX ticker & candle feed hook
β βββ services/
β β βββ api.ts # Typed Axios client & backend REST client
β βββ store/
β β βββ exchangeStore.ts # Balances, positions, & connection state
β β βββ telegramStore.ts # Channel ID & auto-broadcast settings
β β βββ terminalStore.ts # Active pair, timeframe, analysis, & mode
β βββ types/
β βββ index.ts # Complete TypeScript interfaces & schemas
βββ public/ # Static assets
βββ .env.example # Environment variable template
βββ next.config.js # Next.js build configuration
βββ package.json # Node.js dependencies & scripts
βββ tailwind.config.ts # Custom institutional color theme
βββ tsconfig.json # TypeScript compiler options
βββ README.md
- Node.js 18.17+ or Node.js 20+
- npm (or pnpm / yarn)
- Backend service running on http://localhost:8000
git clone https://github.com/your-username/AI_singal.git
cd AI_singalnpm installCopy the template into a .env.local file:
cp .env.example .env.localVerify your .env.local settings:
NEXT_PUBLIC_API_URL=http://localhost:8000/api
NEXT_PUBLIC_WS_URL=ws://localhost:8000/api/ws
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000
NEXT_PUBLIC_DEFAULT_PAIR=B-BTC_USDT
NEXT_PUBLIC_DEFAULT_TIMEFRAME=15mnpm run devOpen http://localhost:3000 in your browser to view the terminal.
Run TypeScript validation and optimized Next.js build:
npx tsc --noEmit
npm run buildnpm run start- Import the repository on Vercel.
- Configure Environment Variables (
NEXT_PUBLIC_API_URL,NEXT_PUBLIC_WS_URL). - Deploy with standard Next.js preset.
This project is licensed under the MIT License β see the LICENSE file for details.