File size: 26,693 Bytes
318e296 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>grid_trader | High-Frequency Trading Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary: #ff7b25;
--primary-dark: #ff5e00;
--primary-light: #ff9e58;
--dark: #0a0a0a;
--darker: #050505;
--glass: rgba(15, 15, 15, 0.5);
}
body {
font-family: 'Fira Code', monospace;
background-color: var(--darker);
color: white;
overflow-x: hidden;
}
.glass-panel {
background: var(--glass);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 123, 37, 0.1);
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
border-radius: 12px;
transition: all 0.3s ease;
}
.glass-panel:hover {
border-color: rgba(255, 123, 37, 0.3);
box-shadow: 0 8px 32px 0 rgba(255, 123, 37, 0.2);
}
.skew-right {
transform: perspective(1000px) rotateY(-5deg);
}
.skew-left {
transform: perspective(1000px) rotateY(5deg);
}
.glow-text {
text-shadow: 0 0 8px rgba(255, 123, 37, 0.7);
}
.glow-box {
box-shadow: 0 0 15px rgba(255, 123, 37, 0.4);
}
.holographic-ticker {
background: linear-gradient(135deg,
rgba(255, 123, 37, 0.1) 0%,
rgba(255, 123, 37, 0.3) 50%,
rgba(255, 123, 37, 0.1) 100%);
animation: holographic 8s infinite linear;
}
@keyframes holographic {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.price-line {
stroke: var(--primary);
stroke-width: 2;
stroke-dasharray: 5, 5;
}
.grid-line {
stroke: rgba(255, 255, 255, 0.05);
stroke-width: 1;
}
.fib-level {
stroke: var(--primary-light);
stroke-width: 1;
stroke-dasharray: 3, 3;
}
.hover-grow {
transition: transform 0.2s ease;
}
.hover-grow:hover {
transform: scale(1.03);
}
.pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
</style>
</head>
<body class="min-h-screen p-4 md:p-8">
<div class="max-w-7xl mx-auto space-y-6">
<!-- Header -->
<header class="flex justify-between items-center">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 rounded-full bg-gradient-to-br from-orange-500 to-orange-700 flex items-center justify-center glow-box">
<i class="fas fa-robot text-white"></i>
</div>
<h1 class="text-2xl font-bold glow-text">grid_trader</h1>
</div>
<div class="flex items-center space-x-4">
<div class="holographic-ticker px-4 py-2 rounded-full flex items-center space-x-2">
<span class="text-sm font-medium">GATE.IO</span>
<span class="text-orange-400 font-bold">BTC/USDT</span>
<span class="text-xs bg-orange-900 bg-opacity-50 px-2 py-1 rounded">LIVE</span>
</div>
<button class="glass-panel px-4 py-2 flex items-center space-x-2 hover-grow">
<i class="fas fa-cog text-orange-400"></i>
<span>Settings</span>
</button>
</div>
</header>
<!-- Main Dashboard Grid -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Left Column -->
<div class="space-y-6">
<!-- Balance Panel -->
<div class="glass-panel p-6 skew-right">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-orange-300">Wallet Balances</h2>
<div class="flex space-x-2">
<span class="text-xs bg-orange-900 bg-opacity-30 px-2 py-1 rounded">Spot</span>
<span class="text-xs bg-gray-800 px-2 py-1 rounded">Futures</span>
</div>
</div>
<div class="space-y-4">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<div class="w-8 h-8 rounded-full bg-orange-900 bg-opacity-30 flex items-center justify-center">
<i class="fab fa-bitcoin text-orange-400"></i>
</div>
<span>BTC</span>
</div>
<span class="font-mono">0.0425</span>
</div>
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<div class="w-8 h-8 rounded-full bg-orange-900 bg-opacity-30 flex items-center justify-center">
<i class="fas fa-dollar-sign text-orange-400"></i>
</div>
<span>USDT</span>
</div>
<span class="font-mono">1,245.36</span>
</div>
<div class="pt-4 border-t border-gray-800">
<div class="flex justify-between text-sm">
<span class="text-gray-400">Total Value</span>
<span class="font-mono text-orange-300">$2,856.42</span>
</div>
</div>
</div>
</div>
<!-- Performance KPIs -->
<div class="glass-panel p-6 skew-right">
<h2 class="text-lg font-semibold text-orange-300 mb-4">Performance Metrics</h2>
<div class="grid grid-cols-2 gap-4">
<div class="space-y-1">
<span class="text-xs text-gray-400">Today's PnL</span>
<div class="flex items-end space-x-1">
<span class="text-xl font-mono text-green-400">+$124.52</span>
<span class="text-sm text-green-400">(2.4%)</span>
</div>
</div>
<div class="space-y-1">
<span class="text-xs text-gray-400">Win Rate</span>
<div class="flex items-end space-x-1">
<span class="text-xl font-mono text-orange-300">78%</span>
<span class="text-xs text-gray-400">42/54</span>
</div>
</div>
<div class="space-y-1">
<span class="text-xs text-gray-400">Avg. Spread</span>
<div class="flex items-end space-x-1">
<span class="text-xl font-mono">0.12%</span>
</div>
</div>
<div class="space-y-1">
<span class="text-xs text-gray-400">Volatility</span>
<div class="flex items-end space-x-1">
<span class="text-xl font-mono text-orange-300">High</span>
</div>
</div>
</div>
</div>
</div>
<!-- Center Column -->
<div class="space-y-6">
<!-- Price Chart -->
<div class="glass-panel p-6">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-orange-300">BTC/USDT</h2>
<div class="flex space-x-2">
<button class="text-xs bg-orange-900 bg-opacity-30 px-2 py-1 rounded hover-grow">1H</button>
<button class="text-xs bg-gray-800 px-2 py-1 rounded hover-grow">4H</button>
<button class="text-xs bg-gray-800 px-2 py-1 rounded hover-grow">1D</button>
</div>
</div>
<div class="h-64 relative">
<!-- This would be replaced with a real chart library in production -->
<svg width="100%" height="100%" viewBox="0 0 300 200" preserveAspectRatio="none">
<!-- Grid lines -->
<line class="grid-line" x1="0" y1="40" x2="300" y2="40" />
<line class="grid-line" x1="0" y1="80" x2="300" y2="80" />
<line class="grid-line" x1="0" y1="120" x2="300" y2="120" />
<line class="grid-line" x1="0" y1="160" x2="300" y2="160" />
<!-- Fibonacci levels -->
<line class="fib-level" x1="0" y1="30" x2="300" y2="30" />
<line class="fib-level" x1="0" y1="70" x2="300" y2="70" />
<line class="fib-level" x1="0" y1="110" x2="300" y2="110" />
<line class="fib-level" x1="0" y1="150" x2="300" y2="150" />
<!-- Price line -->
<path class="price-line" d="M0,160 C50,140 100,180 150,120 C200,60 250,100 300,80" fill="none" />
<!-- Current price indicator -->
<circle cx="300" cy="80" r="4" fill="var(--primary)" />
<text x="285" y="70" fill="var(--primary)" font-size="10">$42,356</text>
</svg>
<div class="absolute bottom-0 left-0 right-0 flex justify-between text-xs text-gray-400">
<span>10:00</span>
<span>12:00</span>
<span>14:00</span>
<span>16:00</span>
<span>18:00</span>
</div>
</div>
<div class="mt-4 grid grid-cols-3 gap-2 text-center text-sm">
<div>
<span class="text-gray-400">Open</span>
<div class="font-mono">$42,120</div>
</div>
<div>
<span class="text-gray-400">High</span>
<div class="font-mono text-green-400">$42,890</div>
</div>
<div>
<span class="text-gray-400">Low</span>
<div class="font-mono text-red-400">$41,950</div>
</div>
</div>
</div>
<!-- AI Strategy Explanation -->
<div class="glass-panel p-6">
<div class="flex items-center space-x-2 mb-3">
<div class="w-8 h-8 rounded-full bg-gradient-to-br from-orange-500 to-orange-700 flex items-center justify-center">
<i class="fas fa-brain text-white"></i>
</div>
<h2 class="text-lg font-semibold text-orange-300">AI Strategy Insight</h2>
</div>
<div class="text-sm text-gray-300 leading-relaxed">
<p class="mb-2">Current BTC/USDT pair shows optimal conditions for grid trading with:</p>
<ul class="list-disc pl-5 space-y-1">
<li>High liquidity (top 5% of pairs)</li>
<li>Volatility index of 2.8 (ideal range 2.5-3.5)</li>
<li>Mean reversion pattern detected in last 4 hours</li>
<li>Fibonacci levels providing strong support at $41,800</li>
</ul>
<p class="mt-3">Recommended grid parameters: 25 levels, ±3.2% range, 0.18% take-profit.</p>
</div>
</div>
</div>
<!-- Right Column -->
<div class="space-y-6">
<!-- Open Positions -->
<div class="glass-panel p-6 skew-left">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-orange-300">Active Positions</h2>
<span class="text-xs bg-orange-900 bg-opacity-30 px-2 py-1 rounded">3 Open</span>
</div>
<div class="space-y-4">
<div class="hover-grow">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<span class="font-mono text-sm">BTC/USDT</span>
<span class="text-xs bg-green-900 bg-opacity-30 px-1 rounded">LONG</span>
</div>
<span class="text-sm font-mono text-green-400">+1.2%</span>
</div>
<div class="flex justify-between text-xs text-gray-400 mt-1">
<span>Entry: $42,120</span>
<span>Size: 0.02 BTC</span>
</div>
</div>
<div class="hover-grow">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<span class="font-mono text-sm">ETH/USDT</span>
<span class="text-xs bg-red-900 bg-opacity-30 px-1 rounded">SHORT</span>
</div>
<span class="text-sm font-mono text-red-400">-0.8%</span>
</div>
<div class="flex justify-between text-xs text-gray-400 mt-1">
<span>Entry: $2,240</span>
<span>Size: 0.5 ETH</span>
</div>
</div>
<div class="hover-grow">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<span class="font-mono text-sm">SOL/USDT</span>
<span class="text-xs bg-green-900 bg-opacity-30 px-1 rounded">LONG</span>
</div>
<span class="text-sm font-mono text-green-400">+3.4%</span>
</div>
<div class="flex justify-between text-xs text-gray-400 mt-1">
<span>Entry: $98.50</span>
<span>Size: 10 SOL</span>
</div>
</div>
</div>
<button class="w-full mt-4 py-2 bg-gradient-to-r from-orange-700 to-orange-500 rounded-lg text-sm font-medium hover-grow">
View All Positions
</button>
</div>
<!-- Trading Activity -->
<div class="glass-panel p-6 skew-left">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold text-orange-300">Recent Activity</h2>
<i class="fas fa-sync-alt text-orange-400 text-sm cursor-pointer hover-grow"></i>
</div>
<div class="space-y-3 text-sm">
<div class="flex items-start space-x-2">
<div class="w-6 h-6 rounded-full bg-orange-900 bg-opacity-30 flex items-center justify-center mt-0.5">
<i class="fas fa-arrow-up text-green-400 text-xs"></i>
</div>
<div>
<div class="flex justify-between">
<span>BTC buy executed</span>
<span class="font-mono text-green-400">+0.023 BTC</span>
</div>
<div class="text-xs text-gray-400">42,120.50 USDT • 2 mins ago</div>
</div>
</div>
<div class="flex items-start space-x-2">
<div class="w-6 h-6 rounded-full bg-orange-900 bg-opacity-30 flex items-center justify-center mt-0.5">
<i class="fas fa-arrow-down text-red-400 text-xs"></i>
</div>
<div>
<div class="flex justify-between">
<span>ETH sell executed</span>
<span class="font-mono text-red-400">-0.42 ETH</span>
</div>
<div class="text-xs text-gray-400">2,245.30 USDT • 15 mins ago</div>
</div>
</div>
<div class="flex items-start space-x-2">
<div class="w-6 h-6 rounded-full bg-orange-900 bg-opacity-30 flex items-center justify-center mt-0.5">
<i class="fas fa-bolt text-orange-400 text-xs"></i>
</div>
<div>
<div class="flex justify-between">
<span>Grid parameters adjusted</span>
</div>
<div class="text-xs text-gray-400">Increased TP to 0.2% • 28 mins ago</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bottom Controls -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<!-- Bot Controls -->
<div class="glass-panel p-6">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-semibold text-orange-300">Bot Controls</h2>
<div class="flex items-center space-x-2">
<span class="text-xs bg-green-900 bg-opacity-30 px-2 py-1 rounded flex items-center">
<span class="w-2 h-2 rounded-full bg-green-400 mr-1 pulse"></span>
ACTIVE
</span>
</div>
</div>
<div class="grid grid-cols-2 gap-4">
<button class="glass-panel py-3 px-4 flex flex-col items-center hover-grow">
<i class="fas fa-pause text-orange-400 mb-1"></i>
<span class="text-xs">Pause</span>
</button>
<button class="glass-panel py-3 px-4 flex flex-col items-center hover-grow">
<i class="fas fa-sync-alt text-orange-400 mb-1"></i>
<span class="text-xs">Reset Grid</span>
</button>
<button class="glass-panel py-3 px-4 flex flex-col items-center hover-grow">
<i class="fas fa-chart-line text-orange-400 mb-1"></i>
<span class="text-xs">Optimize</span>
</button>
<button class="glass-panel py-3 px-4 flex flex-col items-center hover-grow">
<i class="fas fa-history text-orange-400 mb-1"></i>
<span class="text-xs">Backtest</span>
</button>
</div>
</div>
<!-- Symbol Selector -->
<div class="glass-panel p-6">
<h2 class="text-lg font-semibold text-orange-300 mb-4">Symbol Selection</h2>
<div class="relative">
<input type="text" placeholder="Search trading pairs..." class="w-full bg-gray-900 bg-opacity-30 border border-gray-800 rounded-lg px-4 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-orange-500">
<i class="fas fa-search absolute right-3 top-2.5 text-gray-500"></i>
</div>
<div class="mt-4 grid grid-cols-3 gap-2">
<button class="py-1.5 px-2 bg-orange-900 bg-opacity-30 rounded text-xs hover-grow">BTC/USDT</button>
<button class="py-1.5 px-2 bg-gray-800 rounded text-xs hover-grow">ETH/USDT</button>
<button class="py-1.5 px-2 bg-gray-800 rounded text-xs hover-grow">SOL/USDT</button>
<button class="py-1.5 px-2 bg-gray-800 rounded text-xs hover-grow">ADA/USDT</button>
<button class="py-1.5 px-2 bg-gray-800 rounded text-xs hover-grow">DOT/USDT</button>
<button class="py-1.5 px-2 bg-gray-800 rounded text-xs hover-grow">AVAX/USDT</button>
</div>
</div>
<!-- Risk Management -->
<div class="glass-panel p-6">
<h2 class="text-lg font-semibold text-orange-300 mb-4">Risk Management</h2>
<div class="space-y-4">
<div>
<div class="flex justify-between text-sm mb-1">
<span>Max Drawdown</span>
<span>5%</span>
</div>
<div class="w-full bg-gray-800 rounded-full h-1.5">
<div class="bg-orange-500 h-1.5 rounded-full" style="width: 30%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Daily Loss Limit</span>
<span>15%</span>
</div>
<div class="w-full bg-gray-800 rounded-full h-1.5">
<div class="bg-orange-500 h-1.5 rounded-full" style="width: 10%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Position Size</span>
<span>2.5%</span>
</div>
<div class="w-full bg-gray-800 rounded-full h-1.5">
<div class="bg-orange-500 h-1.5 rounded-full" style="width: 25%"></div>
</div>
</div>
<button class="w-full mt-2 py-2 bg-gradient-to-r from-orange-700 to-orange-500 rounded-lg text-sm font-medium hover-grow">
Adjust Risk Parameters
</button>
</div>
</div>
</div>
</div>
<script>
// Simple animations and interactions
document.querySelectorAll('.hover-grow').forEach(el => {
el.addEventListener('mouseenter', () => {
el.classList.add('transform', 'scale-105');
});
el.addEventListener('mouseleave', () => {
el.classList.remove('transform', 'scale-105');
});
});
// Simulate live data updates
function updateLiveData() {
const elements = [
{ selector: '.holographic-ticker span:nth-child(2)', values: ['BTC/USDT', 'ETH/USDT', 'SOL/USDT'] },
{ selector: '.font-mono.text-green-400', values: ['+$124.52', '+$128.75', '+$131.20', '+$119.85'] },
{ selector: '.text-xl.font-mono.text-orange-300', values: ['78%', '79%', '80%', '77%'] }
];
elements.forEach(el => {
const element = document.querySelector(el.selector);
if (element) {
const randomValue = el.values[Math.floor(Math.random() * el.values.length)];
element.textContent = randomValue;
}
});
setTimeout(updateLiveData, 5000);
}
// Start live updates
setTimeout(updateLiveData, 5000);
</script>
</body>
</html> |