Akademics commited on
Commit
8ae6c11
·
verified ·
1 Parent(s): 8f39e7a

make the AI analysis section interactive - Follow Up Deployment

Browse files
Files changed (2) hide show
  1. index.html +143 -8
  2. prompts.txt +4 -1
index.html CHANGED
@@ -492,12 +492,35 @@
492
  <div class="p-4 rounded-lg bg-gray-700">
493
  <div class="flex items-center justify-between mb-2">
494
  <span class="font-bold">AI Analysis</span>
495
- <i class="fas fa-brain text-accent"></i>
 
 
 
 
 
496
  </div>
497
- <div class="text-sm">
498
  <p class="mb-2">The neural network detects strong accumulation at current levels with decreasing selling pressure.</p>
499
  <p>RSI divergence detected with improving momentum indicators. Volume profile shows absorption of supply.</p>
500
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
501
  </div>
502
  <div class="p-4 rounded-lg bg-gray-700">
503
  <div class="flex items-center justify-between mb-2">
@@ -569,7 +592,7 @@
569
  <div class="flex justify-between items-center mt-2 text-sm">
570
  <div>Entry: $42,120</div>
571
  <div>TP1: $43,500</div>
572
- <button class="btn btn-success hover:bg-green-600 px-2 py-1 rounded text-xs">
573
  <i class="fas fa-robot mr-1"></i>
574
  <span class="hidden sm:inline">Auto Trade</span>
575
  </button>
@@ -586,7 +609,7 @@
586
  <div class="flex justify-between items-center mt-2 text-sm">
587
  <div>Entry: $2,345</div>
588
  <div>TP1: $2,280</div>
589
- <button class="btn btn-danger hover:bg-red-600 px-2 py-1 rounded text-xs">
590
  <i class="fas fa-robot mr-1"></i>
591
  <span class="hidden sm:inline">Auto Trade</span>
592
  </button>
@@ -603,7 +626,7 @@
603
  <div class="flex justify-between items-center mt-2 text-sm">
604
  <div>Entry: $175.20</div>
605
  <div>TP1: $182.50</div>
606
- <button class="btn btn-success hover:bg-green-600 px-2 py-1 rounded text-xs">
607
  <i class="fas fa-robot mr-1"></i>
608
  <span class="hidden sm:inline">Auto Trade</span>
609
  </button>
@@ -620,7 +643,7 @@
620
  <div class="flex justify-between items-center mt-2 text-sm">
621
  <div>Entry: 1.0950</div>
622
  <div>TP1: 1.1120</div>
623
- <button class="btn btn-success hover:bg-green-600 px-2 py-1 rounded text-xs">
624
  <i class="fas fa-robot mr-1"></i>
625
  <span class="hidden sm:inline">Auto Trade</span>
626
  </button>
@@ -637,7 +660,7 @@
637
  <div class="flex justify-between items-center mt-2 text-sm">
638
  <div>Entry: $265.75</div>
639
  <div>TP1: $258.30</div>
640
- <button class="btn btn-danger hover:bg-red-600 px-2 py-1 rounded text-xs">
641
  <i class="fas fa-robot mr-1"></i>
642
  <span class="hidden sm:inline">Auto Trade</span>
643
  </button>
@@ -746,6 +769,29 @@
746
  </div>
747
 
748
  <script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
749
  // Initialize Chart.js for ML Optimizer
750
  const ctx = document.getElementById('optimizerChart').getContext('2d');
751
  const optimizerChart = new Chart(ctx, {
@@ -792,7 +838,7 @@
792
  // Simulate live price updates
793
  function updatePrice() {
794
  // In a real app, you would fetch this from an API
795
- const basePrice = 42876.45;
796
  const change = (Math.random() - 0.5) * 200;
797
  const newPrice = basePrice + change;
798
  const percentChange = (change / basePrice * 100).toFixed(2);
@@ -1028,6 +1074,23 @@
1028
  }
1029
  });
1030
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1031
  // Simulate real-time signal updates
