Add 2 files
Browse files- README.md +7 -5
- index.html +1142 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: btc
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: yellow
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,1142 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fa" dir="rtl">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>تحلیل پیشرفته بیتکوین</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');
|
| 11 |
+
|
| 12 |
+
body {
|
| 13 |
+
font-family: 'Noto Naskh Arabic', serif;
|
| 14 |
+
background-color: #f3f4f6;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
.positive {
|
| 18 |
+
color: #10b981;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.negative {
|
| 22 |
+
color: #ef4444;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.neutral {
|
| 26 |
+
color: #3b82f6;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.chart-container {
|
| 30 |
+
height: 400px;
|
| 31 |
+
position: relative;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.tooltip {
|
| 35 |
+
position: absolute;
|
| 36 |
+
background: rgba(0, 0, 0, 0.7);
|
| 37 |
+
color: white;
|
| 38 |
+
padding: 5px 10px;
|
| 39 |
+
border-radius: 5px;
|
| 40 |
+
font-size: 12px;
|
| 41 |
+
pointer-events: none;
|
| 42 |
+
z-index: 10;
|
| 43 |
+
display: none;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.loading-spinner {
|
| 47 |
+
border: 4px solid rgba(0, 0, 0, 0.1);
|
| 48 |
+
border-radius: 50%;
|
| 49 |
+
border-top: 4px solid #3b82f6;
|
| 50 |
+
width: 40px;
|
| 51 |
+
height: 40px;
|
| 52 |
+
animation: spin 1s linear infinite;
|
| 53 |
+
margin: 20px auto;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
@keyframes spin {
|
| 57 |
+
0% { transform: rotate(0deg); }
|
| 58 |
+
100% { transform: rotate(360deg); }
|
| 59 |
+
}
|
| 60 |
+
</style>
|
| 61 |
+
</head>
|
| 62 |
+
<body class="bg-gray-100">
|
| 63 |
+
<div class="container mx-auto px-4 py-8">
|
| 64 |
+
<!-- Header -->
|
| 65 |
+
<header class="bg-gradient-to-r from-blue-600 to-blue-800 text-white rounded-xl shadow-lg p-6 mb-8">
|
| 66 |
+
<div class="flex flex-col md:flex-row justify-between items-center">
|
| 67 |
+
<div class="flex items-center mb-4 md:mb-0">
|
| 68 |
+
<i class="fab fa-bitcoin text-4xl mr-3"></i>
|
| 69 |
+
<div>
|
| 70 |
+
<h1 class="text-2xl md:text-3xl font-bold">تحلیل پیشرفته بیتکوین</h1>
|
| 71 |
+
<p class="text-blue-100">نسخه 2.0 - تحلیل تکنیکال و فعالیت نهنگها</p>
|
| 72 |
+
</div>
|
| 73 |
+
</div>
|
| 74 |
+
<div class="bg-white/20 rounded-lg p-3 text-center">
|
| 75 |
+
<div class="text-sm text-blue-100">آخرین بروزرسانی</div>
|
| 76 |
+
<div class="font-bold" id="current-date">--/--/----</div>
|
| 77 |
+
</div>
|
| 78 |
+
</div>
|
| 79 |
+
</header>
|
| 80 |
+
|
| 81 |
+
<!-- Input Section -->
|
| 82 |
+
<section class="bg-white rounded-xl shadow-md p-6 mb-8">
|
| 83 |
+
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 84 |
+
<i class="fas fa-calendar-alt ml-2"></i>
|
| 85 |
+
انتخاب تاریخ تحلیل
|
| 86 |
+
</h2>
|
| 87 |
+
<div class="flex flex-col md:flex-row gap-4">
|
| 88 |
+
<div class="flex-1">
|
| 89 |
+
<label for="analysis-date" class="block text-sm font-medium text-gray-700 mb-1">تاریخ مورد نظر (YYYY-MM-DD)</label>
|
| 90 |
+
<input type="text" id="analysis-date" placeholder="برای استفاده از آخرین تاریخ خالی بگذارید"
|
| 91 |
+
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
| 92 |
+
</div>
|
| 93 |
+
<div class="flex items-end">
|
| 94 |
+
<button id="analyze-btn" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded-lg transition duration-200 flex items-center">
|
| 95 |
+
<i class="fas fa-chart-line ml-2"></i>
|
| 96 |
+
شروع تحلیل
|
| 97 |
+
</button>
|
| 98 |
+
</div>
|
| 99 |
+
</div>
|
| 100 |
+
</section>
|
| 101 |
+
|
| 102 |
+
<!-- Loading Indicator -->
|
| 103 |
+
<div id="loading-indicator" class="hidden">
|
| 104 |
+
<div class="bg-white rounded-xl shadow-md p-6 mb-8 text-center">
|
| 105 |
+
<div class="loading-spinner"></div>
|
| 106 |
+
<p class="text-gray-700 mt-2">در حال پردازش دادهها و انجام تحلیلها...</p>
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
|
| 110 |
+
<!-- Analysis Results -->
|
| 111 |
+
<div id="analysis-results" class="hidden">
|
| 112 |
+
<!-- Summary Section -->
|
| 113 |
+
<section class="bg-white rounded-xl shadow-md p-6 mb-8">
|
| 114 |
+
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 115 |
+
<i class="fas fa-chart-pie ml-2"></i>
|
| 116 |
+
خلاصه آماری
|
| 117 |
+
</h2>
|
| 118 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6" id="summary-stats">
|
| 119 |
+
<!-- Filled by JavaScript -->
|
| 120 |
+
</div>
|
| 121 |
+
|
| 122 |
+
<div class="overflow-x-auto">
|
| 123 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 124 |
+
<thead class="bg-gray-50">
|
| 125 |
+
<tr>
|
| 126 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">معیار</th>
|
| 127 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مقدار</th>
|
| 128 |
+
</tr>
|
| 129 |
+
</thead>
|
| 130 |
+
<tbody class="bg-white divide-y divide-gray-200" id="summary-table">
|
| 131 |
+
<!-- Filled by JavaScript -->
|
| 132 |
+
</tbody>
|
| 133 |
+
</table>
|
| 134 |
+
</div>
|
| 135 |
+
</section>
|
| 136 |
+
|
| 137 |
+
<!-- Charts Section -->
|
| 138 |
+
<section class="bg-white rounded-xl shadow-md p-6 mb-8">
|
| 139 |
+
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 140 |
+
<i class="fas fa-chart-bar ml-2"></i>
|
| 141 |
+
نمودارهای تحلیلی
|
| 142 |
+
</h2>
|
| 143 |
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
| 144 |
+
<div class="bg-gray-50 rounded-lg p-4">
|
| 145 |
+
<h3 class="font-medium text-gray-700 mb-2">قیمت و حجم معاملات</h3>
|
| 146 |
+
<div class="chart-container">
|
| 147 |
+
<canvas id="price-volume-chart"></canvas>
|
| 148 |
+
<div class="tooltip" id="price-tooltip"></div>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
<div class="bg-gray-50 rounded-lg p-4">
|
| 152 |
+
<h3 class="font-medium text-gray-700 mb-2">شاخص قدرت نسبی (RSI)</h3>
|
| 153 |
+
<div class="chart-container">
|
| 154 |
+
<canvas id="rsi-chart"></canvas>
|
| 155 |
+
<div class="tooltip" id="rsi-tooltip"></div>
|
| 156 |
+
</div>
|
| 157 |
+
</div>
|
| 158 |
+
<div class="bg-gray-50 rounded-lg p-4">
|
| 159 |
+
<h3 class="font-medium text-gray-700 mb-2">میانگین متحرک همگرایی/واگرایی (MACD)</h3>
|
| 160 |
+
<div class="chart-container">
|
| 161 |
+
<canvas id="macd-chart"></canvas>
|
| 162 |
+
<div class="tooltip" id="macd-tooltip"></div>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
<div class="bg-gray-50 rounded-lg p-4">
|
| 166 |
+
<h3 class="font-medium text-gray-700 mb-2">باندهای بولینگر</h3>
|
| 167 |
+
<div class="chart-container">
|
| 168 |
+
<canvas id="bollinger-chart"></canvas>
|
| 169 |
+
<div class="tooltip" id="bollinger-tooltip"></div>
|
| 170 |
+
</div>
|
| 171 |
+
</div>
|
| 172 |
+
</div>
|
| 173 |
+
</section>
|
| 174 |
+
|
| 175 |
+
<!-- Signals Section -->
|
| 176 |
+
<section class="bg-white rounded-xl shadow-md p-6 mb-8">
|
| 177 |
+
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 178 |
+
<i class="fas fa-bell ml-2"></i>
|
| 179 |
+
سیگنالهای معاملاتی
|
| 180 |
+
</h2>
|
| 181 |
+
|
| 182 |
+
<div class="mb-6">
|
| 183 |
+
<h3 class="font-medium text-green-600 mb-2 flex items-center">
|
| 184 |
+
<i class="fas fa-arrow-up ml-2"></i>
|
| 185 |
+
سیگنالهای برتر خرید
|
| 186 |
+
</h3>
|
| 187 |
+
<div class="overflow-x-auto">
|
| 188 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 189 |
+
<thead class="bg-green-50">
|
| 190 |
+
<tr>
|
| 191 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">زمان</th>
|
| 192 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">قیمت</th>
|
| 193 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نوع سیگنال</th>
|
| 194 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">توضیحات</th>
|
| 195 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">قدرت سیگنال</th>
|
| 196 |
+
</tr>
|
| 197 |
+
</thead>
|
| 198 |
+
<tbody class="bg-white divide-y divide-gray-200" id="buy-signals">
|
| 199 |
+
<!-- Filled by JavaScript -->
|
| 200 |
+
</tbody>
|
| 201 |
+
</table>
|
| 202 |
+
</div>
|
| 203 |
+
</div>
|
| 204 |
+
|
| 205 |
+
<div>
|
| 206 |
+
<h3 class="font-medium text-red-600 mb-2 flex items-center">
|
| 207 |
+
<i class="fas fa-arrow-down ml-2"></i>
|
| 208 |
+
سیگنالهای برتر فروش
|
| 209 |
+
</h3>
|
| 210 |
+
<div class="overflow-x-auto">
|
| 211 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 212 |
+
<thead class="bg-red-50">
|
| 213 |
+
<tr>
|
| 214 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">زمان</th>
|
| 215 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">قیمت</th>
|
| 216 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نوع سیگنال</th>
|
| 217 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">توضیحات</th>
|
| 218 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">قدرت سیگنال</th>
|
| 219 |
+
</tr>
|
| 220 |
+
</thead>
|
| 221 |
+
<tbody class="bg-white divide-y divide-gray-200" id="sell-signals">
|
| 222 |
+
<!-- Filled by JavaScript -->
|
| 223 |
+
</tbody>
|
| 224 |
+
</table>
|
| 225 |
+
</div>
|
| 226 |
+
</div>
|
| 227 |
+
</section>
|
| 228 |
+
|
| 229 |
+
<!-- Whale Activity Section -->
|
| 230 |
+
<section class="bg-white rounded-xl shadow-md p-6 mb-8">
|
| 231 |
+
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 232 |
+
<i class="fas fa-whale ml-2"></i>
|
| 233 |
+
فعالیت نهنگها
|
| 234 |
+
</h2>
|
| 235 |
+
|
| 236 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6" id="whale-stats">
|
| 237 |
+
<!-- Filled by JavaScript -->
|
| 238 |
+
</div>
|
| 239 |
+
|
| 240 |
+
<div class="mb-6">
|
| 241 |
+
<h3 class="font-medium text-gray-700 mb-2">استراتژیهای نهنگها</h3>
|
| 242 |
+
<div class="overflow-x-auto">
|
| 243 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 244 |
+
<thead class="bg-gray-50">
|
| 245 |
+
<tr>
|
| 246 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">زمان</th>
|
| 247 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">قیمت</th>
|
| 248 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نوع استراتژی</th>
|
| 249 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">توضیحات</th>
|
| 250 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">حجم معاملات</th>
|
| 251 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">احتمال موفقیت</th>
|
| 252 |
+
</tr>
|
| 253 |
+
</thead>
|
| 254 |
+
<tbody class="bg-white divide-y divide-gray-200" id="whale-strategies">
|
| 255 |
+
<!-- Filled by JavaScript -->
|
| 256 |
+
</tbody>
|
| 257 |
+
</table>
|
| 258 |
+
</div>
|
| 259 |
+
</div>
|
| 260 |
+
|
| 261 |
+
<div>
|
| 262 |
+
<h3 class="font-medium text-gray-700 mb-2">وایپاوتها و شکافهای نقدینگی</h3>
|
| 263 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 264 |
+
<div class="bg-gray-50 rounded-lg p-4">
|
| 265 |
+
<h4 class="font-medium text-purple-600 mb-2">وایپاوتهای شناسایی شده</h4>
|
| 266 |
+
<div class="overflow-x-auto">
|
| 267 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 268 |
+
<thead class="bg-purple-50">
|
| 269 |
+
<tr>
|
| 270 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نوع وایپاوت</th>
|
| 271 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تعداد</th>
|
| 272 |
+
</tr>
|
| 273 |
+
</thead>
|
| 274 |
+
<tbody class="bg-white divide-y divide-gray-200" id="wipeouts">
|
| 275 |
+
<!-- Filled by JavaScript -->
|
| 276 |
+
</tbody>
|
| 277 |
+
</table>
|
| 278 |
+
</div>
|
| 279 |
+
</div>
|
| 280 |
+
<div class="bg-gray-50 rounded-lg p-4">
|
| 281 |
+
<h4 class="font-medium text-blue-600 mb-2">شکافهای نقدینگی</h4>
|
| 282 |
+
<div class="overflow-x-auto">
|
| 283 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 284 |
+
<thead class="bg-blue-50">
|
| 285 |
+
<tr>
|
| 286 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نوع شکاف</th>
|
| 287 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تعداد</th>
|
| 288 |
+
</tr>
|
| 289 |
+
</thead>
|
| 290 |
+
<tbody class="bg-white divide-y divide-gray-200" id="liquidity-gaps">
|
| 291 |
+
<!-- Filled by JavaScript -->
|
| 292 |
+
</tbody>
|
| 293 |
+
</table>
|
| 294 |
+
</div>
|
| 295 |
+
</div>
|
| 296 |
+
</div>
|
| 297 |
+
</div>
|
| 298 |
+
</section>
|
| 299 |
+
|
| 300 |
+
<!-- Candle Patterns Section -->
|
| 301 |
+
<section class="bg-white rounded-xl shadow-md p-6 mb-8">
|
| 302 |
+
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 303 |
+
<i class="fas fa-fire ml-2"></i>
|
| 304 |
+
الگوهای کندلی
|
| 305 |
+
</h2>
|
| 306 |
+
|
| 307 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 308 |
+
<div>
|
| 309 |
+
<div class="overflow-x-auto">
|
| 310 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 311 |
+
<thead class="bg-gray-50">
|
| 312 |
+
<tr>
|
| 313 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">الگوی کندلی</th>
|
| 314 |
+
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تعداد</th>
|
| 315 |
+
</tr>
|
| 316 |
+
</thead>
|
| 317 |
+
<tbody class="bg-white divide-y divide-gray-200" id="candle-patterns">
|
| 318 |
+
<!-- Filled by JavaScript -->
|
| 319 |
+
</tbody>
|
| 320 |
+
</table>
|
| 321 |
+
</div>
|
| 322 |
+
</div>
|
| 323 |
+
<div class="bg-gray-50 rounded-lg p-4">
|
| 324 |
+
<h4 class="font-medium text-gray-700 mb-2">توضیحات الگوهای کندلی</h4>
|
| 325 |
+
<div class="space-y-3" id="candle-explanations">
|
| 326 |
+
<!-- Filled by JavaScript -->
|
| 327 |
+
</div>
|
| 328 |
+
</div>
|
| 329 |
+
</div>
|
| 330 |
+
</section>
|
| 331 |
+
|
| 332 |
+
<!-- Export Section -->
|
| 333 |
+
<section class="bg-white rounded-xl shadow-md p-6">
|
| 334 |
+
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 335 |
+
<i class="fas fa-file-export ml-2"></i>
|
| 336 |
+
خروجی نتایج
|
| 337 |
+
</h2>
|
| 338 |
+
|
| 339 |
+
<div class="flex flex-col md:flex-row gap-4">
|
| 340 |
+
<button id="export-excel" class="bg-green-600 hover:bg-green-700 text-white px-6 py-3 rounded-lg transition duration-200 flex-1 flex items-center justify-center">
|
| 341 |
+
<i class="fas fa-file-excel ml-2"></i>
|
| 342 |
+
دانلود گزارش اکسل
|
| 343 |
+
</button>
|
| 344 |
+
<button id="export-pdf" class="bg-red-600 hover:bg-red-700 text-white px-6 py-3 rounded-lg transition duration-200 flex-1 flex items-center justify-center">
|
| 345 |
+
<i class="fas fa-file-pdf ml-2"></i>
|
| 346 |
+
دانلود گزارش PDF
|
| 347 |
+
</button>
|
| 348 |
+
<button id="export-charts" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg transition duration-200 flex-1 flex items-center justify-center">
|
| 349 |
+
<i class="fas fa-image ml-2"></i>
|
| 350 |
+
دانلود نمودارها
|
| 351 |
+
</button>
|
| 352 |
+
</div>
|
| 353 |
+
</section>
|
| 354 |
+
</div>
|
| 355 |
+
</div>
|
| 356 |
+
|
| 357 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 358 |
+
<script>
|
| 359 |
+
// Set current date
|
| 360 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 361 |
+
const now = new Date();
|
| 362 |
+
const formattedDate = now.toLocaleDateString('fa-IR');
|
| 363 |
+
document.getElementById('current-date').textContent = formattedDate;
|
| 364 |
+
|
| 365 |
+
// Set default date to yesterday
|
| 366 |
+
const yesterday = new Date(now);
|
| 367 |
+
yesterday.setDate(now.getDate() - 1);
|
| 368 |
+
const formattedYesterday = yesterday.toISOString().split('T')[0];
|
| 369 |
+
document.getElementById('analysis-date').placeholder = `مثال: ${formattedYesterday}`;
|
| 370 |
+
});
|
| 371 |
+
|
| 372 |
+
// Sample data for demonstration
|
| 373 |
+
const sampleData = {
|
| 374 |
+
date: "2023-06-15",
|
| 375 |
+
summary: {
|
| 376 |
+
open: 24500,
|
| 377 |
+
close: 25280,
|
| 378 |
+
high: 25350,
|
| 379 |
+
low: 24320,
|
| 380 |
+
avgPrice: 24850,
|
| 381 |
+
totalVolume: 125000000,
|
| 382 |
+
avgVolume: 5200000,
|
| 383 |
+
stdDev: 320,
|
| 384 |
+
dailyChange: 3.18,
|
| 385 |
+
negativeMinutes: 210,
|
| 386 |
+
positiveMinutes: 270
|
| 387 |
+
},
|
| 388 |
+
technical: {
|
| 389 |
+
lastRSI: 62.5,
|
| 390 |
+
avgRSI: 58.3,
|
| 391 |
+
maxRSI: 72.1,
|
| 392 |
+
minRSI: 42.8,
|
| 393 |
+
lastMACD: 125.4,
|
| 394 |
+
lastSignal: 118.7,
|
| 395 |
+
lastHistogram: 6.7
|
| 396 |
+
},
|
| 397 |
+
patterns: {
|
| 398 |
+
doji: 12,
|
| 399 |
+
hammer: 8,
|
| 400 |
+
invertedHammer: 5,
|
| 401 |
+
shootingStar: 6,
|
| 402 |
+
hangingMan: 4,
|
| 403 |
+
pinBar: 3,
|
| 404 |
+
standard: 442
|
| 405 |
+
},
|
| 406 |
+
whale: {
|
| 407 |
+
accumulations: 7,
|
| 408 |
+
distributions: 5,
|
| 409 |
+
totalPower: 48,
|
| 410 |
+
avgPower: 6.8,
|
| 411 |
+
maxPower: 12,
|
| 412 |
+
minPower: -9
|
| 413 |
+
},
|
| 414 |
+
wipeouts: [
|
| 415 |
+
{ type: "وایپاوت کوتاهمدت خفیف", count: 2 },
|
| 416 |
+
{ type: "وایپاوت میانمدت متوسط", count: 1 }
|
| 417 |
+
],
|
| 418 |
+
gaps: [
|
| 419 |
+
{ type: "شکاف صعودی متوسط", count: 3 },
|
| 420 |
+
{ type: "شکاف نزولی خفیف", count: 1 }
|
| 421 |
+
],
|
| 422 |
+
buySignals: [
|
| 423 |
+
{ time: "10:15", price: 24650, type: "خرید - RSI اشباع فروش", description: "RSI = 28.5 (احتمال برگشت صعودی)", strength: 8.5 },
|
| 424 |
+
{ time: "12:30", price: 24820, type: "خرید - انباشت نهنگ", description: "انباشت نهنگ با قدرت 12 (سیگنال صعودی قوی)", strength: 9.0 },
|
| 425 |
+
{ time: "14:45", price: 24980, type: "خرید - الگوی کندلی صعودی", description: "الگوی کندلی چکش (نشانگر احتمال برگشت صعودی)", strength: 7.5 },
|
| 426 |
+
{ time: "16:20", price: 24750, type: "خرید - نزدیک به حمایت", description: "قیمت 0.8٪ بالاتر از سطح حمایت", strength: 8.0 },
|
| 427 |
+
{ time: "18:10", price: 24350, type: "خرید - پس از وایپاوت", description: "فرصت خرید پس از وایپاوت میانمدت متوسط", strength: 7.5 }
|
| 428 |
+
],
|
| 429 |
+
sellSignals: [
|
| 430 |
+
{ time: "11:25", price: 25180, type: "فروش - RSI اشباع خرید", description: "RSI = 72.1 (احتمال برگشت نزولی)", strength: 8.5 },
|
| 431 |
+
{ time: "13:40", price: 25300, type: "فروش - توزیع نهنگ", description: "توزیع نهنگ با قدرت 9 (سیگنال نزولی قوی)", strength: 9.0 },
|
| 432 |
+
{ time: "15:55", price: 25250, type: "فروش - الگوی کندلی نزولی", description: "الگوی کندلی ستاره تیرانداز (نشانگر احتمال برگشت نزولی)", strength: 7.5 },
|
| 433 |
+
{ time: "17:30", price: 25280, type: "فروش - نزدیک به مقاومت", description: "قیمت 0.5٪ پایینتر از سطح مقاومت", strength: 8.0 },
|
| 434 |
+
{ time: "19:15", price: 25330, type: "فروش - شکاف نقدینگی صعودی", description: "شکاف نقدینگی صعودی قوی (احتمال پر شدن شکاف)", strength: 8.5 }
|
| 435 |
+
],
|
| 436 |
+
whaleStrategies: [
|
| 437 |
+
{ time: "10:45", price: 24680, type: "انباشت پس از وایپاوت", description: "انباشت نهنگ 3 کندل پس از وایپاوت کوتاهمدت خفیف", volume: 8500000, ratio: 1.9, probability: 85 },
|
| 438 |
+
{ time: "12:30", price: 24820, type: "انباشت در نزدیکی حمایت", description: "انباشت نهنگ در فاصله 0.8٪ از حمایت 24500", volume: 9200000, ratio: 2.1, probability: 88 },
|
| 439 |
+
{ time: "13:40", price: 25300, type: "توزیع در نزدیکی مقاومت", description: "توزیع نهنگ در فاصله 0.5٪ از مقاومت 25400", volume: 7800000, ratio: 1.8, probability: 82 },
|
| 440 |
+
{ time: "15:20", price: 25150, type: "توزیع در RSI بالا", description: "توزیع نهنگ در RSI = 70.5 (اشباع خرید)", volume: 6500000, ratio: 1.6, probability: 75 }
|
| 441 |
+
],
|
| 442 |
+
candleExplanations: [
|
| 443 |
+
{ pattern: "دوجی", description: "نشانگر تردید بازار و احتمال تغییر روند" },
|
| 444 |
+
{ pattern: "چکش", description: "نشانگر پایان روند نزولی و برگشت صعودی" },
|
| 445 |
+
{ pattern: "چکش وارونه", description: "نشانگر احتمال برگشت صعودی" },
|
| 446 |
+
{ pattern: "ستاره تیرانداز", description: "نشانگر پایان روند صعودی و برگشت نزولی" },
|
| 447 |
+
{ pattern: "مرد آویزان", description: "نشانگر احتمال برگشت نزولی" },
|
| 448 |
+
{ pattern: "سنجاق", description: "نشانگر بازگشت قوی در خلاف جهت سایه بلند" },
|
| 449 |
+
{ pattern: "استاندارد", description: "کندل معمولی بدون الگوی خاص" }
|
| 450 |
+
]
|
| 451 |
+
};
|
| 452 |
+
|
| 453 |
+
// Generate time series data for charts
|
| 454 |
+
function generateTimeSeriesData() {
|
| 455 |
+
const times = [];
|
| 456 |
+
const prices = [];
|
| 457 |
+
const volumes = [];
|
| 458 |
+
const rsiValues = [];
|
| 459 |
+
const macdValues = [];
|
| 460 |
+
const signalValues = [];
|
| 461 |
+
const histogramValues = [];
|
| 462 |
+
const bbUpper = [];
|
| 463 |
+
const bbMiddle = [];
|
| 464 |
+
const bbLower = [];
|
| 465 |
+
|
| 466 |
+
// Generate 24 hours of data (1440 minutes)
|
| 467 |
+
const basePrice = 24500;
|
| 468 |
+
for (let i = 0; i < 1440; i += 5) {
|
| 469 |
+
const hour = Math.floor(i / 60);
|
| 470 |
+
const minute = i % 60;
|
| 471 |
+
const timeStr = `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
|
| 472 |
+
times.push(timeStr);
|
| 473 |
+
|
| 474 |
+
// Simulate price movement
|
| 475 |
+
const price = basePrice + Math.sin(i / 100) * 500 + Math.random() * 200 - 100;
|
| 476 |
+
prices.push(price);
|
| 477 |
+
|
| 478 |
+
// Simulate volume
|
| 479 |
+
const volume = 3000000 + Math.sin(i / 50) * 2000000 + Math.random() * 1000000;
|
| 480 |
+
volumes.push(volume);
|
| 481 |
+
|
| 482 |
+
// Simulate RSI
|
| 483 |
+
const rsi = 50 + Math.sin(i / 80) * 30 + Math.random() * 5;
|
| 484 |
+
rsiValues.push(rsi);
|
| 485 |
+
|
| 486 |
+
// Simulate MACD
|
| 487 |
+
const macd = Math.sin(i / 60) * 150 + Math.random() * 20;
|
| 488 |
+
macdValues.push(macd);
|
| 489 |
+
const signal = macd - 30 + Math.random() * 15;
|
| 490 |
+
signalValues.push(signal);
|
| 491 |
+
histogramValues.push(macd - signal);
|
| 492 |
+
|
| 493 |
+
// Simulate Bollinger Bands
|
| 494 |
+
const bbMid = price;
|
| 495 |
+
const bbUp = price + 200 + Math.random() * 100;
|
| 496 |
+
const bbLow = price - 200 - Math.random() * 100;
|
| 497 |
+
bbUpper.push(bbUp);
|
| 498 |
+
bbMiddle.push(bbMid);
|
| 499 |
+
bbLower.push(bbLow);
|
| 500 |
+
}
|
| 501 |
+
|
| 502 |
+
return {
|
| 503 |
+
times,
|
| 504 |
+
prices,
|
| 505 |
+
volumes,
|
| 506 |
+
rsiValues,
|
| 507 |
+
macdValues,
|
| 508 |
+
signalValues,
|
| 509 |
+
histogramValues,
|
| 510 |
+
bbUpper,
|
| 511 |
+
bbMiddle,
|
| 512 |
+
bbLower
|
| 513 |
+
};
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
// Create charts
|
| 517 |
+
function createCharts() {
|
| 518 |
+
const chartData = generateTimeSeriesData();
|
| 519 |
+
|
| 520 |
+
// Price and Volume Chart
|
| 521 |
+
const priceCtx = document.getElementById('price-volume-chart').getContext('2d');
|
| 522 |
+
const priceChart = new Chart(priceCtx, {
|
| 523 |
+
type: 'line',
|
| 524 |
+
data: {
|
| 525 |
+
labels: chartData.times,
|
| 526 |
+
datasets: [
|
| 527 |
+
{
|
| 528 |
+
label: 'قیمت بستهشدن',
|
| 529 |
+
data: chartData.prices,
|
| 530 |
+
borderColor: 'rgba(59, 130, 246, 1)',
|
| 531 |
+
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
| 532 |
+
borderWidth: 2,
|
| 533 |
+
tension: 0.1,
|
| 534 |
+
yAxisID: 'y'
|
| 535 |
+
},
|
| 536 |
+
{
|
| 537 |
+
label: 'حجم معاملات',
|
| 538 |
+
data: chartData.volumes,
|
| 539 |
+
backgroundColor: 'rgba(107, 114, 128, 0.5)',
|
| 540 |
+
borderColor: 'rgba(107, 114, 128, 1)',
|
| 541 |
+
borderWidth: 1,
|
| 542 |
+
type: 'bar',
|
| 543 |
+
yAxisID: 'y1'
|
| 544 |
+
}
|
| 545 |
+
]
|
| 546 |
+
},
|
| 547 |
+
options: {
|
| 548 |
+
responsive: true,
|
| 549 |
+
maintainAspectRatio: false,
|
| 550 |
+
interaction: {
|
| 551 |
+
mode: 'index',
|
| 552 |
+
intersect: false,
|
| 553 |
+
},
|
| 554 |
+
plugins: {
|
| 555 |
+
tooltip: {
|
| 556 |
+
enabled: false,
|
| 557 |
+
external: function(context) {
|
| 558 |
+
const tooltip = document.getElementById('price-tooltip');
|
| 559 |
+
if (context.tooltip.opacity === 0) {
|
| 560 |
+
tooltip.style.display = 'none';
|
| 561 |
+
return;
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
const dataIndex = context.tooltip.dataPoints[0].dataIndex;
|
| 565 |
+
const price = context.tooltip.dataPoints[0].raw.toLocaleString();
|
| 566 |
+
const volume = context.tooltip.dataPoints[1].raw.toLocaleString();
|
| 567 |
+
|
| 568 |
+
tooltip.innerHTML = `
|
| 569 |
+
<div>زمان: ${chartData.times[dataIndex]}</div>
|
| 570 |
+
<div>قیمت: ${price} USDT</div>
|
| 571 |
+
<div>حجم: ${volume} USDT</div>
|
| 572 |
+
`;
|
| 573 |
+
|
| 574 |
+
tooltip.style.display = 'block';
|
| 575 |
+
tooltip.style.left = context.tooltip.caretX + 'px';
|
| 576 |
+
tooltip.style.top = context.tooltip.caretY + 'px';
|
| 577 |
+
}
|
| 578 |
+
},
|
| 579 |
+
legend: {
|
| 580 |
+
position: 'top',
|
| 581 |
+
rtl: true
|
| 582 |
+
}
|
| 583 |
+
},
|
| 584 |
+
scales: {
|
| 585 |
+
x: {
|
| 586 |
+
grid: {
|
| 587 |
+
display: false
|
| 588 |
+
}
|
| 589 |
+
},
|
| 590 |
+
y: {
|
| 591 |
+
type: 'linear',
|
| 592 |
+
display: true,
|
| 593 |
+
position: 'left',
|
| 594 |
+
title: {
|
| 595 |
+
display: true,
|
| 596 |
+
text: 'قیمت (USDT)'
|
| 597 |
+
}
|
| 598 |
+
},
|
| 599 |
+
y1: {
|
| 600 |
+
type: 'linear',
|
| 601 |
+
display: true,
|
| 602 |
+
position: 'right',
|
| 603 |
+
grid: {
|
| 604 |
+
drawOnChartArea: false
|
| 605 |
+
},
|
| 606 |
+
title: {
|
| 607 |
+
display: true,
|
| 608 |
+
text: 'حجم (USDT)'
|
| 609 |
+
}
|
| 610 |
+
}
|
| 611 |
+
}
|
| 612 |
+
}
|
| 613 |
+
});
|
| 614 |
+
|
| 615 |
+
// RSI Chart
|
| 616 |
+
const rsiCtx = document.getElementById('rsi-chart').getContext('2d');
|
| 617 |
+
const rsiChart = new Chart(rsiCtx, {
|
| 618 |
+
type: 'line',
|
| 619 |
+
data: {
|
| 620 |
+
labels: chartData.times,
|
| 621 |
+
datasets: [
|
| 622 |
+
{
|
| 623 |
+
label: 'RSI',
|
| 624 |
+
data: chartData.rsiValues,
|
| 625 |
+
borderColor: 'rgba(124, 58, 237, 1)',
|
| 626 |
+
backgroundColor: 'rgba(124, 58, 237, 0.1)',
|
| 627 |
+
borderWidth: 2,
|
| 628 |
+
tension: 0.1
|
| 629 |
+
}
|
| 630 |
+
]
|
| 631 |
+
},
|
| 632 |
+
options: {
|
| 633 |
+
responsive: true,
|
| 634 |
+
maintainAspectRatio: false,
|
| 635 |
+
plugins: {
|
| 636 |
+
tooltip: {
|
| 637 |
+
enabled: false,
|
| 638 |
+
external: function(context) {
|
| 639 |
+
const tooltip = document.getElementById('rsi-tooltip');
|
| 640 |
+
if (context.tooltip.opacity === 0) {
|
| 641 |
+
tooltip.style.display = 'none';
|
| 642 |
+
return;
|
| 643 |
+
}
|
| 644 |
+
|
| 645 |
+
const dataIndex = context.tooltip.dataPoints[0].dataIndex;
|
| 646 |
+
const rsi = context.tooltip.dataPoints[0].raw.toFixed(2);
|
| 647 |
+
let status = '';
|
| 648 |
+
if (rsi > 70) status = '(اشباع خرید)';
|
| 649 |
+
if (rsi < 30) status = '(اشباع فروش)';
|
| 650 |
+
|
| 651 |
+
tooltip.innerHTML = `
|
| 652 |
+
<div>زمان: ${chartData.times[dataIndex]}</div>
|
| 653 |
+
<div>RSI: ${rsi} ${status}</div>
|
| 654 |
+
`;
|
| 655 |
+
|
| 656 |
+
tooltip.style.display = 'block';
|
| 657 |
+
tooltip.style.left = context.tooltip.caretX + 'px';
|
| 658 |
+
tooltip.style.top = context.tooltip.caretY + 'px';
|
| 659 |
+
}
|
| 660 |
+
},
|
| 661 |
+
legend: {
|
| 662 |
+
position: 'top',
|
| 663 |
+
rtl: true
|
| 664 |
+
},
|
| 665 |
+
annotation: {
|
| 666 |
+
annotations: {
|
| 667 |
+
overbought: {
|
| 668 |
+
type: 'line',
|
| 669 |
+
yMin: 70,
|
| 670 |
+
yMax: 70,
|
| 671 |
+
borderColor: 'rgba(239, 68, 68, 0.7)',
|
| 672 |
+
borderWidth: 1,
|
| 673 |
+
borderDash: [6, 6],
|
| 674 |
+
label: {
|
| 675 |
+
content: 'اشباع خرید',
|
| 676 |
+
enabled: true,
|
| 677 |
+
position: 'left'
|
| 678 |
+
}
|
| 679 |
+
},
|
| 680 |
+
oversold: {
|
| 681 |
+
type: 'line',
|
| 682 |
+
yMin: 30,
|
| 683 |
+
yMax: 30,
|
| 684 |
+
borderColor: 'rgba(16, 185, 129, 0.7)',
|
| 685 |
+
borderWidth: 1,
|
| 686 |
+
borderDash: [6, 6],
|
| 687 |
+
label: {
|
| 688 |
+
content: 'اشباع فروش',
|
| 689 |
+
enabled: true,
|
| 690 |
+
position: 'left'
|
| 691 |
+
}
|
| 692 |
+
}
|
| 693 |
+
}
|
| 694 |
+
}
|
| 695 |
+
},
|
| 696 |
+
scales: {
|
| 697 |
+
x: {
|
| 698 |
+
grid: {
|
| 699 |
+
display: false
|
| 700 |
+
}
|
| 701 |
+
},
|
| 702 |
+
y: {
|
| 703 |
+
min: 0,
|
| 704 |
+
max: 100,
|
| 705 |
+
ticks: {
|
| 706 |
+
stepSize: 10
|
| 707 |
+
}
|
| 708 |
+
}
|
| 709 |
+
}
|
| 710 |
+
}
|
| 711 |
+
});
|
| 712 |
+
|
| 713 |
+
// MACD Chart
|
| 714 |
+
const macdCtx = document.getElementById('macd-chart').getContext('2d');
|
| 715 |
+
const macdChart = new Chart(macdCtx, {
|
| 716 |
+
type: 'line',
|
| 717 |
+
data: {
|
| 718 |
+
labels: chartData.times,
|
| 719 |
+
datasets: [
|
| 720 |
+
{
|
| 721 |
+
label: 'MACD',
|
| 722 |
+
data: chartData.macdValues,
|
| 723 |
+
borderColor: 'rgba(59, 130, 246, 1)',
|
| 724 |
+
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
| 725 |
+
borderWidth: 2,
|
| 726 |
+
tension: 0.1
|
| 727 |
+
},
|
| 728 |
+
{
|
| 729 |
+
label: 'سیگنال',
|
| 730 |
+
data: chartData.signalValues,
|
| 731 |
+
borderColor: 'rgba(239, 68, 68, 1)',
|
| 732 |
+
backgroundColor: 'rgba(239, 68, 68, 0.1)',
|
| 733 |
+
borderWidth: 2,
|
| 734 |
+
tension: 0.1
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
label: 'هیستوگرام',
|
| 738 |
+
data: chartData.histogramValues,
|
| 739 |
+
backgroundColor: chartData.histogramValues.map(val =>
|
| 740 |
+
val >= 0 ? 'rgba(16, 185, 129, 0.7)' : 'rgba(239, 68, 68, 0.7)'
|
| 741 |
+
),
|
| 742 |
+
borderColor: chartData.histogramValues.map(val =>
|
| 743 |
+
val >= 0 ? 'rgba(16, 185, 129, 1)' : 'rgba(239, 68, 68, 1)'
|
| 744 |
+
),
|
| 745 |
+
borderWidth: 1,
|
| 746 |
+
type: 'bar'
|
| 747 |
+
}
|
| 748 |
+
]
|
| 749 |
+
},
|
| 750 |
+
options: {
|
| 751 |
+
responsive: true,
|
| 752 |
+
maintainAspectRatio: false,
|
| 753 |
+
plugins: {
|
| 754 |
+
tooltip: {
|
| 755 |
+
enabled: false,
|
| 756 |
+
external: function(context) {
|
| 757 |
+
const tooltip = document.getElementById('macd-tooltip');
|
| 758 |
+
if (context.tooltip.opacity === 0) {
|
| 759 |
+
tooltip.style.display = 'none';
|
| 760 |
+
return;
|
| 761 |
+
}
|
| 762 |
+
|
| 763 |
+
const dataIndex = context.tooltip.dataPoints[0].dataIndex;
|
| 764 |
+
const macd = context.tooltip.dataPoints[0].raw.toFixed(2);
|
| 765 |
+
const signal = context.tooltip.dataPoints[1].raw.toFixed(2);
|
| 766 |
+
const hist = context.tooltip.dataPoints[2].raw.toFixed(2);
|
| 767 |
+
let signalType = '';
|
| 768 |
+
if (macd > signal) signalType = '(سیگنال صعودی)';
|
| 769 |
+
if (macd < signal) signalType = '(سیگنال نزولی)';
|
| 770 |
+
|
| 771 |
+
tooltip.innerHTML = `
|
| 772 |
+
<div>زمان: ${chartData.times[dataIndex]}</div>
|
| 773 |
+
<div>MACD: ${macd}</div>
|
| 774 |
+
<div>سیگنال: ${signal}</div>
|
| 775 |
+
<div>هیستوگرام: ${hist} ${signalType}</div>
|
| 776 |
+
`;
|
| 777 |
+
|
| 778 |
+
tooltip.style.display = 'block';
|
| 779 |
+
tooltip.style.left = context.tooltip.caretX + 'px';
|
| 780 |
+
tooltip.style.top = context.tooltip.caretY + 'px';
|
| 781 |
+
}
|
| 782 |
+
},
|
| 783 |
+
legend: {
|
| 784 |
+
position: 'top',
|
| 785 |
+
rtl: true
|
| 786 |
+
}
|
| 787 |
+
},
|
| 788 |
+
scales: {
|
| 789 |
+
x: {
|
| 790 |
+
grid: {
|
| 791 |
+
display: false
|
| 792 |
+
}
|
| 793 |
+
}
|
| 794 |
+
}
|
| 795 |
+
}
|
| 796 |
+
});
|
| 797 |
+
|
| 798 |
+
// Bollinger Bands Chart
|
| 799 |
+
const bbCtx = document.getElementById('bollinger-chart').getContext('2d');
|
| 800 |
+
const bbChart = new Chart(bbCtx, {
|
| 801 |
+
type: 'line',
|
| 802 |
+
data: {
|
| 803 |
+
labels: chartData.times,
|
| 804 |
+
datasets: [
|
| 805 |
+
{
|
| 806 |
+
label: 'قیمت',
|
| 807 |
+
data: chartData.prices,
|
| 808 |
+
borderColor: 'rgba(59, 130, 246, 1)',
|
| 809 |
+
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
| 810 |
+
borderWidth: 2,
|
| 811 |
+
tension: 0.1
|
| 812 |
+
},
|
| 813 |
+
{
|
| 814 |
+
label: 'باند بالا',
|
| 815 |
+
data: chartData.bbUpper,
|
| 816 |
+
borderColor: 'rgba(239, 68, 68, 1)',
|
| 817 |
+
backgroundColor: 'rgba(239, 68, 68, 0.1)',
|
| 818 |
+
borderWidth: 1,
|
| 819 |
+
borderDash: [5, 5],
|
| 820 |
+
tension: 0.1
|
| 821 |
+
},
|
| 822 |
+
{
|
| 823 |
+
label: 'باند میانی',
|
| 824 |
+
data: chartData.bbMiddle,
|
| 825 |
+
borderColor: 'rgba(156, 163, 175, 1)',
|
| 826 |
+
backgroundColor: 'rgba(156, 163, 175, 0.1)',
|
| 827 |
+
borderWidth: 1,
|
| 828 |
+
tension: 0.1
|
| 829 |
+
},
|
| 830 |
+
{
|
| 831 |
+
label: 'باند پایین',
|
| 832 |
+
data: chartData.bbLower,
|
| 833 |
+
borderColor: 'rgba(16, 185, 129, 1)',
|
| 834 |
+
backgroundColor: 'rgba(16, 185, 129, 0.1)',
|
| 835 |
+
borderWidth: 1,
|
| 836 |
+
borderDash: [5, 5],
|
| 837 |
+
tension: 0.1
|
| 838 |
+
}
|
| 839 |
+
]
|
| 840 |
+
},
|
| 841 |
+
options: {
|
| 842 |
+
responsive: true,
|
| 843 |
+
maintainAspectRatio: false,
|
| 844 |
+
plugins: {
|
| 845 |
+
tooltip: {
|
| 846 |
+
enabled: false,
|
| 847 |
+
external: function(context) {
|
| 848 |
+
const tooltip = document.getElementById('bollinger-tooltip');
|
| 849 |
+
if (context.tooltip.opacity === 0) {
|
| 850 |
+
tooltip.style.display = 'none';
|
| 851 |
+
return;
|
| 852 |
+
}
|
| 853 |
+
|
| 854 |
+
const dataIndex = context.tooltip.dataPoints[0].dataIndex;
|
| 855 |
+
const price = context.tooltip.dataPoints[0].raw.toLocaleString();
|
| 856 |
+
const upper = context.tooltip.dataPoints[1].raw.toLocaleString();
|
| 857 |
+
const middle = context.tooltip.dataPoints[2].raw.toLocaleString();
|
| 858 |
+
const lower = context.tooltip.dataPoints[3].raw.toLocaleString();
|
| 859 |
+
|
| 860 |
+
tooltip.innerHTML = `
|
| 861 |
+
<div>زمان: ${chartData.times[dataIndex]}</div>
|
| 862 |
+
<div>قیمت: ${price} USDT</div>
|
| 863 |
+
<div>باند بالا: ${upper} USDT</div>
|
| 864 |
+
<div>باند میانی: ${middle} USDT</div>
|
| 865 |
+
<div>باند پایین: ${lower} USDT</div>
|
| 866 |
+
`;
|
| 867 |
+
|
| 868 |
+
tooltip.style.display = 'block';
|
| 869 |
+
tooltip.style.left = context.tooltip.caretX + 'px';
|
| 870 |
+
tooltip.style.top = context.tooltip.caretY + 'px';
|
| 871 |
+
}
|
| 872 |
+
},
|
| 873 |
+
legend: {
|
| 874 |
+
position: 'top',
|
| 875 |
+
rtl: true
|
| 876 |
+
}
|
| 877 |
+
},
|
| 878 |
+
scales: {
|
| 879 |
+
x: {
|
| 880 |
+
grid: {
|
| 881 |
+
display: false
|
| 882 |
+
}
|
| 883 |
+
}
|
| 884 |
+
}
|
| 885 |
+
}
|
| 886 |
+
});
|
| 887 |
+
}
|
| 888 |
+
|
| 889 |
+
// Format numbers with commas
|
| 890 |
+
function formatNumber(num) {
|
| 891 |
+
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
| 892 |
+
}
|
| 893 |
+
|
| 894 |
+
// Render summary stats
|
| 895 |
+
function renderSummaryStats(data) {
|
| 896 |
+
const summaryStats = document.getElementById('summary-stats');
|
| 897 |
+
const summaryTable = document.getElementById('summary-table');
|
| 898 |
+
|
| 899 |
+
// Summary cards
|
| 900 |
+
summaryStats.innerHTML = `
|
| 901 |
+
<div class="bg-blue-50 border border-blue-200 rounded-lg p-4">
|
| 902 |
+
<div class="text-blue-800 text-sm font-medium">قیمت بازشدن</div>
|
| 903 |
+
<div class="text-2xl font-bold text-blue-900">${formatNumber(data.summary.open)} USDT</div>
|
| 904 |
+
</div>
|
| 905 |
+
<div class="bg-green-50 border border-green-200 rounded-lg p-4">
|
| 906 |
+
<div class="text-green-800 text-sm font-medium">قیمت بستهشدن</div>
|
| 907 |
+
<div class="text-2xl font-bold text-green-900">${formatNumber(data.summary.close)} USDT</div>
|
| 908 |
+
</div>
|
| 909 |
+
<div class="bg-purple-50 border border-purple-200 rounded-lg p-4">
|
| 910 |
+
<div class="text-purple-800 text-sm font-medium">تغییرات روزانه</div>
|
| 911 |
+
<div class="text-2xl font-bold ${data.summary.dailyChange >= 0 ? 'text-green-600' : 'text-red-600'}">
|
| 912 |
+
${data.summary.dailyChange >= 0 ? '+' : ''}${data.summary.dailyChange}%
|
| 913 |
+
</div>
|
| 914 |
+
</div>
|
| 915 |
+
`;
|
| 916 |
+
|
| 917 |
+
// Summary table
|
| 918 |
+
summaryTable.innerHTML = `
|
| 919 |
+
<tr>
|
| 920 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">بالاترین قیمت روز</td>
|
| 921 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${formatNumber(data.summary.high)} USDT</td>
|
| 922 |
+
</tr>
|
| 923 |
+
<tr>
|
| 924 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">پایینترین قیمت روز</td>
|
| 925 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${formatNumber(data.summary.low)} USDT</td>
|
| 926 |
+
</tr>
|
| 927 |
+
<tr>
|
| 928 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">میانگین قیمت روز</td>
|
| 929 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${formatNumber(data.summary.avgPrice)} USDT</td>
|
| 930 |
+
</tr>
|
| 931 |
+
<tr>
|
| 932 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">مجموع حجم روز</td>
|
| 933 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${formatNumber(data.summary.totalVolume)} USDT</td>
|
| 934 |
+
</tr>
|
| 935 |
+
<tr>
|
| 936 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">میانگین حجم</td>
|
| 937 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${formatNumber(data.summary.avgVolume)} USDT</td>
|
| 938 |
+
</tr>
|
| 939 |
+
<tr>
|
| 940 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">انحراف معیار قیمت</td>
|
| 941 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${formatNumber(data.summary.stdDev)} USDT</td>
|
| 942 |
+
</tr>
|
| 943 |
+
<tr>
|
| 944 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">تعداد دقایق منفی</td>
|
| 945 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${data.summary.negativeMinutes}</td>
|
| 946 |
+
</tr>
|
| 947 |
+
<tr>
|
| 948 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">تعداد دقایق مثبت</td>
|
| 949 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${data.summary.positiveMinutes}</td>
|
| 950 |
+
</tr>
|
| 951 |
+
`;
|
| 952 |
+
}
|
| 953 |
+
|
| 954 |
+
// Render signals
|
| 955 |
+
function renderSignals(data) {
|
| 956 |
+
const buySignalsTable = document.getElementById('buy-signals');
|
| 957 |
+
const sellSignalsTable = document.getElementById('sell-signals');
|
| 958 |
+
|
| 959 |
+
// Buy signals
|
| 960 |
+
buySignalsTable.innerHTML = data.buySignals.map(signal => `
|
| 961 |
+
<tr>
|
| 962 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${signal.time}</td>
|
| 963 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${formatNumber(signal.price)} USDT</td>
|
| 964 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">${signal.type}</td>
|
| 965 |
+
<td class="px-6 py-4 text-sm text-gray-500">${signal.description}</td>
|
| 966 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-bold ${signal.strength >= 8 ? 'text-green-600' : signal.strength >= 5 ? 'text-blue-600' : 'text-gray-600'}">
|
| 967 |
+
${signal.strength}/10
|
| 968 |
+
</td>
|
| 969 |
+
</tr>
|
| 970 |
+
`).join('');
|
| 971 |
+
|
| 972 |
+
// Sell signals
|
| 973 |
+
sellSignalsTable.innerHTML = data.sellSignals.map(signal => `
|
| 974 |
+
<tr>
|
| 975 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${signal.time}</td>
|
| 976 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${formatNumber(signal.price)} USDT</td>
|
| 977 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">${signal.type}</td>
|
| 978 |
+
<td class="px-6 py-4 text-sm text-gray-500">${signal.description}</td>
|
| 979 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-bold ${signal.strength >= 8 ? 'text-red-600' : signal.strength >= 5 ? 'text-blue-600' : 'text-gray-600'}">
|
| 980 |
+
${signal.strength}/10
|
| 981 |
+
</td>
|
| 982 |
+
</tr>
|
| 983 |
+
`).join('');
|
| 984 |
+
}
|
| 985 |
+
|
| 986 |
+
// Render whale activity
|
| 987 |
+
function renderWhaleActivity(data) {
|
| 988 |
+
const whaleStats = document.getElementById('whale-stats');
|
| 989 |
+
const whaleStrategiesTable = document.getElementById('whale-strategies');
|
| 990 |
+
const wipeoutsTable = document.getElementById('wipeouts');
|
| 991 |
+
const gapsTable = document.getElementById('liquidity-gaps');
|
| 992 |
+
|
| 993 |
+
// Whale stats
|
| 994 |
+
whaleStats.innerHTML = `
|
| 995 |
+
<div class="bg-green-50 border border-green-200 rounded-lg p-4">
|
| 996 |
+
<div class="text-green-800 text-sm font-medium">انباشت نهنگ</div>
|
| 997 |
+
<div class="text-2xl font-bold text-green-900">${data.whale.accumulations}</div>
|
| 998 |
+
</div>
|
| 999 |
+
<div class="bg-red-50 border border-red-200 rounded-lg p-4">
|
| 1000 |
+
<div class="text-red-800 text-sm font-medium">توزیع نهنگ</div>
|
| 1001 |
+
<div class="text-2xl font-bold text-red-900">${data.whale.distributions}</div>
|
| 1002 |
+
</div>
|
| 1003 |
+
<div class="bg-purple-50 border border-purple-200 rounded-lg p-4">
|
| 1004 |
+
<div class="text-purple-800 text-sm font-medium">قدرت نهنگ کل</div>
|
| 1005 |
+
<div class="text-2xl font-bold ${data.whale.totalPower >= 0 ? 'text-green-600' : 'text-red-600'}">
|
| 1006 |
+
${data.whale.totalPower >= 0 ? '+' : ''}${data.whale.totalPower}
|
| 1007 |
+
</div>
|
| 1008 |
+
</div>
|
| 1009 |
+
<div class="bg-blue-50 border border-blue-200 rounded-lg p-4">
|
| 1010 |
+
<div class="text-blue-800 text-sm font-medium">میانگین قدرت نهنگ</div>
|
| 1011 |
+
<div class="text-2xl font-bold ${data.whale.avgPower >= 0 ? 'text-green-600' : 'text-red-600'}">
|
| 1012 |
+
${data.whale.avgPower >= 0 ? '+' : ''}${data.whale.avgPower.toFixed(1)}
|
| 1013 |
+
</div>
|
| 1014 |
+
</div>
|
| 1015 |
+
`;
|
| 1016 |
+
|
| 1017 |
+
// Whale strategies
|
| 1018 |
+
whaleStrategiesTable.innerHTML = data.whaleStrategies.map(strategy => `
|
| 1019 |
+
<tr>
|
| 1020 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${strategy.time}</td>
|
| 1021 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${formatNumber(strategy.price)} USDT</td>
|
| 1022 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">${strategy.type}</td>
|
| 1023 |
+
<td class="px-6 py-4 text-sm text-gray-500">${strategy.description}</td>
|
| 1024 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${formatNumber(strategy.volume)} USDT</td>
|
| 1025 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-bold ${strategy.probability >= 80 ? 'text-green-600' : strategy.probability >= 60 ? 'text-blue-600' : 'text-red-600'}">
|
| 1026 |
+
${strategy.probability}%
|
| 1027 |
+
</td>
|
| 1028 |
+
</tr>
|
| 1029 |
+
`).join('');
|
| 1030 |
+
|
| 1031 |
+
// Wipeouts
|
| 1032 |
+
wipeoutsTable.innerHTML = data.wipeouts.map(wipeout => `
|
| 1033 |
+
<tr>
|
| 1034 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">${wipeout.type}</td>
|
| 1035 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${wipeout.count}</td>
|
| 1036 |
+
</tr>
|
| 1037 |
+
`).join('');
|
| 1038 |
+
|
| 1039 |
+
// Liquidity gaps
|
| 1040 |
+
gapsTable.innerHTML = data.gaps.map(gap => `
|
| 1041 |
+
<tr>
|
| 1042 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">${gap.type}</td>
|
| 1043 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${gap.count}</td>
|
| 1044 |
+
</tr>
|
| 1045 |
+
`).join('');
|
| 1046 |
+
}
|
| 1047 |
+
|
| 1048 |
+
// Render candle patterns
|
| 1049 |
+
function renderCandlePatterns(data) {
|
| 1050 |
+
const candlePatternsTable = document.getElementById('candle-patterns');
|
| 1051 |
+
const candleExplanationsDiv = document.getElementById('candle-explanations');
|
| 1052 |
+
|
| 1053 |
+
// Candle patterns
|
| 1054 |
+
candlePatternsTable.innerHTML = `
|
| 1055 |
+
<tr>
|
| 1056 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">دوجی</td>
|
| 1057 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${data.patterns.doji}</td>
|
| 1058 |
+
</tr>
|
| 1059 |
+
<tr>
|
| 1060 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">چکش</td>
|
| 1061 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${data.patterns.hammer}</td>
|
| 1062 |
+
</tr>
|
| 1063 |
+
<tr>
|
| 1064 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">چکش وارونه</td>
|
| 1065 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${data.patterns.invertedHammer}</td>
|
| 1066 |
+
</tr>
|
| 1067 |
+
<tr>
|
| 1068 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">ستاره تیرانداز</td>
|
| 1069 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${data.patterns.shootingStar}</td>
|
| 1070 |
+
</tr>
|
| 1071 |
+
<tr>
|
| 1072 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">مرد آویزان</td>
|
| 1073 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${data.patterns.hangingMan}</td>
|
| 1074 |
+
</tr>
|
| 1075 |
+
<tr>
|
| 1076 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">سنجاق</td>
|
| 1077 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${data.patterns.pinBar}</td>
|
| 1078 |
+
</tr>
|
| 1079 |
+
<tr>
|
| 1080 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">استاندارد</td>
|
| 1081 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${data.patterns.standard}</td>
|
| 1082 |
+
</tr>
|
| 1083 |
+
`;
|
| 1084 |
+
|
| 1085 |
+
// Candle explanations
|
| 1086 |
+
candleExplanationsDiv.innerHTML = data.candleExplanations.map(exp => `
|
| 1087 |
+
<div class="flex items-start">
|
| 1088 |
+
<div class="flex-shrink-0 h-5 w-5 text-blue-500 mt-0.5">
|
| 1089 |
+
<i class="fas fa-info-circle"></i>
|
| 1090 |
+
</div>
|
| 1091 |
+
<div class="ml-2">
|
| 1092 |
+
<span class="font-medium">${exp.pattern}:</span> ${exp.description}
|
| 1093 |
+
</div>
|
| 1094 |
+
</div>
|
| 1095 |
+
`).join('');
|
| 1096 |
+
}
|
| 1097 |
+
|
| 1098 |
+
// Analyze button click handler
|
| 1099 |
+
document.getElementById('analyze-btn').addEventListener('click', function() {
|
| 1100 |
+
const dateInput = document.getElementById('analysis-date').value;
|
| 1101 |
+
|
| 1102 |
+
// Show loading indicator
|
| 1103 |
+
document.getElementById('loading-indicator').classList.remove('hidden');
|
| 1104 |
+
document.getElementById('analysis-results').classList.add('hidden');
|
| 1105 |
+
|
| 1106 |
+
// Simulate analysis delay
|
| 1107 |
+
setTimeout(function() {
|
| 1108 |
+
// Hide loading indicator
|
| 1109 |
+
document.getElementById('loading-indicator').classList.add('hidden');
|
| 1110 |
+
|
| 1111 |
+
// Show results
|
| 1112 |
+
document.getElementById('analysis-results').classList.remove('hidden');
|
| 1113 |
+
|
| 1114 |
+
// Render data
|
| 1115 |
+
renderSummaryStats(sampleData);
|
| 1116 |
+
renderSignals(sampleData);
|
| 1117 |
+
renderWhaleActivity(sampleData);
|
| 1118 |
+
renderCandlePatterns(sampleData);
|
| 1119 |
+
createCharts();
|
| 1120 |
+
|
| 1121 |
+
// Scroll to results
|
| 1122 |
+
document.getElementById('analysis-results').scrollIntoView({
|
| 1123 |
+
behavior: 'smooth'
|
| 1124 |
+
});
|
| 1125 |
+
}, 2000);
|
| 1126 |
+
});
|
| 1127 |
+
|
| 1128 |
+
// Export buttons (just for demo)
|
| 1129 |
+
document.getElementById('export-excel').addEventListener('click', function() {
|
| 1130 |
+
alert('در حال دانلود گزا��ش اکسل... (این یک دمو است)');
|
| 1131 |
+
});
|
| 1132 |
+
|
| 1133 |
+
document.getElementById('export-pdf').addEventListener('click', function() {
|
| 1134 |
+
alert('در حال دانلود گزارش PDF... (این یک دمو است)');
|
| 1135 |
+
});
|
| 1136 |
+
|
| 1137 |
+
document.getElementById('export-charts').addEventListener('click', function() {
|
| 1138 |
+
alert('در حال دانلود نمودارها... (این یک دمو است)');
|
| 1139 |
+
});
|
| 1140 |
+
</script>
|
| 1141 |
+
<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=AqaHamedi/btc" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 1142 |
+
</html>
|