Melhorar a rede neural, criar gráfico de linha da moeda treinada. Salve os dados de candle no space. Além disso tente usar API : import requests import pandas as pd from datetime import datetime def get_historical_data(coin_id="bitcoin", vs_currency="usd", days=1): url = f"https://api.coingecko.com/api/v3/coins/{coin_id}/market_chart" params = { "vs_currency": vs_currency, "days": days, "interval": "minutely" } response = requests.get(url, params=params) data = response.json() prices = data.get("prices", []) # Converter para DataFrame df = pd.DataFrame(prices, columns=["timestamp", "price"]) df["timestamp"] = pd.to_datetime(df["timestamp"], unit='ms') # Agregar em candles de 15 minutos df.set_index("timestamp", inplace=True) ohlc = df["price"].resample("15T").ohlc() volume = pd.DataFrame(data.get("total_volumes", []), columns=["timestamp", "volume"]) volume["timestamp"] = pd.to_datetime(volume["timestamp"], unit='ms') volume.set_index("timestamp", inplace=True) volume_15min = volume["volume"].resample("15T").sum() ohlc["volume"] = volume_15min ohlc.dropna(inplace=True) return ohlc if __name__ == "__main__": df_15min = get_historical_data() print(df_15min) - Follow Up Deployment
Browse files- index.html +166 -71
index.html
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
@@ -7,7 +8,8 @@
|
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 9 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 10 |
-
<script src="https://cdn.jsdelivr.net/npm/chartjs-chart-financial@3.0.1/dist/chartjs-chart-financial.min.js">
|
|
|
|
| 11 |
<style>
|
| 12 |
:root {
|
| 13 |
--bg-primary: #0a0a0a;
|
|
@@ -78,8 +80,17 @@
|
|
| 78 |
}
|
| 79 |
|
| 80 |
@keyframes pulse {
|
| 81 |
-
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
}
|
| 84 |
|
| 85 |
.data-stream {
|
|
@@ -91,9 +102,19 @@
|
|
| 91 |
}
|
| 92 |
|
| 93 |
@keyframes stream {
|
| 94 |
-
0% {
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
| 98 |
|
| 99 |
.trade-marker {
|
|
@@ -101,8 +122,15 @@
|
|
| 101 |
}
|
| 102 |
|
| 103 |
@keyframes bounce {
|
| 104 |
-
|
| 105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
}
|
| 107 |
|
| 108 |
.ticker-wrap {
|
|
@@ -120,8 +148,13 @@
|
|
| 120 |
}
|
| 121 |
|
| 122 |
@keyframes ticker {
|
| 123 |
-
0% {
|
| 124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
}
|
| 126 |
|
| 127 |
.btn-primary {
|
|
@@ -198,9 +231,17 @@
|
|
| 198 |
}
|
| 199 |
|
| 200 |
@keyframes pulse-status {
|
| 201 |
-
0% {
|
| 202 |
-
|
| 203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
}
|
| 205 |
|
| 206 |
.floating-element {
|
|
@@ -208,11 +249,19 @@
|
|
| 208 |
}
|
| 209 |
|
| 210 |
@keyframes float {
|
| 211 |
-
|
| 212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
}
|
| 214 |
</style>
|
| 215 |
</head>
|
|
|
|
| 216 |
<body class="bg-black text-white">
|
| 217 |
<!-- Header -->
|
| 218 |
<header class="border-b border-gray-800 p-6">
|
|
@@ -244,34 +293,34 @@
|
|
| 244 |
<div class="inline-flex space-x-12 px-6">
|
| 245 |
<span class="flex items-center space-x-2">
|
| 246 |
<span class="crypto-symbol bg-orange-500">₿</span>
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
</span>
|
| 251 |
<span class="flex items-center space-x-2">
|
| 252 |
<span class="crypto-symbol bg-blue-500">Ξ</span>
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
</span>
|
| 257 |
<span class="flex items-center space-x-2">
|
| 258 |
<span class="crypto-symbol bg-green-400">◎</span>
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
</span>
|
| 263 |
<span class="flex items-center space-x-2">
|
| 264 |
<span class="crypto-symbol bg-blue-600">₳</span>
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
</span>
|
| 269 |
<!-- Repeat for infinite scroll -->
|
| 270 |
<span class="flex items-center space-x-2">
|
| 271 |
<span class="crypto-symbol bg-orange-500">₿</span>
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
</span>
|
| 276 |
</div>
|
| 277 |
</div>
|
|
@@ -306,7 +355,7 @@
|
|
| 306 |
<!-- Controls -->
|
| 307 |
<div class="glass-card p-6">
|
| 308 |
<h3 class="text-lg font-semibold mb-4 text-cyan-400">Trading Controls</h3>
|
| 309 |
-
|
| 310 |
<div class="space-y-4">
|
| 311 |
<div>
|
| 312 |
<label class="text-sm text-gray-400 block mb-2">Training Pair</label>
|
|
@@ -316,7 +365,7 @@
|
|
| 316 |
<option>SOL/USDT</option>
|
| 317 |
</select>
|
| 318 |
</div>
|
| 319 |
-
|
| 320 |
<div>
|
| 321 |
<label class="text-sm text-gray-400 block mb-2">Validation Pair</label>
|
| 322 |
<select class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 text-white">
|
|
@@ -325,7 +374,7 @@
|
|
| 325 |
<option>SOL/USDT</option>
|
| 326 |
</select>
|
| 327 |
</div>
|
| 328 |
-
|
| 329 |
<div>
|
| 330 |
<label class="text-sm text-gray-400 block mb-2">Leverage</label>
|
| 331 |
<select class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 text-white">
|
|
@@ -335,7 +384,7 @@
|
|
| 335 |
<option>100x</option>
|
| 336 |
</select>
|
| 337 |
</div>
|
| 338 |
-
|
| 339 |
<div class="grid grid-cols-2 gap-3">
|
| 340 |
<button class="btn-primary">
|
| 341 |
<i class="fas fa-play mr-2"></i>Start
|
|
@@ -344,7 +393,7 @@
|
|
| 344 |
<i class="fas fa-stop mr-2"></i>Stop
|
| 345 |
</button>
|
| 346 |
</div>
|
| 347 |
-
|
| 348 |
<button class="w-full btn-secondary">
|
| 349 |
<i class="fas fa-cogs mr-2"></i>Optimize Neural Network
|
| 350 |
</button>
|
|
@@ -358,22 +407,22 @@
|
|
| 358 |
<div class="neuron" style="left: 10%; top: 20%"></div>
|
| 359 |
<div class="neuron" style="left: 10%; top: 50%"></div>
|
| 360 |
<div class="neuron" style="left: 10%; top: 80%"></div>
|
| 361 |
-
|
| 362 |
<div class="neuron" style="left: 30%; top: 15%"></div>
|
| 363 |
<div class="neuron" style="left: 30%; top: 35%"></div>
|
| 364 |
<div class="neuron" style="left: 30%; top: 55%"></div>
|
| 365 |
<div class="neuron" style="left: 30%; top: 75%"></div>
|
| 366 |
-
|
| 367 |
<div class="neuron" style="left: 50%; top: 20%"></div>
|
| 368 |
<div class="neuron" style="left: 50%; top: 40%"></div>
|
| 369 |
<div class="neuron" style="left: 50%; top: 60%"></div>
|
| 370 |
<div class="neuron" style="left: 50%; top: 80%"></div>
|
| 371 |
-
|
| 372 |
<div class="neuron" style="left: 70%; top: 25%"></div>
|
| 373 |
<div class="neuron" style="left: 70%; top: 75%"></div>
|
| 374 |
-
|
| 375 |
<div class="neuron" style="left: 90%; top: 50%"></div>
|
| 376 |
-
|
| 377 |
<div class="data-stream" style="left: 15%; animation-delay: 0s"></div>
|
| 378 |
<div class="data-stream" style="left: 35%; animation-delay: 1s"></div>
|
| 379 |
<div class="data-stream" style="left: 55%; animation-delay: 2s"></div>
|
|
@@ -387,7 +436,7 @@
|
|
| 387 |
<!-- Candlestick Chart -->
|
| 388 |
<div class="glass-card p-6">
|
| 389 |
<div class="flex justify-between items-center mb-4">
|
| 390 |
-
<h3 class="text-lg font-semibold text-cyan-400">BTC/USDT
|
| 391 |
<div class="flex space-x-1">
|
| 392 |
<button class="text-xs px-2 py-1 bg-gray-800 rounded">1m</button>
|
| 393 |
<button class="text-xs px-2 py-1 bg-gray-800 rounded">5m</button>
|
|
@@ -401,15 +450,23 @@
|
|
| 401 |
</div>
|
| 402 |
</div>
|
| 403 |
|
| 404 |
-
<!-- Training Chart -->
|
| 405 |
<div class="glass-card p-6">
|
| 406 |
-
<h3 class="text-lg font-semibold text-cyan-400">
|
| 407 |
<div class="h-80">
|
| 408 |
-
<canvas id="
|
| 409 |
</div>
|
| 410 |
</div>
|
| 411 |
</div>
|
| 412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 413 |
<!-- Performance Comparison -->
|
| 414 |
<div class="glass-card p-6 mb-6">
|
| 415 |
<h3 class="text-lg font-semibold text-cyan-400 mb-4">Performance Comparison</h3>
|
|
@@ -472,28 +529,44 @@
|
|
| 472 |
</div>
|
| 473 |
|
| 474 |
<script>
|
| 475 |
-
//
|
| 476 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 477 |
// Candlestick Chart
|
| 478 |
const candleCtx = document.getElementById('candlestickChart').getContext('2d');
|
| 479 |
new Chart(candleCtx, {
|
| 480 |
type: 'candlestick',
|
| 481 |
data: {
|
| 482 |
-
labels: ['09:00', '09:15', '09:30', '09:45', '10:00', '10:15', '10:30', '10:45', '11:00', '11:15'],
|
| 483 |
datasets: [{
|
| 484 |
label: 'BTC/USDT',
|
| 485 |
-
data:
|
| 486 |
-
{x: '09:00', o: 62000, h: 62500, l: 61800, c: 62300},
|
| 487 |
-
{x: '09:15', o: 62300, h: 62700, l: 62100, c: 62500},
|
| 488 |
-
{x: '09:30', o: 62500, h: 62800, l: 62300, c: 62600},
|
| 489 |
-
{x: '09:45', o: 62600, h: 63000, l: 62400, c: 62800},
|
| 490 |
-
{x: '10:00', o: 62800, h: 63200, l: 62600, c: 63000},
|
| 491 |
-
{x: '10:15', o: 63000, h: 63500, l: 62800, c: 63300},
|
| 492 |
-
{x: '10:30', o: 63300, h: 63700, l: 63100, c: 63500},
|
| 493 |
-
{x: '10:45', o: 63500, h: 63800, l: 63300, c: 63600},
|
| 494 |
-
{x: '11:00', o: 63600, h: 64000, l: 63400, c: 63800},
|
| 495 |
-
{x: '11:15', o: 63800, h: 64200, l: 63600, c: 64000}
|
| 496 |
-
],
|
| 497 |
color: { up: '#00ff88', down: '#ff0066', unchanged: '#a1a1aa' }
|
| 498 |
}]
|
| 499 |
},
|
|
@@ -501,29 +574,50 @@
|
|
| 501 |
responsive: true,
|
| 502 |
maintainAspectRatio: false,
|
| 503 |
plugins: { legend: { display: false } },
|
| 504 |
-
scales: {
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 508 |
}
|
| 509 |
});
|
| 510 |
|
| 511 |
-
// Training
|
| 512 |
const trainCtx = document.getElementById('trainingChart').getContext('2d');
|
| 513 |
new Chart(trainCtx, {
|
| 514 |
type: 'line',
|
| 515 |
data: {
|
| 516 |
-
labels:
|
| 517 |
datasets: [{
|
| 518 |
label: 'Accuracy',
|
| 519 |
-
data:
|
| 520 |
borderColor: '#00f7ff',
|
| 521 |
backgroundColor: 'rgba(0, 247, 255, 0.1)',
|
| 522 |
borderWidth: 2,
|
| 523 |
tension: 0.3
|
| 524 |
}, {
|
| 525 |
label: 'Loss',
|
| 526 |
-
data:
|
| 527 |
borderColor: '#ff0066',
|
| 528 |
backgroundColor: 'rgba(255, 0, 102, 0.1)',
|
| 529 |
borderWidth: 2,
|
|
@@ -534,12 +628,12 @@
|
|
| 534 |
responsive: true,
|
| 535 |
maintainAspectRatio: false,
|
| 536 |
plugins: { legend: { display: false } },
|
| 537 |
-
scales: {
|
| 538 |
-
x: { display: false },
|
| 539 |
-
y: { display: false }
|
| 540 |
-
}
|
| 541 |
}
|
| 542 |
});
|
|
|
|
|
|
|
|
|
|
| 543 |
|
| 544 |
// Backtest & Live Charts
|
| 545 |
['backtestChart', 'liveChart'].forEach((id, index) => {
|
|
@@ -576,4 +670,5 @@
|
|
| 576 |
});
|
| 577 |
</script>
|
| 578 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=olywwe/https-huggingface-co-spaces-olywwe-bibytgradio" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
|
|
|
| 579 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 10 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/chartjs-chart-financial@3.0.1/dist/chartjs-chart-financial.min.js">
|
| 12 |
+
</script>
|
| 13 |
<style>
|
| 14 |
:root {
|
| 15 |
--bg-primary: #0a0a0a;
|
|
|
|
| 80 |
}
|
| 81 |
|
| 82 |
@keyframes pulse {
|
| 83 |
+
|
| 84 |
+
0%,
|
| 85 |
+
100% {
|
| 86 |
+
opacity: 0.5;
|
| 87 |
+
transform: scale(1);
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
50% {
|
| 91 |
+
opacity: 1;
|
| 92 |
+
transform: scale(1.5);
|
| 93 |
+
}
|
| 94 |
}
|
| 95 |
|
| 96 |
.data-stream {
|
|
|
|
| 102 |
}
|
| 103 |
|
| 104 |
@keyframes stream {
|
| 105 |
+
0% {
|
| 106 |
+
transform: translateY(-100px);
|
| 107 |
+
opacity: 0;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
50% {
|
| 111 |
+
opacity: 1;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
100% {
|
| 115 |
+
transform: translateY(400px);
|
| 116 |
+
opacity: 0;
|
| 117 |
+
}
|
| 118 |
}
|
| 119 |
|
| 120 |
.trade-marker {
|
|
|
|
| 122 |
}
|
| 123 |
|
| 124 |
@keyframes bounce {
|
| 125 |
+
|
| 126 |
+
0%,
|
| 127 |
+
100% {
|
| 128 |
+
transform: scale(1);
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
50% {
|
| 132 |
+
transform: scale(1.5);
|
| 133 |
+
}
|
| 134 |
}
|
| 135 |
|
| 136 |
.ticker-wrap {
|
|
|
|
| 148 |
}
|
| 149 |
|
| 150 |
@keyframes ticker {
|
| 151 |
+
0% {
|
| 152 |
+
transform: translateX(0);
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
100% {
|
| 156 |
+
transform: translateX(-100%);
|
| 157 |
+
}
|
| 158 |
}
|
| 159 |
|
| 160 |
.btn-primary {
|
|
|
|
| 231 |
}
|
| 232 |
|
| 233 |
@keyframes pulse-status {
|
| 234 |
+
0% {
|
| 235 |
+
opacity: 1;
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
50% {
|
| 239 |
+
opacity: 0.3;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
100% {
|
| 243 |
+
opacity: 1;
|
| 244 |
+
}
|
| 245 |
}
|
| 246 |
|
| 247 |
.floating-element {
|
|
|
|
| 249 |
}
|
| 250 |
|
| 251 |
@keyframes float {
|
| 252 |
+
|
| 253 |
+
0%,
|
| 254 |
+
100% {
|
| 255 |
+
transform: translateY(0px);
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
50% {
|
| 259 |
+
transform: translateY(-10px);
|
| 260 |
+
}
|
| 261 |
}
|
| 262 |
</style>
|
| 263 |
</head>
|
| 264 |
+
|
| 265 |
<body class="bg-black text-white">
|
| 266 |
<!-- Header -->
|
| 267 |
<header class="border-b border-gray-800 p-6">
|
|
|
|
| 293 |
<div class="inline-flex space-x-12 px-6">
|
| 294 |
<span class="flex items-center space-x-2">
|
| 295 |
<span class="crypto-symbol bg-orange-500">₿</span>
|
| 296 |
+
<span class="text-sm">BTC/USDT</span>
|
| 297 |
+
<span class="text-green-400 font-mono">$62,450.23</span>
|
| 298 |
+
<span class="text-green-400 text-sm">+2.3%</span>
|
| 299 |
</span>
|
| 300 |
<span class="flex items-center space-x-2">
|
| 301 |
<span class="crypto-symbol bg-blue-500">Ξ</span>
|
| 302 |
+
<span class="text-sm">ETH/USDT</span>
|
| 303 |
+
<span class="text-green-400 font-mono">$3,420.78</span>
|
| 304 |
+
<span class="text-green-400 text-sm">+1.8%</span>
|
| 305 |
</span>
|
| 306 |
<span class="flex items-center space-x-2">
|
| 307 |
<span class="crypto-symbol bg-green-400">◎</span>
|
| 308 |
+
<span class="text-sm">SOL/USDT</span>
|
| 309 |
+
<span class="text-red-400 font-mono">$142.35</span>
|
| 310 |
+
<span class="text-red-400 text-sm">-0.7%</span>
|
| 311 |
</span>
|
| 312 |
<span class="flex items-center space-x-2">
|
| 313 |
<span class="crypto-symbol bg-blue-600">₳</span>
|
| 314 |
+
<span class="text-sm">ADA/USDT</span>
|
| 315 |
+
<span class="text-green-400 font-mono">$0.58</span>
|
| 316 |
+
<span class="text-green-400 text-sm">+3.2%</span>
|
| 317 |
</span>
|
| 318 |
<!-- Repeat for infinite scroll -->
|
| 319 |
<span class="flex items-center space-x-2">
|
| 320 |
<span class="crypto-symbol bg-orange-500">₿</span>
|
| 321 |
+
<span class="text-sm">BTC/USDT</span>
|
| 322 |
+
<span class="text-green-400 font-mono">$62,450.23</span>
|
| 323 |
+
<span class="text-green-400 text-sm">+2.3%</span>
|
| 324 |
</span>
|
| 325 |
</div>
|
| 326 |
</div>
|
|
|
|
| 355 |
<!-- Controls -->
|
| 356 |
<div class="glass-card p-6">
|
| 357 |
<h3 class="text-lg font-semibold mb-4 text-cyan-400">Trading Controls</h3>
|
| 358 |
+
|
| 359 |
<div class="space-y-4">
|
| 360 |
<div>
|
| 361 |
<label class="text-sm text-gray-400 block mb-2">Training Pair</label>
|
|
|
|
| 365 |
<option>SOL/USDT</option>
|
| 366 |
</select>
|
| 367 |
</div>
|
| 368 |
+
|
| 369 |
<div>
|
| 370 |
<label class="text-sm text-gray-400 block mb-2">Validation Pair</label>
|
| 371 |
<select class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 text-white">
|
|
|
|
| 374 |
<option>SOL/USDT</option>
|
| 375 |
</select>
|
| 376 |
</div>
|
| 377 |
+
|
| 378 |
<div>
|
| 379 |
<label class="text-sm text-gray-400 block mb-2">Leverage</label>
|
| 380 |
<select class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 text-white">
|
|
|
|
| 384 |
<option>100x</option>
|
| 385 |
</select>
|
| 386 |
</div>
|
| 387 |
+
|
| 388 |
<div class="grid grid-cols-2 gap-3">
|
| 389 |
<button class="btn-primary">
|
| 390 |
<i class="fas fa-play mr-2"></i>Start
|
|
|
|
| 393 |
<i class="fas fa-stop mr-2"></i>Stop
|
| 394 |
</button>
|
| 395 |
</div>
|
| 396 |
+
|
| 397 |
<button class="w-full btn-secondary">
|
| 398 |
<i class="fas fa-cogs mr-2"></i>Optimize Neural Network
|
| 399 |
</button>
|
|
|
|
| 407 |
<div class="neuron" style="left: 10%; top: 20%"></div>
|
| 408 |
<div class="neuron" style="left: 10%; top: 50%"></div>
|
| 409 |
<div class="neuron" style="left: 10%; top: 80%"></div>
|
| 410 |
+
|
| 411 |
<div class="neuron" style="left: 30%; top: 15%"></div>
|
| 412 |
<div class="neuron" style="left: 30%; top: 35%"></div>
|
| 413 |
<div class="neuron" style="left: 30%; top: 55%"></div>
|
| 414 |
<div class="neuron" style="left: 30%; top: 75%"></div>
|
| 415 |
+
|
| 416 |
<div class="neuron" style="left: 50%; top: 20%"></div>
|
| 417 |
<div class="neuron" style="left: 50%; top: 40%"></div>
|
| 418 |
<div class="neuron" style="left: 50%; top: 60%"></div>
|
| 419 |
<div class="neuron" style="left: 50%; top: 80%"></div>
|
| 420 |
+
|
| 421 |
<div class="neuron" style="left: 70%; top: 25%"></div>
|
| 422 |
<div class="neuron" style="left: 70%; top: 75%"></div>
|
| 423 |
+
|
| 424 |
<div class="neuron" style="left: 90%; top: 50%"></div>
|
| 425 |
+
|
| 426 |
<div class="data-stream" style="left: 15%; animation-delay: 0s"></div>
|
| 427 |
<div class="data-stream" style="left: 35%; animation-delay: 1s"></div>
|
| 428 |
<div class="data-stream" style="left: 55%; animation-delay: 2s"></div>
|
|
|
|
| 436 |
<!-- Candlestick Chart -->
|
| 437 |
<div class="glass-card p-6">
|
| 438 |
<div class="flex justify-between items-center mb-4">
|
| 439 |
+
<h3 class="text-lg font-semibold text-cyan-400">BTC/USDT Candlestick</h3>
|
| 440 |
<div class="flex space-x-1">
|
| 441 |
<button class="text-xs px-2 py-1 bg-gray-800 rounded">1m</button>
|
| 442 |
<button class="text-xs px-2 py-1 bg-gray-800 rounded">5m</button>
|
|
|
|
| 450 |
</div>
|
| 451 |
</div>
|
| 452 |
|
| 453 |
+
<!-- Training Pair Line Chart -->
|
| 454 |
<div class="glass-card p-6">
|
| 455 |
+
<h3 class="text-lg font-semibold text-cyan-400">BTC/USDT Line Training</h3>
|
| 456 |
<div class="h-80">
|
| 457 |
+
<canvas id="trainingLineChart"></canvas>
|
| 458 |
</div>
|
| 459 |
</div>
|
| 460 |
</div>
|
| 461 |
|
| 462 |
+
<!-- Neural Network Evolution (moved to separate section) -->
|
| 463 |
+
<div class="glass-card p-6 mb-6">
|
| 464 |
+
<h3 class="text-lg font-semibold text-cyan-400 mb-4">Neural Network Evolution</h3>
|
| 465 |
+
<div class="h-64">
|
| 466 |
+
<canvas id="trainingChart"></canvas>
|
| 467 |
+
</div>
|
| 468 |
+
</div>
|
| 469 |
+
|
| 470 |
<!-- Performance Comparison -->
|
| 471 |
<div class="glass-card p-6 mb-6">
|
| 472 |
<h3 class="text-lg font-semibold text-cyan-400 mb-4">Performance Comparison</h3>
|
|
|
|
| 529 |
</div>
|
| 530 |
|
| 531 |
<script>
|
| 532 |
+
// API caller (simulated)
|
| 533 |
+
async function fetchCandleData(coin="bitcoin", days=1) {
|
| 534 |
+
// Caso real: usar fetch para endpoint próprio com Python
|
| 535 |
+
// Por enquanto, gera dados simulados
|
| 536 |
+
const data = [];
|
| 537 |
+
const now = Date.now();
|
| 538 |
+
let price = 62000;
|
| 539 |
+
for (let i = 0; i < 96; i++) { // 96 candles de 15 min
|
| 540 |
+
const open = price + (Math.random() - 0.5) * 500;
|
| 541 |
+
const close = open + (Math.random() - 0.5) * 300;
|
| 542 |
+
const high = Math.max(open, close) + Math.random() * 200;
|
| 543 |
+
const low = Math.min(open, close) - Math.random() * 200;
|
| 544 |
+
price = close;
|
| 545 |
+
data.push({
|
| 546 |
+
x: new Date(now - (96-i) * 15 * 60 * 1000),
|
| 547 |
+
o: open,
|
| 548 |
+
h: high,
|
| 549 |
+
l: low,
|
| 550 |
+
c: close
|
| 551 |
+
});
|
| 552 |
+
}
|
| 553 |
+
return data;
|
| 554 |
+
}
|
| 555 |
+
|
| 556 |
+
// Global storage
|
| 557 |
+
window.candleData = [];
|
| 558 |
+
|
| 559 |
+
async function initCharts() {
|
| 560 |
+
window.candleData = await fetchCandleData("bitcoin", 1);
|
| 561 |
+
|
| 562 |
// Candlestick Chart
|
| 563 |
const candleCtx = document.getElementById('candlestickChart').getContext('2d');
|
| 564 |
new Chart(candleCtx, {
|
| 565 |
type: 'candlestick',
|
| 566 |
data: {
|
|
|
|
| 567 |
datasets: [{
|
| 568 |
label: 'BTC/USDT',
|
| 569 |
+
data: window.candleData,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 570 |
color: { up: '#00ff88', down: '#ff0066', unchanged: '#a1a1aa' }
|
| 571 |
}]
|
| 572 |
},
|
|
|
|
| 574 |
responsive: true,
|
| 575 |
maintainAspectRatio: false,
|
| 576 |
plugins: { legend: { display: false } },
|
| 577 |
+
scales: { x: { display: false }, y: { display: false } }
|
| 578 |
+
}
|
| 579 |
+
});
|
| 580 |
+
|
| 581 |
+
// Line chart for training pair
|
| 582 |
+
const lineCtx = document.getElementById('trainingLineChart').getContext('2d');
|
| 583 |
+
new Chart(lineCtx, {
|
| 584 |
+
type: 'line',
|
| 585 |
+
data: {
|
| 586 |
+
labels: window.candleData.map(d => d.x),
|
| 587 |
+
datasets: [{
|
| 588 |
+
label: 'BTC/USDT',
|
| 589 |
+
data: window.candleData.map(d => d.c),
|
| 590 |
+
borderColor: '#00f7ff',
|
| 591 |
+
backgroundColor: 'rgba(0, 247, 255, 0.1)',
|
| 592 |
+
borderWidth: 2,
|
| 593 |
+
tension: 0.3,
|
| 594 |
+
pointRadius: 0
|
| 595 |
+
}]
|
| 596 |
+
},
|
| 597 |
+
options: {
|
| 598 |
+
responsive: true,
|
| 599 |
+
maintainAspectRatio: false,
|
| 600 |
+
plugins: { legend: { display: false } },
|
| 601 |
+
scales: { x: { display: false }, y: { display: false } }
|
| 602 |
}
|
| 603 |
});
|
| 604 |
|
| 605 |
+
// Training evolution
|
| 606 |
const trainCtx = document.getElementById('trainingChart').getContext('2d');
|
| 607 |
new Chart(trainCtx, {
|
| 608 |
type: 'line',
|
| 609 |
data: {
|
| 610 |
+
labels: Array.from({length:20}, (_,i)=>i+1),
|
| 611 |
datasets: [{
|
| 612 |
label: 'Accuracy',
|
| 613 |
+
data: Array.from({length:20}, (_,i)=>0.5+i*0.0132),
|
| 614 |
borderColor: '#00f7ff',
|
| 615 |
backgroundColor: 'rgba(0, 247, 255, 0.1)',
|
| 616 |
borderWidth: 2,
|
| 617 |
tension: 0.3
|
| 618 |
}, {
|
| 619 |
label: 'Loss',
|
| 620 |
+
data: Array.from({length:20}, (_,i)=>1-i*0.026),
|
| 621 |
borderColor: '#ff0066',
|
| 622 |
backgroundColor: 'rgba(255, 0, 102, 0.1)',
|
| 623 |
borderWidth: 2,
|
|
|
|
| 628 |
responsive: true,
|
| 629 |
maintainAspectRatio: false,
|
| 630 |
plugins: { legend: { display: false } },
|
| 631 |
+
scales: { x: { display: false }, y: { display: false } }
|
|
|
|
|
|
|
|
|
|
| 632 |
}
|
| 633 |
});
|
| 634 |
+
}
|
| 635 |
+
|
| 636 |
+
document.addEventListener('DOMContentLoaded', initCharts);
|
| 637 |
|
| 638 |
// Backtest & Live Charts
|
| 639 |
['backtestChart', 'liveChart'].forEach((id, index) => {
|
|
|
|
| 670 |
});
|
| 671 |
</script>
|
| 672 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=olywwe/https-huggingface-co-spaces-olywwe-bibytgradio" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 673 |
+
|
| 674 |
</html>
|