1032
  const symbols = ['BTC/USDT', 'ETH/USDT', 'AAPL', 'EUR/USD', 'TSLA', 'MSFT', 'XAU/USD', 'AMZN'];
1033
  const timeframes = ['1m', '5m', '15m', '1h', '4h', '1d'];
@@ -1113,6 +1176,78 @@
1113
  </div>
1114
 
1115
  <script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1116
  // Sentiment filtering functionality
1117
  document.querySelectorAll('.sentiment-filter-btn').forEach(btn => {
1118
  btn.addEventListener('click', function() {
 
492
  <div class="p-4 rounded-lg bg-gray-700">
493
  <div class="flex items-center justify-between mb-2">
494
  <span class="font-bold">AI Analysis</span>
495
+ <div class="flex items-center space-x-2">
496
+ <button id="refresh-analysis" class="btn btn-xs bg-gray-600 hover:bg-gray-500 p-1 rounded">
497
+ <i class="fas fa-sync-alt text-xs"></i>
498
+ </button>
499
+ <i class="fas fa-brain text-accent"></i>
500
+ </div>
501
  </div>
502
+ <div class="text-sm" id="ai-analysis-content">
503
  <p class="mb-2">The neural network detects strong accumulation at current levels with decreasing selling pressure.</p>
504
  <p>RSI divergence detected with improving momentum indicators. Volume profile shows absorption of supply.</p>
505
  </div>
506
+ <div class="mt-3 border-t border-gray-600 pt-3">
507
+ <button id="show-technical-details" class="btn btn-xs bg-gray-600 hover:bg-gray-500 py-1 px-2 rounded-full text-xs flex items-center">
508
+ <i class="fas fa-chevron-down mr-1 text-accent"></i>
509
+ Technical Details
510
+ </button>
511
+ <div id="technical-details" class="hidden mt-2 space-y-2 text-xs text-gray-300">
512
+ <div class="grid grid-cols-2 gap-2">
513
+ <div>RSI:</div>
514
+ <div class="font-bold text-right">42.7 (Bullish Divergence)</div>
515
+ <div>MACD:</div>
516
+ <div class="font-bold text-right">+0.85 (Bullish Crossover)</div>
517
+ <div>Volume:</div>
518
+ <div class="font-bold text-right">+23% to 30-day avg</div>
519
+ <div>Order Flow:</div>
520
+ <div class="font-bold text-right">Absorption Detected</div>
521
+ </div>
522
+ </div>
523
+ </div>
524
  </div>
525
  <div class="p-4 rounded-lg bg-gray-700">
526
  <div class="flex items-center justify-between mb-2">
 
592
  <div class="flex justify-between items-center mt-2 text-sm">
593
  <div>Entry: $42,120</div>
594
  <div>TP1: $43,500</div>
595
+ <button class="auto-trade-btn btn btn-success hover:bg-green-600 px-2 py-1 rounded text-xs">
596
  <i class="fas fa-robot mr-1"></i>
597
  <span class="hidden sm:inline">Auto Trade</span>
598
  </button>
 
609
  <div class="flex justify-between items-center mt-2 text-sm">
610
  <div>Entry: $2,345</div>
611
  <div>TP1: $2,280</div>
612
+ <button class="auto-trade-btn btn btn-danger hover:bg-red-600 px-2 py-1 rounded text-xs">
613
  <i class="fas fa-robot mr-1"></i>
614
  <span class="hidden sm:inline">Auto Trade</span>
615
  </button>
 
626
  <div class="flex justify-between items-center mt-2 text-sm">
627
  <div>Entry: $175.20</div>
628
  <div>TP1: $182.50</div>
629
+ <button class="auto-trade-btn btn btn-success hover:bg-green-600 px-2 py-1 rounded text-xs">
630
  <i class="fas fa-robot mr-1"></i>
631
  <span class="hidden sm:inline">Auto Trade</span>
632
  </button>
 
643
  <div class="flex justify-between items-center mt-2 text-sm">
644
  <div>Entry: 1.0950</div>
645
  <div>TP1: 1.1120</div>
646
+ <button class="auto-trade-btn btn btn-success hover:bg-green-600 px-2 py-1 rounded text-xs">
647
  <i class="fas fa-robot mr-1"></i>
648
  <span class="hidden sm:inline">Auto Trade</span>
649
  </button>
 
660
  <div class="flex justify-between items-center mt-2 text-sm">
661
  <div>Entry: $265.75</div>
662
  <div>TP1: $258.30</div>
663
+ <button class="auto-trade-btn btn btn-danger hover:bg-red-600 px-2 py-1 rounded text-xs">
664
  <i class="fas fa-robot mr-1"></i>
665
  <span class="hidden sm:inline">Auto Trade</span>
666
  </button>
 
769
  </div>
770
 
771
  <script>
772
+ // Trade execution simulation
773
+ function executeTrade(symbol, action, entryPrice) {
774
+ return new Promise((resolve) => {
775
+ setTimeout(() => {
776
+ const isSuccess = Math.random() > 0.1; // 90% success rate
777
+ const priceImpact = (Math.random() * 0.2).toFixed(2);
778
+
779
+ const executedPrice = action === 'BUY'
780
+ ? (parseFloat(entryPrice) * (1 + parseFloat(priceImpact)/100)).toFixed(2)
781
+ : (parseFloat(entryPrice) * (1 - parseFloat(priceImpact)/100)).toFixed(2);
782
+
783
+ resolve({
784
+ success: isSuccess,
785
+ action,
786
+ symbol,
787
+ requestedPrice: entryPrice,
788
+ executedPrice,
789
+ timestamp: new Date().toISOString()
790
+ });
791
+ }, 1000);
792
+ });
793
+ }
794
+
795
  // Initialize Chart.js for ML Optimizer
796
  const ctx = document.getElementById('optimizerChart').getContext('2d');
797
  const optimizerChart = new Chart(ctx, {
 
838
  // Simulate live price updates
839
  function updatePrice() {
840
  // In a real app, you would fetch this from an API
841
+ const basePrice = 105450.00;
842
  const change = (Math.random() - 0.5) * 200;
843
  const newPrice = basePrice + change;
844
  const percentChange = (change / basePrice * 100).toFixed(2);
 
1074
  }
1075
  });
1076
 
1077
+ // Show trade notification
1078
+ function showTradeNotification(message, isSuccess) {
1079
+ const notification = document.createElement('div');
1080
+ notification.className = `fixed bottom-4 right-4 ${
1081
+ isSuccess ? 'bg-success' : 'bg-danger'
1082
+ } text-white px-4 py-2 rounded-lg shadow-lg flex items-center`;
1083
+ notification.innerHTML = `
1084
+ <i class="fas fa-${isSuccess ? 'check-circle' : 'exclamation-triangle'} mr-2"></i>
1085
+ ${message}
1086
+ `;
1087
+ document.body.appendChild(notification);
1088
+
1089
+ setTimeout(() => {
1090
+ notification.remove();
1091
+ }, 5000);
1092
+ }
1093
+
1094
  // Simulate real-time signal updates
1095
  const symbols = ['BTC/USDT', 'ETH/USDT', 'AAPL', 'EUR/USD', 'TSLA', 'MSFT', 'XAU/USD', 'AMZN'];
1096
  const timeframes = ['1m', '5m', '15m', '1h', '4h', '1d'];
 
1176
  </div>
1177
 
1178
  <script>
1179
+ // AI Analysis Interactivity
1180
+ document.getElementById('show-technical-details').addEventListener('click', function() {
1181
+ const details = document.getElementById('technical-details');
1182
+ const icon = this.querySelector('i');
1183
+
1184
+ if (details.classList.contains('hidden')) {
1185
+ details.classList.remove('hidden');
1186
+ icon.classList.replace('fa-chevron-down', 'fa-chevron-up');
1187
+ this.textContent = 'Technical Details ';
1188
+ this.insertBefore(icon, this.firstChild);
1189
+ } else {
1190
+ details.classList.add('hidden');
1191
+ icon.classList.replace('fa-chevron-up', 'fa-chevron-down');
1192
+ this.textContent = 'Technical Details ';
1193
+ this.insertBefore(icon, this.firstChild);
1194
+ }
1195
+ });
1196
+
1197
+ document.getElementById('refresh-analysis').addEventListener('click', function() {
1198
+ this.classList.add('animate-spin');
1199
+
1200
+ // Generate fresh analysis
1201
+ const analyses = [
1202
+ "Neural network analysis shows increasing institutional accumulation patterns.",
1203
+ "Machine learning models detect momentum divergence suggesting trend reversal potential.",
1204
+ "Sentiment analysis indicates shifting market psychology from fear to greed.",
1205
+ "Volume profile shows strong absorption of supply at current levels.",
1206
+ "Algorithmic detection of fractal patterns suggests continuation setup.",
1207
+ "Deep learning models identify improving risk/reward characteristics."
1208
+ ];
1209
+
1210
+ const indicators = [
1211
+ "42.7 (Bullish Divergence)",
1212
+ "+0.85 (Bullish Crossover)",
1213
+ "+18% to 30-day avg",
1214
+ "Large Bid Absorption",
1215
+ "41.5 (Neutral Territory)",
1216
+ "-0.32 (Bearish Pressure)",
1217
+ "-15% to 30-day avg",
1218
+ "Selling Pressure"
1219
+ ];
1220
+
1221
+ setTimeout(() => {
1222
+ // Update main analysis
1223
+ const analysisContent = document.getElementById('ai-analysis-content');
1224
+ analysisContent.innerHTML = `
1225
+ <p class="mb-2">${analyses[Math.floor(Math.random() * analyses.length)]}</p>
1226
+ <p>${analyses[Math.floor(Math.random() * analyses.length)]}</p>
1227
+ `;
1228
+
1229
+ // Update technical details
1230
+ const techDetails = document.getElementById('technical-details');
1231
+ techDetails.innerHTML = `
1232
+ <div class="grid grid-cols-2 gap-2">
1233
+ <div>RSI:</div>
1234
+ <div class="font-bold text-right">${indicators[Math.floor(Math.random() * indicators.length)]}</div>
1235
+ <div>MACD:</div>
1236
+ <div class="font-bold text-right">${indicators[Math.floor(Math.random() * indicators.length)]}</div>
1237
+ <div>Volume:</div>
1238
+ <div class="font-bold text-right">${indicators[Math.floor(Math.random() * indicators.length)]}</div>
1239
+ <div>Order Flow:</div>
1240
+ <div class="font-bold text-right">${indicators[Math.floor(Math.random() * indicators.length)]}</div>
1241
+ </div>
1242
+ `;
1243
+
1244
+ this.classList.remove('animate-spin');
1245
+
1246
+ // Show notification
1247
+ showTradeNotification("Analysis refreshed with latest market data", true);
1248
+ }, 1000);
1249
+ });
1250
+
1251
  // Sentiment filtering functionality
1252
  document.querySelectorAll('.sentiment-filter-btn').forEach(btn => {
1253
  btn.addEventListener('click', function() {
prompts.txt CHANGED
@@ -1,4 +1,7 @@
1
  why is it that i cant log in through the exchange link
2
  Why can't I log in through metaTrader 5
3
  update all prices to correspond with trading View
4
- make the market sentiment interactive
 
 
 
 
1
  why is it that i cant log in through the exchange link
2
  Why can't I log in through metaTrader 5
3
  update all prices to correspond with trading View
4
+ make the market sentiment interactive
5
+ current signal detail is not showing the current prices of assets like BTC that is currently over 105,000. Please update prices of assets.
6
+ make the live signal auto trade interactive
7
+ make the AI analysis section interactive