WormGPT128 commited on
Commit
c9b3acb
·
verified ·
1 Parent(s): a9adeb2

قم بتطوير هذا الكود واضافه أدوات واقوى فعليها <!DOCTYPE html> <html lang="en" class="dark"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>WormGPT Trader Pro</title> <script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <style> body { background-color: #0f172a; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } </style> </head> <body class="text-white"> <header class="p-4 bg-gray-900 shadow-md flex justify-between items-center"> <h1 class="text-2xl font-bold text-cyan-400">WormGPT Trader Pro</h1> <div> <button class="bg-cyan-600 px-3 py-1 rounded hover:bg-cyan-700">Light/Dark</button> <button class="bg-cyan-600 px-3 py-1 rounded hover:bg-cyan-700 ml-2">EN/AR</button> </div> </header> <main class="grid grid-cols-1 md:grid-cols-3 gap-4 p-4"> <!-- Chat Assistant --> <section class="md:col-span-1 bg-gray-800 p-4 rounded shadow"> <h2 class="text-xl font-semibold text-cyan-300 mb-2">💬 WormGPT Chat</h2> <textarea class="w-full h-40 p-2 rounded bg-gray-700 text-white" placeholder="Type /help, /analyze ..."></textarea> <button class="mt-2 bg-cyan-600 w-full py-1 rounded hover:bg-cyan-700">Send</button> </section> <!-- Trading Bot & Alerts --> <section class="md:col-span-2 grid grid-cols-1 lg:grid-cols-2 gap-4"> <!-- Auto Trading Bot --> <div class="bg-gray-800 p-4 rounded shadow"> <h2 class="text-xl font-semibold text-cyan-300 mb-2">🤖 Auto Trading Bot</h2> <p>Supports BTC, ETH, XRP with smart triggers.</p> <ul class="text-sm mt-2 list-disc pl-4"> <li>Buy when RSI < 30</li> <li>Sell when RSI > 70</li> <li>Auto Scheduler</li> </ul> <button class="mt-3 bg-green-600 w-full py-1 rounded hover:bg-green-700">Start Bot</button> </div> <!-- Alerts --> <div class="bg-gray-800 p-4 rounded shadow"> <h2 class="text-xl font-semibold text-cyan-300 mb-2">🚨 Smart Alerts</h2> <p>Real-time buy/sell alerts with reasons.</p> <p class="text-sm mt-2">Alerts sent to: Telegram, Email</p> <p class="text-xs mt-2 text-gray-400">Last Signal: BUY BTC - RSI 25 - 2025-06-18 18:45</p> </div> </section> <!-- Charting System --> <section class="md:col-span-3 bg-gray-800 p-4 rounded shadow"> <h2 class="text-xl font-semibold text-cyan-300 mb-2">📊 Interactive Chart</h2> <canvas id="chartCanvas" class="w-full h-64"></canvas> <div class="mt-2 flex gap-2"> <button class="bg-cyan-600 px-2 py-1 rounded text-sm">1m</button> <button class="bg-cyan-600 px-2 py-1 rounded text-sm">5m</button> <button class="bg-cyan-600 px-2 py-1 rounded text-sm">1h</button> <button class="bg-cyan-600 px-2 py-1 rounded text-sm">1d</button> </div> </section> <!-- Trend Analysis & Wallet --> <section class="md:col-span-1 bg-gray-800 p-4 rounded shadow"> <h2 class="text-xl font-semibold text-cyan-300 mb-2">📈 Trend Analysis</h2> <p>Current Market: <span class="text-green-400">Bullish</span></p> <p class="text-sm mt-1 text-gray-300">AI Suggests: BUY - Uptrend Detected</p> </section> <section class="md:col-span-2 bg-gray-800 p-4 rounded shadow"> <h2 class="text-xl font-semibold text-cyan-300 mb-2">👛 Wallet Management</h2> <div class="grid grid-cols-2 gap-4"> <div> <p>Total Holdings:</p> <p class="text-lg text-green-400">$12,450</p> </div> <div> <p>Profit/Loss:</p> <p class="text-lg text-yellow-400">+$650</p> </div> </div> <p class="text-sm mt-3">Last Transaction: SELL ETH - +$120</p> </section> </main> <footer class="text-center text-xs text-gray-500 p-4 mt-4"> WormGPT Trader Pro © 2025 | Secure | AI Powered | Customizable </footer> <script> const ctx = document.getElementById('chartCanvas').getContext('2d'); const chart = new Chart(ctx, { type: 'candlestick', // Replace with plugin if needed data: { datasets: [{ label: 'BTC/USDT', data: [ { x: '2025-06-18T18:00', o: 26500, h: 26700, l: 26400, c: 26650 }, { x: '2025-06-18T18:05', o: 26650, h: 26800, l: 26600, c: 26780 }, // More data points... ] }] }, options: { responsive: true, plugins: { legend: { display: false } } } }); </script> </body> </html> - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +6 -4
  2. index.html +1025 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Wormgpt
3
- emoji: 🏢
4
- colorFrom: red
5
  colorTo: blue
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: wormgpt
3
+ emoji: 🐳
4
+ colorFrom: blue
5
  colorTo: blue
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,1025 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" class="dark">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>WormGPT Trader Pro</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns"></script>
11
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
12
+ <style>
13
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
14
+
15
+ body {
16
+ background-color: #0f172a;
17
+ font-family: 'Inter', sans-serif;
18
+ }
19
+
20
+ .candle-tooltip {
21
+ background-color: rgba(0, 0, 0, 0.8);
22
+ border-radius: 6px;
23
+ padding: 8px;
24
+ font-size: 12px;
25
+ }
26
+
27
+ .chat-message {
28
+ animation: fadeIn 0.3s ease-in-out;
29
+ }
30
+
31
+ @keyframes fadeIn {
32
+ from { opacity: 0; transform: translateY(10px); }
33
+ to { opacity: 1; transform: translateY(0); }
34
+ }
35
+
36
+ .pulse {
37
+ animation: pulse 2s infinite;
38
+ }
39
+
40
+ @keyframes pulse {
41
+ 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
42
+ 70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
43
+ 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
44
+ }
45
+
46
+ .scrollbar-hide::-webkit-scrollbar {
47
+ display: none;
48
+ }
49
+
50
+ .scrollbar-hide {
51
+ -ms-overflow-style: none;
52
+ scrollbar-width: none;
53
+ }
54
+
55
+ .tradingview-widget-container {
56
+ height: 100%;
57
+ width: 100%;
58
+ }
59
+ </style>
60
+ </head>
61
+ <body class="text-white">
62
+ <header class="p-4 bg-gray-900 shadow-md flex justify-between items-center border-b border-gray-700">
63
+ <div class="flex items-center space-x-2">
64
+ <div class="w-8 h-8 bg-gradient-to-r from-cyan-500 to-blue-500 rounded-full flex items-center justify-center">
65
+ <i class="fas fa-robot text-white text-sm"></i>
66
+ </div>
67
+ <h1 class="text-2xl font-bold bg-gradient-to-r from-cyan-400 to-blue-500 bg-clip-text text-transparent">WormGPT Trader Pro</h1>
68
+ </div>
69
+ <div class="flex items-center space-x-4">
70
+ <div class="relative group">
71
+ <button id="themeToggle" class="bg-gray-800 px-3 py-1 rounded-lg hover:bg-gray-700 transition-all duration-200 flex items-center space-x-1">
72
+ <i class="fas fa-moon text-yellow-300"></i>
73
+ <span class="hidden md:inline">Dark</span>
74
+ </button>
75
+ </div>
76
+ <div class="relative group">
77
+ <button id="languageToggle" class="bg-gray-800 px-3 py-1 rounded-lg hover:bg-gray-700 transition-all duration-200 flex items-center space-x-1">
78
+ <i class="fas fa-language text-blue-400"></i>
79
+ <span class="hidden md:inline">EN</span>
80
+ </button>
81
+ </div>
82
+ <div class="relative group">
83
+ <button class="bg-gradient-to-r from-cyan-600 to-blue-600 px-4 py-1 rounded-lg hover:from-cyan-700 hover:to-blue-700 transition-all duration-200 flex items-center space-x-1">
84
+ <i class="fas fa-user-circle"></i>
85
+ <span class="hidden md:inline">Account</span>
86
+ </button>
87
+ </div>
88
+ </div>
89
+ </header>
90
+
91
+ <main class="grid grid-cols-1 md:grid-cols-3 gap-4 p-4 max-w-7xl mx-auto">
92
+ <!-- Chat Assistant -->
93
+ <section class="md:col-span-1 bg-gray-800 p-4 rounded-xl shadow-lg border border-gray-700">
94
+ <div class="flex justify-between items-center mb-3">
95
+ <h2 class="text-xl font-semibold bg-gradient-to-r from-cyan-300 to-blue-300 bg-clip-text text-transparent flex items-center">
96
+ <i class="fas fa-comment-dots mr-2"></i> WormGPT Chat
97
+ </h2>
98
+ <div class="flex space-x-2">
99
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg text-xs" title="Clear Chat">
100
+ <i class="fas fa-trash-alt"></i>
101
+ </button>
102
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg text-xs" title="Examples">
103
+ <i class="fas fa-lightbulb"></i>
104
+ </button>
105
+ </div>
106
+ </div>
107
+
108
+ <div id="chatContainer" class="h-64 bg-gray-900 rounded-lg p-3 mb-3 overflow-y-auto scrollbar-hide">
109
+ <div class="chat-message bg-gray-700 p-2 rounded-lg mb-2 text-sm">
110
+ <div class="flex items-start">
111
+ <div class="w-6 h-6 bg-cyan-600 rounded-full flex items-center justify-center mr-2">
112
+ <i class="fas fa-robot text-xs"></i>
113
+ </div>
114
+ <div>
115
+ <p class="font-medium text-cyan-400">WormGPT:</p>
116
+ <p>Welcome to WormGPT Trader Pro! How can I assist you with your trading today? Try commands like /analyze BTC or /strategy ETH</p>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ </div>
121
+
122
+ <div class="relative">
123
+ <textarea id="chatInput" class="w-full p-3 rounded-lg bg-gray-700 text-white focus:outline-none focus:ring-2 focus:ring-cyan-500 pr-10"
124
+ placeholder="Type /help, /analyze BTC, /strategy ETH..."></textarea>
125
+ <button id="sendChat" class="absolute right-2 bottom-2 bg-cyan-600 hover:bg-cyan-700 p-1 rounded-lg">
126
+ <i class="fas fa-paper-plane"></i>
127
+ </button>
128
+ </div>
129
+
130
+ <div class="mt-2 flex flex-wrap gap-1">
131
+ <button class="text-xs bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded-lg" onclick="quickCommand('/analyze BTC')">
132
+ /analyze BTC
133
+ </button>
134
+ <button class="text-xs bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded-lg" onclick="quickCommand('/strategy ETH')">
135
+ /strategy ETH
136
+ </button>
137
+ <button class="text-xs bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded-lg" onclick="quickCommand('/news')">
138
+ /news
139
+ </button>
140
+ <button class="text-xs bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded-lg" onclick="quickCommand('/help')">
141
+ /help
142
+ </button>
143
+ </div>
144
+ </section>
145
+
146
+ <!-- Trading Bot & Alerts -->
147
+ <section class="md:col-span-2 grid grid-cols-1 lg:grid-cols-2 gap-4">
148
+ <!-- Auto Trading Bot -->
149
+ <div class="bg-gray-800 p-4 rounded-xl shadow-lg border border-gray-700">
150
+ <div class="flex justify-between items-center mb-3">
151
+ <h2 class="text-xl font-semibold bg-gradient-to-r from-purple-300 to-pink-300 bg-clip-text text-transparent flex items-center">
152
+ <i class="fas fa-robot mr-2"></i> Auto Trading Bot
153
+ </h2>
154
+ <span id="botStatus" class="text-xs px-2 py-1 rounded-full bg-red-600">OFFLINE</span>
155
+ </div>
156
+
157
+ <div class="grid grid-cols-2 gap-3 mb-3">
158
+ <div>
159
+ <label class="block text-sm text-gray-400 mb-1">Select Pair</label>
160
+ <select class="w-full bg-gray-700 rounded-lg p-2 text-sm focus:outline-none focus:ring-1 focus:ring-cyan-500">
161
+ <option>BTC/USDT</option>
162
+ <option>ETH/USDT</option>
163
+ <option>XRP/USDT</option>
164
+ <option>SOL/USDT</option>
165
+ <option>ADA/USDT</option>
166
+ </select>
167
+ </div>
168
+ <div>
169
+ <label class="block text-sm text-gray-400 mb-1">Risk Level</label>
170
+ <select class="w-full bg-gray-700 rounded-lg p-2 text-sm focus:outline-none focus:ring-1 focus:ring-cyan-500">
171
+ <option>Low</option>
172
+ <option selected>Medium</option>
173
+ <option>High</option>
174
+ <option>Aggressive</option>
175
+ </select>
176
+ </div>
177
+ </div>
178
+
179
+ <div class="bg-gray-900 rounded-lg p-3 mb-3">
180
+ <div class="flex justify-between text-sm mb-1">
181
+ <span class="text-gray-400">Buy when RSI <</span>
182
+ <span class="font-medium">30</span>
183
+ </div>
184
+ <div class="flex justify-between text-sm mb-1">
185
+ <span class="text-gray-400">Sell when RSI ></span>
186
+ <span class="font-medium">70</span>
187
+ </div>
188
+ <div class="flex justify-between text-sm">
189
+ <span class="text-gray-400">Stop Loss</span>
190
+ <span class="font-medium">5%</span>
191
+ </div>
192
+ </div>
193
+
194
+ <div class="flex space-x-2">
195
+ <button id="startBot" class="flex-1 bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 py-2 rounded-lg font-medium transition-all duration-200 flex items-center justify-center space-x-2">
196
+ <i class="fas fa-play"></i>
197
+ <span>Start Bot</span>
198
+ </button>
199
+ <button class="bg-gray-700 hover:bg-gray-600 p-2 rounded-lg" title="Settings">
200
+ <i class="fas fa-cog"></i>
201
+ </button>
202
+ </div>
203
+ </div>
204
+
205
+ <!-- Alerts -->
206
+ <div class="bg-gray-800 p-4 rounded-xl shadow-lg border border-gray-700">
207
+ <div class="flex justify-between items-center mb-3">
208
+ <h2 class="text-xl font-semibold bg-gradient-to-r from-red-300 to-orange-300 bg-clip-text text-transparent flex items-center">
209
+ <i class="fas fa-bell mr-2"></i> Smart Alerts
210
+ </h2>
211
+ <div class="flex space-x-2">
212
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg text-xs" title="Mute Alerts">
213
+ <i class="fas fa-volume-mute"></i>
214
+ </button>
215
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg text-xs" title="Alert History">
216
+ <i class="fas fa-history"></i>
217
+ </button>
218
+ </div>
219
+ </div>
220
+
221
+ <div class="bg-gray-900 rounded-lg p-3 mb-3 h-40 overflow-y-auto scrollbar-hide">
222
+ <div class="alert-item bg-gray-800 p-2 rounded-lg mb-2 border-l-4 border-green-500">
223
+ <div class="flex justify-between text-sm">
224
+ <span class="font-medium text-green-400">BUY</span>
225
+ <span class="text-gray-400 text-xs">2 min ago</span>
226
+ </div>
227
+ <p class="text-xs">BTC/USDT - RSI 28 (Oversold)</p>
228
+ </div>
229
+ <div class="alert-item bg-gray-800 p-2 rounded-lg mb-2 border-l-4 border-red-500">
230
+ <div class="flex justify-between text-sm">
231
+ <span class="font-medium text-red-400">SELL</span>
232
+ <span class="text-gray-400 text-xs">15 min ago</span>
233
+ </div>
234
+ <p class="text-xs">ETH/USDT - Resistance Breakout</p>
235
+ </div>
236
+ <div class="alert-item bg-gray-800 p-2 rounded-lg mb-2 border-l-4 border-blue-500">
237
+ <div class="flex justify-between text-sm">
238
+ <span class="font-medium text-blue-400">INFO</span>
239
+ <span class="text-gray-400 text-xs">32 min ago</span>
240
+ </div>
241
+ <p class="text-xs">Market volatility increasing</p>
242
+ </div>
243
+ </div>
244
+
245
+ <div class="grid grid-cols-2 gap-2">
246
+ <div>
247
+ <label class="block text-sm text-gray-400 mb-1">Alert Channels</label>
248
+ <div class="flex space-x-2">
249
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg text-xs" title="Telegram">
250
+ <i class="fab fa-telegram"></i>
251
+ </button>
252
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg text-xs" title="Email">
253
+ <i class="fas fa-envelope"></i>
254
+ </button>
255
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg text-xs" title="SMS">
256
+ <i class="fas fa-sms"></i>
257
+ </button>
258
+ </div>
259
+ </div>
260
+ <div>
261
+ <label class="block text-sm text-gray-400 mb-1">Test Alert</label>
262
+ <button class="bg-gray-700 hover:bg-gray-600 w-full py-1 rounded-lg text-xs">
263
+ Send Test
264
+ </button>
265
+ </div>
266
+ </div>
267
+ </div>
268
+ </section>
269
+
270
+ <!-- Charting System -->
271
+ <section class="md:col-span-3 bg-gray-800 p-4 rounded-xl shadow-lg border border-gray-700">
272
+ <div class="flex justify-between items-center mb-3">
273
+ <h2 class="text-xl font-semibold bg-gradient-to-r from-amber-300 to-orange-300 bg-clip-text text-transparent flex items-center">
274
+ <i class="fas fa-chart-line mr-2"></i> Interactive Chart
275
+ </h2>
276
+ <div class="flex items-center space-x-2">
277
+ <div class="relative">
278
+ <select id="chartPair" class="bg-gray-700 rounded-lg p-1 pl-8 pr-4 text-sm focus:outline-none focus:ring-1 focus:ring-cyan-500 appearance-none">
279
+ <option>BTC/USDT</option>
280
+ <option>ETH/USDT</option>
281
+ <option>XRP/USDT</option>
282
+ <option>SOL/USDT</option>
283
+ <option>ADA/USDT</option>
284
+ </select>
285
+ <div class="absolute left-2 top-1/2 transform -translate-y-1/2">
286
+ <i class="fas fa-coins text-amber-400"></i>
287
+ </div>
288
+ </div>
289
+ <div class="flex bg-gray-700 rounded-lg divide-x divide-gray-600">
290
+ <button class="chart-timeframe px-2 py-1 text-xs hover:bg-gray-600" data-timeframe="1m">1m</button>
291
+ <button class="chart-timeframe px-2 py-1 text-xs hover:bg-gray-600" data-timeframe="5m">5m</button>
292
+ <button class="chart-timeframe px-2 py-1 text-xs hover:bg-gray-600" data-timeframe="15m">15m</button>
293
+ <button class="chart-timeframe px-2 py-1 text-xs hover:bg-gray-600 active" data-timeframe="1h">1h</button>
294
+ <button class="chart-timeframe px-2 py-1 text-xs hover:bg-gray-600" data-timeframe="4h">4h</button>
295
+ <button class="chart-timeframe px-2 py-1 text-xs hover:bg-gray-600" data-timeframe="1d">1d</button>
296
+ </div>
297
+ <button id="fullscreenChart" class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg" title="Fullscreen">
298
+ <i class="fas fa-expand"></i>
299
+ </button>
300
+ </div>
301
+ </div>
302
+
303
+ <div class="relative">
304
+ <canvas id="chartCanvas" class="w-full h-96"></canvas>
305
+ <div id="chartTooltip" class="absolute pointer-events-none opacity-0 bg-gray-900 border border-gray-700 rounded p-2 text-xs">
306
+ <div class="font-medium" id="tooltip-title"></div>
307
+ <table class="mt-1">
308
+ <tr>
309
+ <td class="pr-2 text-gray-400">O:</td>
310
+ <td id="tooltip-open"></td>
311
+ </tr>
312
+ <tr>
313
+ <td class="pr-2 text-gray-400">H:</td>
314
+ <td id="tooltip-high"></td>
315
+ </tr>
316
+ <tr>
317
+ <td class="pr-2 text-gray-400">L:</td>
318
+ <td id="tooltip-low"></td>
319
+ </tr>
320
+ <tr>
321
+ <td class="pr-2 text-gray-400">C:</td>
322
+ <td id="tooltip-close"></td>
323
+ </tr>
324
+ <tr>
325
+ <td class="pr-2 text-gray-400">V:</td>
326
+ <td id="tooltip-volume"></td>
327
+ </tr>
328
+ </table>
329
+ </div>
330
+ </div>
331
+
332
+ <div class="mt-3 grid grid-cols-2 md:grid-cols-4 gap-2">
333
+ <div class="bg-gray-900 rounded-lg p-2">
334
+ <div class="text-xs text-gray-400">Current Price</div>
335
+ <div class="text-lg font-bold text-green-400">$26,745.32</div>
336
+ <div class="text-xs text-green-400">+2.45% (1h)</div>
337
+ </div>
338
+ <div class="bg-gray-900 rounded-lg p-2">
339
+ <div class="text-xs text-gray-400">24h Change</div>
340
+ <div class="text-lg font-bold text-green-400">+5.32%</div>
341
+ <div class="text-xs text-gray-400">High: $26,890</div>
342
+ </div>
343
+ <div class="bg-gray-900 rounded-lg p-2">
344
+ <div class="text-xs text-gray-400">24h Volume</div>
345
+ <div class="text-lg font-bold">$1.24B</div>
346
+ <div class="text-xs text-gray-400">BTC Dominance: 42.3%</div>
347
+ </div>
348
+ <div class="bg-gray-900 rounded-lg p-2">
349
+ <div class="text-xs text-gray-400">Market Sentiment</div>
350
+ <div class="flex items-center">
351
+ <div class="text-lg font-bold text-green-400">Bullish</div>
352
+ <div class="ml-2 w-3 h-3 rounded-full bg-green-500 pulse"></div>
353
+ </div>
354
+ <div class="text-xs text-gray-400">Fear & Greed: 68 (Greed)</div>
355
+ </div>
356
+ </div>
357
+ </section>
358
+
359
+ <!-- Trend Analysis & Wallet -->
360
+ <section class="md:col-span-1 bg-gray-800 p-4 rounded-xl shadow-lg border border-gray-700">
361
+ <div class="flex justify-between items-center mb-3">
362
+ <h2 class="text-xl font-semibold bg-gradient-to-r from-green-300 to-teal-300 bg-clip-text text-transparent flex items-center">
363
+ <i class="fas fa-chart-bar mr-2"></i> Trend Analysis
364
+ </h2>
365
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg text-xs" title="Refresh Analysis">
366
+ <i class="fas fa-sync-alt"></i>
367
+ </button>
368
+ </div>
369
+
370
+ <div class="bg-gray-900 rounded-lg p-3 mb-3">
371
+ <div class="flex justify-between items-center mb-2">
372
+ <span class="text-sm font-medium">BTC/USDT</span>
373
+ <span class="text-xs px-2 py-1 rounded-full bg-green-600/30 text-green-400">Strong Buy</span>
374
+ </div>
375
+
376
+ <div class="space-y-3">
377
+ <div>
378
+ <div class="flex justify-between text-xs mb-1">
379
+ <span class="text-gray-400">RSI (14)</span>
380
+ <span class="font-medium">42.5</span>
381
+ </div>
382
+ <div class="w-full bg-gray-700 rounded-full h-1.5">
383
+ <div class="bg-amber-400 h-1.5 rounded-full" style="width: 42.5%"></div>
384
+ </div>
385
+ </div>
386
+
387
+ <div>
388
+ <div class="flex justify-between text-xs mb-1">
389
+ <span class="text-gray-400">MACD</span>
390
+ <span class="font-medium">Bullish</span>
391
+ </div>
392
+ <div class="w-full bg-gray-700 rounded-full h-1.5">
393
+ <div class="bg-green-500 h-1.5 rounded-full" style="width: 75%"></div>
394
+ </div>
395
+ </div>
396
+
397
+ <div>
398
+ <div class="flex justify-between text-xs mb-1">
399
+ <span class="text-gray-400">Volume Trend</span>
400
+ <span class="font-medium">Increasing</span>
401
+ </div>
402
+ <div class="w-full bg-gray-700 rounded-full h-1.5">
403
+ <div class="bg-blue-500 h-1.5 rounded-full" style="width: 65%"></div>
404
+ </div>
405
+ </div>
406
+ </div>
407
+ </div>
408
+
409
+ <div class="bg-gray-900 rounded-lg p-3">
410
+ <div class="text-sm font-medium mb-2">AI Trading Signals</div>
411
+
412
+ <div class="space-y-2">
413
+ <div class="flex items-start">
414
+ <div class="w-5 h-5 bg-green-500/20 rounded-full flex items-center justify-center mr-2 mt-0.5">
415
+ <i class="fas fa-check text-green-400 text-xs"></i>
416
+ </div>
417
+ <div>
418
+ <p class="text-xs font-medium">Uptrend confirmed on 1H timeframe</p>
419
+ <p class="text-xs text-gray-400">Support at $26,200 holding strong</p>
420
+ </div>
421
+ </div>
422
+
423
+ <div class="flex items-start">
424
+ <div class="w-5 h-5 bg-blue-500/20 rounded-full flex items-center justify-center mr-2 mt-0.5">
425
+ <i class="fas fa-info-circle text-blue-400 text-xs"></i>
426
+ </div>
427
+ <div>
428
+ <p class="text-xs font-medium">Liquidation zones nearby</p>
429
+ <p class="text-xs text-gray-400">Watch for volatility around $27,000</p>
430
+ </div>
431
+ </div>
432
+
433
+ <div class="flex items-start">
434
+ <div class="w-5 h-5 bg-amber-500/20 rounded-full flex items-center justify-center mr-2 mt-0.5">
435
+ <i class="fas fa-exclamation-triangle text-amber-400 text-xs"></i>
436
+ </div>
437
+ <div>
438
+ <p class="text-xs font-medium">Approaching resistance</p>
439
+ <p class="text-xs text-gray-400">Key level at $26,850 to watch</p>
440
+ </div>
441
+ </div>
442
+ </div>
443
+ </div>
444
+ </section>
445
+
446
+ <!-- Wallet & Portfolio -->
447
+ <section class="md:col-span-2 bg-gray-800 p-4 rounded-xl shadow-lg border border-gray-700">
448
+ <div class="flex justify-between items-center mb-3">
449
+ <h2 class="text-xl font-semibold bg-gradient-to-r from-purple-300 to-indigo-300 bg-clip-text text-transparent flex items-center">
450
+ <i class="fas fa-wallet mr-2"></i> Wallet & Portfolio
451
+ </h2>
452
+ <div class="flex space-x-2">
453
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg" title="Deposit">
454
+ <i class="fas fa-plus-circle"></i>
455
+ </button>
456
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg" title="Withdraw">
457
+ <i class="fas fa-minus-circle"></i>
458
+ </button>
459
+ <button class="bg-gray-700 hover:bg-gray-600 p-1 rounded-lg" title="Transaction History">
460
+ <i class="fas fa-list-ul"></i>
461
+ </button>
462
+ </div>
463
+ </div>
464
+
465
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
466
+ <div class="bg-gray-900 rounded-lg p-4">
467
+ <div class="text-sm text-gray-400 mb-1">Total Balance</div>
468
+ <div class="text-2xl font-bold text-green-400 mb-1">$12,450.75</div>
469
+ <div class="flex items-center">
470
+ <div class="text-xs bg-green-600/20 text-green-400 px-2 py-0.5 rounded-full mr-2">
471
+ +$650.32 (5.5%)
472
+ </div>
473
+ <div class="text-xs text-gray-400">24h change</div>
474
+ </div>
475
+ </div>
476
+
477
+ <div class="bg-gray-900 rounded-lg p-4">
478
+ <div class="flex justify-between items-start mb-2">
479
+ <div>
480
+ <div class="text-sm text-gray-400">Available</div>
481
+ <div class="text-xl font-bold">$8,230.50</div>
482
+ </div>
483
+ <div>
484
+ <div class="text-sm text-gray-400">In Orders</div>
485
+ <div class="text-xl font-bold">$4,220.25</div>
486
+ </div>
487
+ </div>
488
+ <div class="w-full bg-gray-700 rounded-full h-2">
489
+ <div class="bg-cyan-500 h-2 rounded-full" style="width: 66%"></div>
490
+ </div>
491
+ </div>
492
+ </div>
493
+
494
+ <div class="bg-gray-900 rounded-lg p-3">
495
+ <div class="text-sm font-medium mb-2">Your Assets</div>
496
+
497
+ <div class="overflow-x-auto">
498
+ <table class="w-full text-sm">
499
+ <thead>
500
+ <tr class="text-gray-400 border-b border-gray-700">
501
+ <th class="text-left pb-2">Asset</th>
502
+ <th class="text-right pb-2">Balance</th>
503
+ <th class="text-right pb-2">Price</th>
504
+ <th class="text-right pb-2">Value</th>
505
+ <th class="text-right pb-2">24h</th>
506
+ </tr>
507
+ </thead>
508
+ <tbody>
509
+ <tr class="border-b border-gray-800 hover:bg-gray-800/50">
510
+ <td class="py-2">
511
+ <div class="flex items-center">
512
+ <div class="w-6 h-6 bg-amber-500 rounded-full flex items-center justify-center mr-2">
513
+ <i class="fab fa-bitcoin text-xs"></i>
514
+ </div>
515
+ <span>BTC</span>
516
+ </div>
517
+ </td>
518
+ <td class="text-right py-2">0.42</td>
519
+ <td class="text-right py-2">$26,745</td>
520
+ <td class="text-right py-2 font-medium">$11,232.90</td>
521
+ <td class="text-right py-2 text-green-400">+5.32%</td>
522
+ </tr>
523
+ <tr class="border-b border-gray-800 hover:bg-gray-800/50">
524
+ <td class="py-2">
525
+ <div class="flex items-center">
526
+ <div class="w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center mr-2">
527
+ <i class="fab fa-ethereum text-xs"></i>
528
+ </div>
529
+ <span>ETH</span>
530
+ </div>
531
+ </td>
532
+ <td class="text-right py-2">3.25</td>
533
+ <td class="text-right py-2">$1,820</td>
534
+ <td class="text-right py-2 font-medium">$5,915.00</td>
535
+ <td class="text-right py-2 text-green-400">+3.15%</td>
536
+ </tr>
537
+ <tr class="border-b border-gray-800 hover:bg-gray-800/50">
538
+ <td class="py-2">
539
+ <div class="flex items-center">
540
+ <div class="w-6 h-6 bg-gray-500 rounded-full flex items-center justify-center mr-2">
541
+ <i class="fas fa-dollar-sign text-xs"></i>
542
+ </div>
543
+ <span>USDT</span>
544
+ </div>
545
+ </td>
546
+ <td class="text-right py-2">1,250.00</td>
547
+ <td class="text-right py-2">$1.00</td>
548
+ <td class="text-right py-2 font-medium">$1,250.00</td>
549
+ <td class="text-right py-2 text-gray-400">0.00%</td>
550
+ </tr>
551
+ <tr class="hover:bg-gray-800/50">
552
+ <td class="py-2">
553
+ <div class="flex items-center">
554
+ <div class="w-6 h-6 bg-red-500 rounded-full flex items-center justify-center mr-2">
555
+ <i class="fas fa-link text-xs"></i>
556
+ </div>
557
+ <span>LINK</span>
558
+ </div>
559
+ </td>
560
+ <td class="text-right py-2">85.00</td>
561
+ <td class="text-right py-2">$6.42</td>
562
+ <td class="text-right py-2 font-medium">$545.70</td>
563
+ <td class="text-right py-2 text-red-400">-1.25%</td>
564
+ </tr>
565
+ </tbody>
566
+ </table>
567
+ </div>
568
+ </div>
569
+ </section>
570
+ </main>
571
+
572
+ <footer class="text-center p-4 mt-6 border-t border-gray-800">
573
+ <div class="max-w-7xl mx-auto">
574
+ <div class="flex flex-col md:flex-row justify-between items-center">
575
+ <div class="flex items-center space-x-2 mb-2 md:mb-0">
576
+ <div class="w-6 h-6 bg-gradient-to-r from-cyan-500 to-blue-500 rounded-full flex items-center justify-center">
577
+ <i class="fas fa-robot text-white text-xs"></i>
578
+ </div>
579
+ <span class="font-medium">WormGPT Trader Pro</span>
580
+ </div>
581
+
582
+ <div class="flex space-x-4 mb-2 md:mb-0">
583
+ <a href="#" class="text-gray-400 hover:text-cyan-400 text-sm">Terms</a>
584
+ <a href="#" class="text-gray-400 hover:text-cyan-400 text-sm">Privacy</a>
585
+ <a href="#" class="text-gray-400 hover:text-cyan-400 text-sm">API</a>
586
+ <a href="#" class="text-gray-400 hover:text-cyan-400 text-sm">Support</a>
587
+ </div>
588
+
589
+ <div class="flex space-x-3">
590
+ <a href="#" class="text-gray-400 hover:text-blue-400">
591
+ <i class="fab fa-twitter"></i>
592
+ </a>
593
+ <a href="#" class="text-gray-400 hover:text-purple-400">
594
+ <i class="fab fa-discord"></i>
595
+ </a>
596
+ <a href="#" class="text-gray-400 hover:text-orange-400">
597
+ <i class="fab fa-telegram"></i>
598
+ </a>
599
+ <a href="#" class="text-gray-400 hover:text-gray-300">
600
+ <i class="fab fa-github"></i>
601
+ </a>
602
+ </div>
603
+ </div>
604
+
605
+ <div class="mt-3 text-xs text-gray-500">
606
+ © 2025 WormGPT Trader Pro | AI-Powered Trading Platform | Not Financial Advice
607
+ </div>
608
+ </div>
609
+ </footer>
610
+
611
+ <script>
612
+ // Theme Toggle
613
+ const themeToggle = document.getElementById('themeToggle');
614
+ const html = document.documentElement;
615
+
616
+ themeToggle.addEventListener('click', () => {
617
+ html.classList.toggle('dark');
618
+ if (html.classList.contains('dark')) {
619
+ themeToggle.innerHTML = '<i class="fas fa-moon text-yellow-300"></i><span class="hidden md:inline">Dark</span>';
620
+ } else {
621
+ themeToggle.innerHTML = '<i class="fas fa-sun text-yellow-400"></i><span class="hidden md:inline">Light</span>';
622
+ }
623
+ });
624
+
625
+ // Language Toggle
626
+ const languageToggle = document.getElementById('languageToggle');
627
+ let currentLanguage = 'EN';
628
+
629
+ languageToggle.addEventListener('click', () => {
630
+ currentLanguage = currentLanguage === 'EN' ? 'AR' : 'EN';
631
+ languageToggle.innerHTML = `<i class="fas fa-language text-blue-400"></i><span class="hidden md:inline">${currentLanguage}</span>`;
632
+ // Here you would add language switching logic
633
+ });
634
+
635
+ // Trading Bot Toggle
636
+ const startBot = document.getElementById('startBot');
637
+ const botStatus = document.getElementById('botStatus');
638
+ let botActive = false;
639
+
640
+ startBot.addEventListener('click', () => {
641
+ botActive = !botActive;
642
+ if (botActive) {
643
+ botStatus.textContent = 'ACTIVE';
644
+ botStatus.className = 'text-xs px-2 py-1 rounded-full bg-green-600';
645
+ startBot.innerHTML = '<i class="fas fa-stop"></i><span>Stop Bot</span>';
646
+ startBot.className = 'flex-1 bg-gradient-to-r from-red-600 to-pink-600 hover:from-red-700 hover:to-pink-700 py-2 rounded-lg font-medium transition-all duration-200 flex items-center justify-center space-x-2';
647
+
648
+ // Simulate bot activity
649
+ setTimeout(() => {
650
+ addAlert('INFO', 'Bot started successfully. Monitoring BTC/USDT', 'blue');
651
+ }, 500);
652
+ } else {
653
+ botStatus.textContent = 'OFFLINE';
654
+ botStatus.className = 'text-xs px-2 py-1 rounded-full bg-red-600';
655
+ startBot.innerHTML = '<i class="fas fa-play"></i><span>Start Bot</span>';
656
+ startBot.className = 'flex-1 bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 py-2 rounded-lg font-medium transition-all duration-200 flex items-center justify-center space-x-2';
657
+
658
+ // Simulate bot stopping
659
+ setTimeout(() => {
660
+ addAlert('INFO', 'Trading bot stopped', 'blue');
661
+ }, 500);
662
+ }
663
+ });
664
+
665
+ // Chat Functionality
666
+ const chatInput = document.getElementById('chatInput');
667
+ const sendChat = document.getElementById('sendChat');
668
+ const chatContainer = document.getElementById('chatContainer');
669
+
670
+ function addChatMessage(role, message) {
671
+ const messageDiv = document.createElement('div');
672
+ messageDiv.className = `chat-message bg-gray-700 p-2 rounded-lg mb-2 text-sm`;
673
+
674
+ if (role === 'user') {
675
+ messageDiv.innerHTML = `
676
+ <div class="flex items-start">
677
+ <div class="w-6 h-6 bg-blue-600 rounded-full flex items-center justify-center mr-2">
678
+ <i class="fas fa-user text-xs"></i>
679
+ </div>
680
+ <div>
681
+ <p class="font-medium text-blue-400">You:</p>
682
+ <p>${message}</p>
683
+ </div>
684
+ </div>
685
+ `;
686
+ } else {
687
+ messageDiv.innerHTML = `
688
+ <div class="flex items-start">
689
+ <div class="w-6 h-6 bg-cyan-600 rounded-full flex items-center justify-center mr-2">
690
+ <i class="fas fa-robot text-xs"></i>
691
+ </div>
692
+ <div>
693
+ <p class="font-medium text-cyan-400">WormGPT:</p>
694
+ <p>${message}</p>
695
+ </div>
696
+ </div>
697
+ `;
698
+ }
699
+
700
+ chatContainer.appendChild(messageDiv);
701
+ chatContainer.scrollTop = chatContainer.scrollHeight;
702
+ }
703
+
704
+ function quickCommand(command) {
705
+ chatInput.value = command;
706
+ chatInput.focus();
707
+ }
708
+
709
+ sendChat.addEventListener('click', () => {
710
+ const message = chatInput.value.trim();
711
+ if (message) {
712
+ addChatMessage('user', message);
713
+
714
+ // Simulate AI response
715
+ setTimeout(() => {
716
+ let response = '';
717
+
718
+ if (message.startsWith('/analyze')) {
719
+ const coin = message.split(' ')[1] || 'BTC';
720
+ response = `Analysis for ${coin}:<br><br>
721
+ • Current trend: <span class="text-green-400">Bullish</span><br>
722
+ • RSI: 42.5 (Neutral)<br>
723
+ • MACD: Bullish crossover detected<br>
724
+ • Support: $26,200<br>
725
+ • Resistance: $26,850<br><br>
726
+ Recommendation: Consider buying on pullbacks to support.`;
727
+ } else if (message.startsWith('/strategy')) {
728
+ const coin = message.split(' ')[1] || 'ETH';
729
+ response = `Trading strategy for ${coin}:<br><br>
730
+ <span class="font-medium">Scalping Strategy (5m timeframe)</span><br>
731
+ 1. Buy when price breaks above VWAP with volume confirmation<br>
732
+ 2. Set stop loss 0.5% below entry<br>
733
+ 3. Take profit at 1:2 risk-reward ratio<br><br>
734
+ Current setup not optimal, wait for better entry.`;
735
+ } else if (message.startsWith('/news')) {
736
+ response = `Latest market news:<br><br>
737
+ • Bitcoin ETF approval rumors circulating<br>
738
+ • Ethereum network upgrade scheduled for next week<br>
739
+ • SEC delays decision on XRP lawsuit<br><br>
740
+ Market reaction: Mildly positive`;
741
+ } else if (message.startsWith('/help')) {
742
+ response = `Available commands:<br><br>
743
+ • /analyze [coin] - Get technical analysis<br>
744
+ • /strategy [coin] - Trading strategy<br>
745
+ • /news - Latest market news<br>
746
+ • /portfolio - Your holdings summary<br>
747
+ • /alert [condition] - Set price alert<br><br>
748
+ Ask anything else for general trading advice.`;
749
+ } else {
750
+ response = `I'm an AI trading assistant. For specific analysis, use commands like:<br>
751
+ • /analyze BTC<br>
752
+ • /strategy ETH<br>
753
+ • /news<br><br>
754
+ For your question "${message}", I recommend checking the 4h chart for confirmation before entering any trades.`;
755
+ }
756
+
757
+ addChatMessage('ai', response);
758
+ }, 800);
759
+
760
+ chatInput.value = '';
761
+ }
762
+ });
763
+
764
+ chatInput.addEventListener('keypress', (e) => {
765
+ if (e.key === 'Enter') {
766
+ sendChat.click();
767
+ }
768
+ });
769
+
770
+ // Alerts Functionality
771
+ function addAlert(type, message, color = 'green') {
772
+ const alertDiv = document.createElement('div');
773
+ alertDiv.className = `alert-item bg-gray-800 p-2 rounded-lg mb-2 border-l-4 ${color === 'green' ? 'border-green-500' : color === 'red' ? 'border-red-500' : 'border-blue-500'}`;
774
+
775
+ const now = new Date();
776
+ const timeString = `${now.getHours()}:${now.getMinutes().toString().padStart(2, '0')}`;
777
+
778
+ alertDiv.innerHTML = `
779
+ <div class="flex justify-between text-sm">
780
+ <span class="font-medium ${color === 'green' ? 'text-green-400' : color === 'red' ? 'text-red-400' : 'text-blue-400'}">${type}</span>
781
+ <span class="text-gray-400 text-xs">${timeString}</span>
782
+ </div>
783
+ <p class="text-xs">${message}</p>
784
+ `;
785
+
786
+ const alertsContainer = document.querySelector('.bg-gray-900.rounded-lg.p-3.mb-3.h-40');
787
+ alertsContainer.insertBefore(alertDiv, alertsContainer.firstChild);
788
+
789
+ // Keep only 5 most recent alerts
790
+ if (alertsContainer.children.length > 5) {
791
+ alertsContainer.removeChild(alertsContainer.lastChild);
792
+ }
793
+
794
+ // Visual notification
795
+ if (color === 'green') {
796
+ document.querySelector('i.fa-bell').classList.add('text-green-400', 'animate-ping');
797
+ setTimeout(() => {
798
+ document.querySelector('i.fa-bell').classList.remove('text-green-400', 'animate-ping');
799
+ }, 1000);
800
+ } else if (color === 'red') {
801
+ document.querySelector('i.fa-bell').classList.add('text-red-400', 'animate-ping');
802
+ setTimeout(() => {
803
+ document.querySelector('i.fa-bell').classList.remove('text-red-400', 'animate-ping');
804
+ }, 1000);
805
+ }
806
+ }
807
+
808
+ // Simulate some alerts
809
+ setTimeout(() => {
810
+ addAlert('BUY', 'BTC/USDT - RSI 28 (Oversold)', 'green');
811
+ }, 2000);
812
+
813
+ setTimeout(() => {
814
+ addAlert('SELL', 'ETH/USDT - Resistance Breakout', 'red');
815
+ }, 5000);
816
+
817
+ setTimeout(() => {
818
+ addAlert('INFO', 'Market volatility increasing', 'blue');
819
+ }, 8000);
820
+
821
+ // Chart Implementation
822
+ const chartCanvas = document.getElementById('chartCanvas');
823
+ const chartTooltip = document.getElementById('chartTooltip');
824
+
825
+ // Generate random price data
826
+ function generatePriceData(count = 100, basePrice = 26500, volatility = 200) {
827
+ const data = [];
828
+ let currentPrice = basePrice;
829
+ let currentTime = new Date();
830
+ currentTime.setHours(currentTime.getHours() - count/4);
831
+
832
+ for (let i = 0; i < count; i++) {
833
+ const open = currentPrice;
834
+ const close = open + (Math.random() - 0.5) * volatility;
835
+ const high = Math.max(open, close) + Math.random() * volatility/2;
836
+ const low = Math.min(open, close) - Math.random() * volatility/2;
837
+ const volume = Math.floor(Math.random() * 100) + 50;
838
+
839
+ data.push({
840
+ x: new Date(currentTime),
841
+ o: open,
842
+ h: high,
843
+ l: low,
844
+ c: close,
845
+ v: volume
846
+ });
847
+
848
+ currentPrice = close;
849
+ currentTime = new Date(currentTime.getTime() + 15 * 60000); // Add 15 minutes
850
+ }
851
+
852
+ return data;
853
+ }
854
+
855
+ const priceData = generatePriceData();
856
+
857
+ const chart = new Chart(chartCanvas, {
858
+ type: 'bar',
859
+ data: {
860
+ datasets: [{
861
+ label: 'BTC/USDT',
862
+ data: priceData,
863
+ borderColor: 'rgba(6, 182, 212, 1)',
864
+ backgroundColor: (ctx) => {
865
+ const value = ctx.dataset.data[ctx.dataIndex];
866
+ return value.c >= value.o ? 'rgba(16, 185, 129, 0.8)' : 'rgba(239, 68, 68, 0.8)';
867
+ },
868
+ borderWidth: 1,
869
+ borderRadius: 2,
870
+ borderSkipped: false,
871
+ }]
872
+ },
873
+ options: {
874
+ responsive: true,
875
+ maintainAspectRatio: false,
876
+ plugins: {
877
+ legend: {
878
+ display: false
879
+ },
880
+ tooltip: {
881
+ enabled: false,
882
+ external: (context) => {
883
+ const { chart, tooltip } = context;
884
+ const { dataIndex } = tooltip;
885
+ const dataset = chart.data.datasets[0];
886
+ const data = dataset.data[dataIndex];
887
+
888
+ if (tooltip.opacity === 0) {
889
+ chartTooltip.style.opacity = 0;
890
+ return;
891
+ }
892
+
893
+ chartTooltip.style.opacity = 1;
894
+ document.getElementById('tooltip-title').innerHTML =
895
+ `BTC/USDT - ${new Date(data.x).toLocaleTimeString()}`;
896
+ document.getElementById('tooltip-open').innerHTML =
897
+ `$${data.o.toFixed(2)} <span class="text-gray-400">(${((data.c - data.o)/data.o*100).toFixed(2)}%)</span>`;
898
+ document.getElementById('tooltip-high').innerHTML = `$${data.h.toFixed(2)}`;
899
+ document.getElementById('tooltip-low').innerHTML = `$${data.l.toFixed(2)}`;
900
+ document.getElementById('tooltip-close').innerHTML = `$${data.c.toFixed(2)}`;
901
+ document.getElementById('tooltip-volume').innerHTML = `${data.v} BTC`;
902
+
903
+ const position = chart.canvas.getBoundingClientRect();
904
+ chartTooltip.style.left = position.left + window.scrollX + tooltip.caretX + 'px';
905
+ chartTooltip.style.top = position.top + window.scrollY + tooltip.caretY + 'px';
906
+ }
907
+ },
908
+ zoom: {
909
+ zoom: {
910
+ wheel: {
911
+ enabled: true,
912
+ },
913
+ pinch: {
914
+ enabled: true
915
+ },
916
+ mode: 'x',
917
+ },
918
+ pan: {
919
+ enabled: true,
920
+ mode: 'x',
921
+ },
922
+ limits: {
923
+ x: { min: 'original', max: 'original' }
924
+ }
925
+ }
926
+ },
927
+ scales: {
928
+ x: {
929
+ type: 'time',
930
+ time: {
931
+ unit: 'hour',
932
+ displayFormats: {
933
+ hour: 'HH:mm'
934
+ }
935
+ },
936
+ grid: {
937
+ color: 'rgba(55, 65, 81, 0.5)'
938
+ },
939
+ ticks: {
940
+ color: 'rgba(156, 163, 175, 1)'
941
+ }
942
+ },
943
+ y: {
944
+ grid: {
945
+ color: 'rgba(55, 65, 81, 0.5)'
946
+ },
947
+ ticks: {
948
+ color: 'rgba(156, 163, 175, 1)'
949
+ }
950
+ }
951
+ },
952
+ interaction: {
953
+ intersect: false,
954
+ mode: 'index',
955
+ }
956
+ }
957
+ });
958
+
959
+ // Timeframe buttons
960
+ document.querySelectorAll('.chart-timeframe').forEach(button => {
961
+ button.addEventListener('click', function() {
962
+ document.querySelectorAll('.chart-timeframe').forEach(btn => btn.classList.remove('active'));
963
+ this.classList.add('active');
964
+
965
+ // In a real app, this would fetch new data for the selected timeframe
966
+ const newData = generatePriceData(100, 26500, this.dataset.timeframe === '1d' ? 500 : 200);
967
+ chart.data.datasets[0].data = newData;
968
+ chart.update();
969
+ });
970
+ });
971
+
972
+ // Fullscreen chart
973
+ document.getElementById('fullscreenChart').addEventListener('click', function() {
974
+ if (!document.fullscreenElement) {
975
+ chartCanvas.requestFullscreen().then(() => {
976
+ chart.resize();
977
+ });
978
+ } else {
979
+ document.exitFullscreen();
980
+ }
981
+ });
982
+
983
+ // Simulate price updates
984
+ setInterval(() => {
985
+ const lastData = priceData[priceData.length - 1];
986
+ const newTime = new Date(lastData.x.getTime() + 15 * 60000);
987
+ const newPrice = lastData.c + (Math.random() - 0.5) * 100;
988
+ const newHigh = Math.max(newPrice, lastData.c) + Math.random() * 50;
989
+ const newLow = Math.min(newPrice, lastData.c) - Math.random() * 50;
990
+ const newVolume = Math.floor(Math.random() * 100) + 50;
991
+
992
+ priceData.push({
993
+ x: newTime,
994
+ o: lastData.c,
995
+ h: newHigh,
996
+ l: newLow,
997
+ c: newPrice,
998
+ v: newVolume
999
+ });
1000
+
1001
+ // Keep only last 100 data points
1002
+ if (priceData.length > 100) {
1003
+ priceData.shift();
1004
+ }
1005
+
1006
+ chart.data.datasets[0].data = priceData;
1007
+ chart.update();
1008
+
1009
+ // Random alerts
1010
+ if (Math.random() > 0.97) {
1011
+ const alertType = Math.random() > 0.5 ? 'BUY' : 'SELL';
1012
+ const coin = ['BTC', 'ETH', 'XRP'][Math.floor(Math.random() * 3)];
1013
+ const reason = ['RSI', 'MACD', 'Volume Spike', 'Trend Break'][Math.floor(Math.random() * 4)];
1014
+ const value = Math.floor(Math.random() * 30) + (alertType === 'BUY' ? 10 : 60);
1015
+
1016
+ addAlert(
1017
+ alertType,
1018
+ `${coin}/USDT - ${reason} ${value}${reason === 'RSI' ? '' : reason === 'MACD' ? ' crossover' : ''}`,
1019
+ alertType === 'BUY' ? 'green' : 'red'
1020
+ );
1021
+ }
1022
+ }, 3000);
1023
+ </script>
1024
+ <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=WormGPT128/wormgpt" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1025
+ </html>