Download index.html from Dennis-78/codeing: direct link, hf CLI and curl.
- Browser
- Download file 78.9 kB
-
https://huggingface.co/spaces/Dennis-78/codeing/resolve/main/index.html
- Command line
-
hf download hf://spaces/Dennis-78/codeing/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Dennis-78/codeing/resolve/main/index.html
78.9 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quantum Trader Pro - Advanced MT5 Trading Bot</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#3b82f6',
secondary: '#10b981',
dark: '#0f172a',
darker: '#020617',
accent: '#6366f1',
success: '#10b981',
danger: '#ef4444',
warning: '#f59e0b',
info: '#3b82f6',
chart: {
blue: '#3b82f6',
green: '#10b981',
red: '#ef4444',
purple: '#8b5cf6',
yellow: '#f59e0b'
}
},
animation: {
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
'ping-slow': 'ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite',
'float': 'float 6s ease-in-out infinite',
'wave': 'wave 1.5s linear infinite'
},
keyframes: {
float: {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-10px)' }
},
wave: {
'0%': { transform: 'translateX(0)' },
'100%': { transform: 'translateX(-100%)' }
}
}
}
}
}
</script>
<style>
/* Custom scrollbar */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.1);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.2);
}
/* Glow effects */
.glow-primary {
box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}
.glow-success {
box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}
.glow-danger {
box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}
.glow-accent {
box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}
/* Gradient text */
.gradient-text {
background: linear-gradient(90deg, #3b82f6, #6366f1);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
/* Trading card hover effect */
.trading-card {
transition: all 0.3s ease;
border: 1px solid rgba(255, 255, 255, 0.05);
position: relative;
overflow: hidden;
}
.trading-card:hover {
transform: translateY(-3px);
border-color: rgba(99, 102, 241, 0.5);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}
.trading-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
opacity: 0;
transition: opacity 0.3s ease;
}
.trading-card:hover::before {
opacity: 1;
}
/* Status indicator pulse */
.status-pulse {
position: relative;
}
.status-pulse::after {
content: '';
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
border-radius: 9999px;
animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
/* Wave animation for loading */
.wave-bg {
position: relative;
overflow: hidden;
}
.wave-bg::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
animation: wave 1.5s linear infinite;
}
/* Custom radio buttons */
.custom-radio input:checked ~ .radio-mark {
background-color: #6366f1;
border-color: #6366f1;
}
.custom-radio input:checked ~ .radio-mark::after {
opacity: 1;
transform: scale(1);
}
.radio-mark {
transition: all 0.2s ease;
}
.radio-mark::after {
content: '';
position: absolute;
top-1/2: ;
left-1/2: ;
transform: translate(-50%, -50%) scale(0);
width: 8px;
height: 8px;
border-radius: 50%;
background: white;
opacity: 0;
transition: all 0.2s ease;
}
/* Custom checkboxes */
.custom-checkbox input:checked ~ .check-mark {
background-color: #6366f1;
border-color: #6366f1;
}
.custom-checkbox input:checked ~ .check-mark::after {
opacity: 1;
}
.check-mark {
transition: all 0.2s ease;
}
.check-mark::after {
content: '';
position: absolute;
left: 6px;
top: 2px;
width: 4px;
height: 8px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
opacity: 0;
transition: all 0.2s ease;
}
/* Tooltip */
.tooltip:hover .tooltip-text {
visibility: visible;
opacity: 1;
}
.tooltip-text {
visibility: hidden;
opacity: 0;
transition: all 0.2s ease;
}
/* Custom toggle switches */
.toggle-switch input:checked ~ .toggle-dot {
transform: translateX(100%);
}
/* Price change animation */
@keyframes priceUp {
0% { background-color: rgba(16, 185, 129, 0.2); }
100% { background-color: transparent; }
}
@keyframes priceDown {
0% { background-color: rgba(239, 68, 68, 0.2); }
100% { background-color: transparent; }
}
.price-up {
animation: priceUp 1s ease-out;
}
.price-down {
animation: priceDown 1s ease-out;
}
</style>
</head>
<body class="bg-darker text-gray-200 font-sans antialiased overflow-hidden h-screen flex flex-col">
<!-- Top Navigation -->
<header class="bg-dark border-b border-gray-800/50 px-6 py-3 flex items-center justify-between">
<div class="flex items-center space-x-4">
<div class="flex items-center">
<div class="w-8 h-8 rounded-full bg-gradient-to-br from-accent to-primary flex items-center justify-center mr-3 glow-accent">
<i class="fas fa-robot text-white"></i>
</div>
<h1 class="text-xl font-bold gradient-text">Quantum Trader Pro</h1>
</div>
<div class="hidden md:flex items-center space-x-2 text-sm">
<span class="px-3 py-1 bg-gray-800 rounded-full text-xs font-medium flex items-center">
<i class="fas fa-chart-line mr-1"></i> MT5
</span>
<span class="px-3 py-1 bg-gray-800 rounded-full text-xs font-medium flex items-center">
<i class="fas fa-bolt mr-1"></i> Supertrend
</span>
<span class="px-3 py-1 bg-gray-800 rounded-full text-xs font-medium flex items-center">
<i class="fas fa-code-branch mr-1"></i> v2.5.1
</span>
</div>
</div>
<div class="flex items-center space-x-4">
<div class="flex items-center space-x-2">
<div class="status-pulse">
<div id="status-indicator" class="w-3 h-3 rounded-full bg-danger"></div>
</div>
<span id="status-text" class="text-sm font-medium">Idle</span>
</div>
<div class="hidden md:flex items-center space-x-2">
<button class="p-2 rounded-full hover:bg-gray-800/50 transition tooltip" data-tooltip="Settings">
<i class="fas fa-cog text-gray-400"></i>
<span class="tooltip-text absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 -translate-x-1/2 left-1/2 -bottom-10">
Settings
</span>
</button>
<button id="fullscreen-btn" class="p-2 rounded-full hover:bg-gray-800/50 transition tooltip" data-tooltip="Fullscreen">
<i class="fas fa-expand text-gray-400"></i>
<span class="tooltip-text absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 -translate-x-1/2 left-1/2 -bottom-10">
Fullscreen
</span>
</button>
<button class="p-2 rounded-full hover:bg-gray-800/50 transition tooltip" data-tooltip="Notifications">
<i class="fas fa-bell text-gray-400"></i>
<span class="tooltip-text absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 -translate-x-1/2 left-1/2 -bottom-10">
Notifications
</span>
</button>
</div>
</div>
</header>
<!-- Main Content Area -->
<div class="flex flex-1 overflow-hidden">
<!-- Sidebar -->
<aside class="w-64 bg-dark border-r border-gray-800/50 flex flex-col">
<div class="p-4 border-b border-gray-800/50">
<h2 class="text-lg font-semibold flex items-center">
<i class="fas fa-chart-line mr-2 text-accent"></i>
Market Dashboard
</h2>
</div>
<div class="flex-1 overflow-y-auto p-4 space-y-4">
<!-- Symbol Categories -->
<div class="space-y-2">
<h3 class="text-sm font-medium text-gray-400 uppercase tracking-wider">Asset Classes</h3>
<div class="grid grid-cols-2 gap-2">
<button class="category-btn py-2 px-3 rounded-lg bg-blue-900/30 hover:bg-blue-900/50 border border-blue-900/50 transition flex items-center justify-center" data-category="Forex">
<i class="fas fa-dollar-sign mr-2"></i> Forex
</button>
<button class="category-btn py-2 px-3 rounded-lg bg-amber-900/30 hover:bg-amber-900/50 border border-amber-900/50 transition flex items-center justify-center" data-category="Gold">
<i class="fas fa-coins mr-2"></i> Gold
</button>
<button class="category-btn py-2 px-3 rounded-lg bg-emerald-900/30 hover:bg-emerald-900/50 border border-emerald-900/50 transition flex items-center justify-center" data-category="Crypto">
<i class="fas fa-bitcoin-sign mr-2"></i> Crypto
</button>
<button class="category-btn py-2 px-3 rounded-lg bg-purple-900/30 hover:bg-purple-900/50 border border-purple-900/50 transition flex items-center justify-center" data-category="Indices">
<i class="fas fa-chart-bar mr-2"></i> Indices
</button>
</div>
</div>
<!-- Symbols List -->
<div class="space-y-2">
<div class="flex items-center justify-between">
<h3 class="text-sm font-medium text-gray-400 uppercase tracking-wider">Available Symbols</h3>
<button id="select-all" class="text-xs text-accent hover:underline">Select All</button>
</div>
<div id="symbols-container" class="space-y-1">
<!-- Symbols will be loaded here -->
</div>
</div>
<!-- Trading Options -->
<div class="space-y-3 pt-4 border-t border-gray-800/50">
<div class="flex items-center justify-between">
<label class="text-sm font-medium">Avoid Repeat (10min)</label>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" id="avoid-repeat" class="sr-only peer">
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-accent"></div>
</label>
</div>
<div class="flex items-center justify-between">
<label class="text-sm font-medium">Sound Alerts</label>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" id="sound-alerts" class="sr-only peer" checked>
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-success"></div>
</label>
</div>
<div class="flex items-center justify-between">
<label class="text-sm font-medium">Email Notifications</label>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" id="email-notifications" class="sr-only peer">
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-info"></div>
</label>
</div>
</div>
</div>
<div class="p-4 border-t border-gray-800/50">
<button id="add-watchlist" class="w-full py-2 bg-gradient-to-r from-accent to-primary hover:from-accent/90 hover:to-primary/90 rounded-lg font-medium transition flex items-center justify-center glow-accent">
<i class="fas fa-plus mr-2"></i> Add to Watchlist
</button>
</div>
</aside>
<!-- Main Panel -->
<main class="flex-1 flex flex-col overflow-hidden">
<!-- Trading Dashboard -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-4 p-4 border-b border-gray-800/50">
<!-- Account Summary -->
<div class="bg-dark rounded-xl p-4 trading-card">
<div class="flex justify-between items-center mb-3">
<h3 class="text-sm font-medium text-gray-400">Account Summary</h3>
<div class="text-xs px-2 py-1 rounded-full bg-gray-800 flex items-center">
<i class="fas fa-wallet mr-1"></i> Demo Account
</div>
</div>
<div class="space-y-3">
<div class="flex justify-between items-center">
<span class="text-gray-400">Balance</span>
<span id="balance" class="font-medium">$5,000.00</span>
</div>
<div class="flex justify-between items-center">
<span class="text-gray-400">Equity</span>
<span id="equity" class="font-medium">$5,120.50</span>
</div>
<div class="flex justify-between items-center">
<span class="text-gray-400">Margin</span>
<span id="margin" class="font-medium">$250.75</span>
</div>
<div class="flex justify-between items-center pt-2 border-t border-gray-800/50">
<span class="text-gray-400">Free Margin</span>
<span id="free-margin" class="font-medium text-success">$4,869.75</span>
</div>
</div>
</div>
<!-- Profit/Loss Summary -->
<div class="bg-dark rounded-xl p-4 trading-card">
<div class="flex justify-between items-center mb-3">
<h3 class="text-sm font-medium text-gray-400">Profit/Loss</h3>
<div class="text-xs px-2 py-1 rounded-full bg-gray-800 flex items-center">
<i class="fas fa-calendar-day mr-1"></i> Today
</div>
</div>
<div class="space-y-3">
<div class="flex justify-between items-center">
<span class="text-gray-400">Today's P/L</span>
<span id="daily-pl" class="font-medium text-success">+$120.50</span>
</div>
<div class="flex justify-between items-center">
<span class="text-gray-400">Weekly P/L</span>
<span id="weekly-pl" class="font-medium text-success">+$420.75</span>
</div>
<div class="flex justify-between items-center">
<span class="text-gray-400">Monthly P/L</span>
<span id="monthly-pl" class="font-medium text-success">+$1,245.30</span>
</div>
<div class="flex justify-between items-center pt-2 border-t border-gray-800/50">
<span class="text-gray-400">Total P/L</span>
<span id="total-pl" class="font-medium text-success">+$3,245.30</span>
</div>
</div>
</div>
<!-- Trading Statistics -->
<div class="bg-dark rounded-xl p-4 trading-card">
<div class="flex justify-between items-center mb-3">
<h3 class="text-sm font-medium text-gray-400">Performance Metrics</h3>
<div class="text-xs px-2 py-1 rounded-full bg-gray-800 flex items-center">
<i class="fas fa-trophy mr-1"></i> Stats
</div>
</div>
<div class="space-y-3">
<div class="flex justify-between items-center">
<span class="text-gray-400">Win Rate</span>
<div class="flex items-center">
<span id="win-rate" class="font-medium mr-2">72.5%</span>
<div class="w-16 bg-gray-700 rounded-full h-2">
<div class="bg-success h-2 rounded-full" style="width: 72.5%"></div>
</div>
</div>
</div>
<div class="flex justify-between items-center">
<span class="text-gray-400">Profit Factor</span>
<span id="profit-factor" class="font-medium">2.4</span>
</div>
<div class="flex justify-between items-center">
<span class="text-gray-400">Avg. Win/Loss</span>
<span id="avg-win-loss" class="font-medium">1.8</span>
</div>
<div class="flex justify-between items-center pt-2 border-t border-gray-800/50">
<span class="text-gray-400">Trades Today</span>
<span id="trades-today" class="font-medium">14</span>
</div>
</div>
</div>
</div>
<!-- Trading Interface -->
<div class="flex-1 grid grid-cols-1 lg:grid-cols-3 gap-4 p-4 overflow-hidden">
<!-- Trading Controls -->
<div class="bg-dark rounded-xl p-4 flex flex-col space-y-4 overflow-y-auto">
<h2 class="text-lg font-semibold flex items-center">
<i class="fas fa-sliders-h mr-2 text-accent"></i>
Trading Controls
</h2>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium mb-1">Lot Size</label>
<div class="relative">
<input type="text" id="lot-size" value="0.10" class="w-full bg-gray-800 border border-gray-700 rounded-lg py-2 px-3 focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent">
<div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
<span class="text-gray-400 text-sm">Lots</span>
</div>
</div>
</div>
<div class="grid grid-cols-2 gap-3">
<div>
<label class="block text-sm font-medium mb-1">SL (pips)</label>
<input type="text" id="sl-pips" value="15" class="w-full bg-gray-800 border border-gray-700 rounded-lg py-2 px-3 focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent">
</div>
<div>
<label class="block text-sm font-medium mb-1">TP (pips)</label>
<input type="text" id="tp-pips" value="25" class="w-full bg-gray-800 border border-gray-700 rounded-lg py-2 px-3 focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent">
</div>
</div>
<div class="space-y-2">
<label class="block text-sm font-medium">Risk Management</label>
<select id="risk-level" class="w-full bg-gray-800 border border-gray-700 rounded-lg py-2 px-3 focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent text-sm">
<option value="low">Low Risk (1% per trade)</option>
<option value="medium" selected>Medium Risk (2% per trade)</option>
<option value="high">High Risk (5% per trade)</option>
<option value="custom">Custom Risk</option>
</select>
</div>
<div class="grid grid-cols-2 gap-3">
<button id="start-trading" class="py-2 bg-gradient-to-r from-success to-emerald-500 hover:from-success/90 hover:to-emerald-500/90 rounded-lg font-medium transition flex items-center justify-center glow-success">
<i class="fas fa-play mr-2"></i> Start
</button>
<button id="stop-trading" class="py-2 bg-gradient-to-r from-danger to-rose-500 hover:from-danger/90 hover:to-rose-500/90 rounded-lg font-medium transition flex items-center justify-center glow-danger">
<i class="fas fa-stop mr-2"></i> Stop
</button>
</div>
<button id="close-all" class="w-full py-2 bg-gradient-to-r from-warning to-amber-500 hover:from-warning/90 hover:to-amber-500/90 rounded-lg font-bold transition flex items-center justify-center glow-warning">
<i class="fas fa-times-circle mr-2"></i> Close All Trades
</button>
</div>
<div class="bg-gray-800/50 rounded-lg p-4 mt-4">
<h3 class="text-sm font-medium mb-3">Profit Target</h3>
<div class="grid grid-cols-2 gap-2">
<label class="flex items-center space-x-2 p-2 rounded hover:bg-gray-700/50 cursor-pointer">
<input type="radio" name="profit-target" value="fixed_10" class="form-radio h-4 w-4 text-accent">
<span class="text-sm">$10</span>
</label>
<label class="flex items-center space-x-2 p-2 rounded hover:bg-gray-700/50 cursor-pointer">
<input type="radio" name="profit-target" value="fixed_25" class="form-radio h-4 w-4 text-accent" checked>
<span class="text-sm">$25</span>
</label>
<label class="flex items-center space-x-2 p-2 rounded hover:bg-gray-700/50 cursor-pointer">
<input type="radio" name="profit-target" value="fixed_50" class="form-radio h-4 w-4 text-accent">
<span class="text-sm">$50</span>
</label>
<label class="flex items-center space-x-2 p-2 rounded hover:bg-gray-700/50 cursor-pointer">
<input type="radio" name="profit-target" value="fixed_100" class="form-radio h-4 w-4 text-accent">
<span class="text-sm">$100</span>
</label>
<label class="flex items-center space-x-2 p-2 rounded hover:bg-gray-700/50 cursor-pointer">
<input type="radio" name="profit-target" value="percent_2" class="form-radio h-4 w-4 text-accent">
<span class="text-sm">2%</span>
</label>
<label class="flex items-center space-x-2 p-2 rounded hover:bg-gray-700/50 cursor-pointer">
<input type="radio" name="profit-target" value="percent_5" class="form-radio h-4 w-4 text-accent">
<span class="text-sm">5%</span>
</label>
<label class="flex items-center space-x-2 p-2 rounded hover:bg-gray-700/50 cursor-pointer">
<input type="radio" name="profit-target" value="percent_10" class="form-radio h-4 w-4 text-accent">
<span class="text-sm">10%</span>
</label>
<label class="flex items-center space-x-2 p-2 rounded hover:bg-gray-700/50 cursor-pointer">
<input type="radio" name="profit-target" value="custom" class="form-radio h-4 w-4 text-accent">
<span class="text-sm">Custom</span>
</label>
</div>
<div id="custom-target-container" class="hidden mt-3">
<div class="relative">
<input type="text" id="custom-target" value="75.00" class="w-full bg-gray-700 border border-gray-600 rounded-lg py-2 px-3 focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent">
<div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
<span class="text-gray-400">$</span>
</div>
</div>
</div>
<div class="mt-3 pt-3 border-t border-gray-700">
<p id="current-target" class="text-sm font-medium text-success">Current Target: $25.00</p>
</div>
</div>
</div>
<!-- Positions and Watchlist -->
<div class="flex flex-col space-y-4 overflow-hidden">
<!-- Open Positions -->
<div class="bg-dark rounded-xl p-4 flex-1 flex flex-col overflow-hidden">
<div class="flex items-center justify-between mb-3">
<h2 class="text-lg font-semibold flex items-center">
<i class="fas fa-chart-pie mr-2 text-accent"></i>
Open Positions
</h2>
<span id="positions-count" class="text-xs bg-gray-800 px-2 py-1 rounded-full">0</span>
</div>
<div id="positions-container" class="flex-1 overflow-y-auto space-y-2">
<div class="flex items-center justify-center h-full">
<div class="text-center">
<i class="fas fa-box-open text-3xl text-gray-600 mb-2"></i>
<p class="text-gray-400">No open positions</p>
</div>
</div>
</div>
</div>
<!-- Watchlist -->
<div class="bg-dark rounded-xl p-4 flex-1 flex flex-col overflow-hidden">
<div class="flex items-center justify-between mb-3">
<h2 class="text-lg font-semibold flex items-center">
<i class="fas fa-star mr-2 text-yellow-400"></i>
Watchlist
</h2>
<button id="clear-watchlist" class="text-xs text-danger hover:underline">Clear All</button>
</div>
<div id="watchlist-container" class="flex-1 overflow-y-auto">
<div class="flex items-center justify-center h-full">
<div class="text-center">
<i class="fas fa-binoculars text-3xl text-gray-600 mb-2"></i>
<p class="text-gray-400">No symbols in watchlist</p>
</div>
</div>
</div>
</div>
</div>
<!-- Trading Log and Market Updates -->
<div class="flex flex-col space-y-4 overflow-hidden">
<!-- Trading Log -->
<div class="bg-dark rounded-xl p-4 flex-1 flex flex-col overflow-hidden">
<div class="flex items-center justify-between mb-3">
<h2 class="text-lg font-semibold flex items-center">
<i class="fas fa-terminal mr-2 text-accent"></i>
Trading Log
</h2>
<button id="clear-logs" class="text-xs text-gray-400 hover:underline">Clear</button>
</div>
<div id="log-container" class="flex-1 overflow-y-auto font-mono text-sm space-y-1">
<p class="text-gray-400">Waiting for logs...</p>
</div>
</div>
<!-- Market Updates -->
<div class="bg-dark rounded-xl p-4 flex-1 flex flex-col overflow-hidden">
<h2 class="text-lg font-semibold flex items-center mb-3">
<i class="fas fa-bullhorn mr-2 text-accent"></i>
Market Insights
</h2>
<div class="flex-1 overflow-y-auto space-y-3">
<!-- Forex Market -->
<div class="bg-gray-800/30 rounded-lg p-3 border-l-4 border-blue-500">
<div class="flex items-center justify-between mb-1">
<h3 class="font-medium text-blue-300">FOREX MARKET</h3>
<span id="forex-trend" class="text-xs px-2 py-1 rounded-full bg-blue-900/30">Neutral</span>
</div>
<p id="forex-comment" class="text-sm text-gray-300">Waiting for market direction</p>
<div class="mt-2 flex items-center justify-between text-xs">
<span id="forex-bias" class="text-gray-400">Bias: None</span>
<span id="forex-recommendations" class="text-blue-300">EURUSD, GBPUSD</span>
</div>
</div>
<!-- Gold Market -->
<div class="bg-gray-800/30 rounded-lg p-3 border-l-4 border-yellow-500">
<div class="flex items-center justify-between mb-1">
<h3 class="font-medium text-yellow-300">GOLD (XAUUSD)</h3>
<span id="gold-trend" class="text-xs px-2 py-1 rounded-full bg-yellow-900/30">Neutral</span>
</div>
<p id="gold-comment" class="text-sm text-gray-300">Waiting for market direction</p>
<div class="mt-2 flex items-center justify-between text-xs">
<span id="gold-bias" class="text-gray-400">Bias: None</span>
<span id="gold-recommendation" class="text-yellow-300">Wait for breakout</span>
</div>
</div>
<!-- Crypto Market -->
<div class="bg-gray-800/30 rounded-lg p-3 border-l-4 border-green-500">
<div class="flex items-center justify-between mb-1">
<h3 class="font-medium text-green-300">CRYPTO MARKET</h3>
<span id="crypto-trend" class="text-xs px-2 py-1 rounded-full bg-green-900/30">Neutral</span>
</div>
<p id="crypto-comment" class="text-sm text-gray-300">Waiting for market direction</p>
<div class="mt-2 flex items-center justify-between text-xs">
<span id="crypto-bias" class="text-gray-400">Bias: None</span>
<span id="crypto-recommendations" class="text-green-300">BTCUSD, ETHUSD</span>
</div>
</div>
<!-- Market Sentiment -->
<div class="bg-gray-800/30 rounded-lg p-3 border-l-4 border-purple-500 mt-3">
<div class="flex items-center justify-between mb-1">
<h3 class="font-medium text-purple-300">MARKET SENTIMENT</h3>
<span id="market-sentiment" class="text-xs px-2 py-1 rounded-full bg-purple-900/30">Neutral</span>
</div>
<p id="sentiment-comment" class="text-sm text-gray-300">Risk appetite normal</p>
</div>
<!-- Trading Tip -->
<div class="bg-gray-800/30 rounded-lg p-3 border-l-4 border-orange-500 mt-3">
<div class="flex items-center justify-between mb-1">
<h3 class="font-medium text-orange-300">TRADING TIP</h3>
<i class="fas fa-lightbulb text-orange-300"></i>
</div>
<p id="trading-tip" class="text-sm text-gray-300">Let profits run, cut losses short</p>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script>
// Data model
const tradingBot = {
tradingActive: false,
avoidRepeat: false,
soundAlerts: true,
emailNotifications: false,
profitTarget: 25.00,
profitMode: 'fixed_25',
tradeCount: 0,
winningTrades: 0,
losingTrades: 0,
profitableAmount: 0.0,
nonProfitableAmount: 0.0,
watchList: {},
activeTrades: {},
selectedSymbols: {},
lastTraded: {},
priceHistory: {},
symbolCategories: {
"Forex": ["EURUSD", "GBPUSD", "USDJPY", "USDCHF", "AUDUSD", "USDCAD", "NZDUSD"],
"Gold": ["XAUUSD"],
"Crypto": ["BTCUSD", "ETHUSD", "XRPUSD", "LTCUSD"],
"Indices": ["US30", "SPX500", "NAS100", "GER30", "UK100"]
},
supertrendSettings: {
"Forex": {"period": 10, "multiplier": 3},
"Gold": {"period": 7, "multiplier": 4},
"Crypto": {"period": 5, "multiplier": 4},
"Indices": {"period": 12, "multiplier": 3}
},
marketUpdates: {
"Forex": {"trend": "Neutral", "bias": "None", "comment": "Waiting for market direction"},
"Gold": {"trend": "Neutral", "bias": "None", "comment": "Waiting for market direction"},
"Crypto": {"trend": "Neutral", "bias": "None", "comment": "Waiting for market direction"}
},
initialize: function() {
this.setupEventListeners();
this.loadSymbols('Forex');
this.updateMarketAnalysis();
this.simulateAccountInfo();
this.simulatePositions();
// Simulate price updates
setInterval(() => {
this.updateWatchListPrices();
}, 1000);
// Simulate market analysis updates
setInterval(() => {
this.updateMarketAnalysis();
}, 30000);
// Simulate account info updates
setInterval(() => {
this.simulateAccountInfo();
}, 5000);
// Simulate positions updates
setInterval(() => {
this.simulatePositions();
}, 8000);
// Initial trade statistics
this.simulateTradeStatistics();
},
setupEventListeners: function() {
// Category buttons
document.querySelectorAll('.category-btn').forEach(btn => {
btn.addEventListener('click', () => {
const category = btn.dataset.category;
this.loadSymbols(category);
});
});
// Select all button
document.getElementById('select-all').addEventListener('click', () => {
const checkboxes = document.querySelectorAll('#symbols-container input[type="checkbox"]');
const allChecked = Array.from(checkboxes).every(checkbox => checkbox.checked);
checkboxes.forEach(checkbox => {
checkbox.checked = !allChecked;
this.selectedSymbols[checkbox.id.replace('symbol-', '')] = checkbox.checked;
});
this.log(allChecked ? 'Deselected all symbols' : 'Selected all symbols', 'text-blue-400');
});
// Trading controls
document.getElementById('start-trading').addEventListener('click', () => {
this.startTrading();
});
document.getElementById('stop-trading').addEventListener('click', () => {
this.stopTrading();
});
document.getElementById('close-all').addEventListener('click', () => {
this.closeAllTrades();
});
// Watch list controls
document.getElementById('add-watchlist').addEventListener('click', () => {
this.addToWatchList();
});
document.getElementById('clear-watchlist').addEventListener('click', () => {
this.clearWatchList();
});
// Clear logs button
document.getElementById('clear-logs').addEventListener('click', () => {
document.getElementById('log-container').innerHTML = '<p class="text-gray-400">Waiting for logs...</p>';
this.log('Logs cleared', 'text-gray-400');
});
// Profit target options
document.querySelectorAll('input[name="profit-target"]').forEach(radio => {
radio.addEventListener('change', () => {
this.profitMode = radio.value;
if (radio.value === 'custom') {
document.getElementById('custom-target-container').classList.remove('hidden');
} else {
document.getElementById('custom-target-container').classList.add('hidden');
}
this.updateProfitTargetDisplay();
});
});
document.getElementById('custom-target').addEventListener('input', () => {
this.updateProfitTargetDisplay();
});
// Avoid repeat checkbox
document.getElementById('avoid-repeat').addEventListener('change', (e) => {
this.avoidRepeat = e.target.checked;
this.log(`Avoid repeat trades: ${e.target.checked ? 'ON' : 'OFF'}`, 'text-blue-400');
});
// Sound alerts checkbox
document.getElementById('sound-alerts').addEventListener('change', (e) => {
this.soundAlerts = e.target.checked;
this.log(`Sound alerts: ${e.target.checked ? 'ON' : 'OFF'}`, 'text-blue-400');
});
// Email notifications checkbox
document.getElementById('email-notifications').addEventListener('change', (e) => {
this.emailNotifications = e.target.checked;
this.log(`Email notifications: ${e.target.checked ? 'ON' : 'OFF'}`, 'text-blue-400');
});
// Fullscreen button
document.getElementById('fullscreen-btn').addEventListener('click', () => {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen().catch(err => {
this.log(`Error attempting to enable fullscreen: ${err.message}`, 'text-red-400');
});
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
}
}
});
},
loadSymbols: function(category) {
const container = document.getElementById('symbols-container');
container.innerHTML = '';
this.symbolCategories[category].forEach(symbol => {
const div = document.createElement('label');
div.className = 'flex items-center p-2 rounded hover:bg-gray-700/30 cursor-pointer';
const checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.id = `symbol-${symbol}`;
checkbox.className = 'form-checkbox h-4 w-4 text-accent rounded mr-2';
checkbox.checked = this.selectedSymbols[symbol] || false;
checkbox.addEventListener('change', (e) => {
this.selectedSymbols[symbol] = e.target.checked;
});
const symbolName = document.createElement('span');
symbolName.className = 'text-sm';
symbolName.textContent = symbol;
div.appendChild(checkbox);
div.appendChild(symbolName);
container.appendChild(div);
// Store reference to checkbox
this.selectedSymbols[symbol] = checkbox.checked;
});
this.log(`Loaded ${category} symbols`, 'text-blue-400');
},
startTrading: function() {
if (Object.keys(this.selectedSymbols).filter(sym => this.selectedSymbols[sym]).length === 0) {
this.log('No symbols selected for trading', 'text-yellow-400');
return;
}
this.tradingActive = true;
document.getElementById('status-text').textContent = 'Trading Active';
document.getElementById('status-indicator').classList.remove('bg-danger');
document.getElementById('status-indicator').classList.add('bg-success');
// Add pulse animation
document.querySelector('.status-pulse').classList.add('after:bg-success');
this.log('🚀 Trading bot started successfully', 'text-green-400');
this.playSound(800, 200);
// Simulate trading activity
if (this.tradingInterval) clearInterval(this.tradingInterval);
this.tradingInterval = setInterval(() => {
if (!this.tradingActive) return;
// Simulate trades
Object.keys(this.selectedSymbols).forEach(symbol => {
if (this.selectedSymbols[symbol] && Math.random() > 0.8) {
const action = Math.random() > 0.5 ? 'BUY' : 'SELL';
this.simulateTrade(symbol, action);
}
});
}, 5000);
},
stopTrading: function() {
this.tradingActive = false;
document.getElementById('status-text').textContent = 'Idle';
document.getElementById('status-indicator').classList.remove('bg-success');
document.getElementById('status-indicator').classList.add('bg-danger');
// Remove pulse animation
document.querySelector('.status-pulse').classList.remove('after:bg-success');
this.log('🛑 Trading bot stopped', 'text-red-400');
this.playSound(400, 300);
if (this.tradingInterval) clearInterval(this.tradingInterval);
},
closeAllTrades: function() {
if (Object.keys(this.activeTrades).length === 0) {
this.log('No open positions to close', 'text-yellow-400');
return;
}
this.log('Closing all open positions...', 'text-orange-400');
// Simulate closing all trades
Object.keys(this.activeTrades).forEach(ticket => {
const trade = this.activeTrades[ticket];
const profit = (Math.random() * 50 - 20).toFixed(2);
this.log(`Closed ${trade.symbol} ${trade.direction} (P/L: $${profit})`, profit >= 0 ? 'text-green-400' : 'text-red-400');
delete this.activeTrades[ticket];
});
this.simulatePositions();
this.playSound(600, 200);
},
addToWatchList: function() {
let addedAny = false;
Object.keys(this.selectedSymbols).forEach(symbol => {
if (this.selectedSymbols[symbol] && !this.watchList[symbol]) {
this.addWatchListItem(symbol);
addedAny = true;
}
});
if (!addedAny) {
this.log('No symbols selected to add to watchlist', 'text-yellow-400');
} else {
this.playSound(500, 100);
}
},
addWatchListItem: function(symbol) {
const container = document.getElementById('watchlist-container');
// Remove "no symbols" message if present
if (container.querySelector('p.text-gray-400')) {
container.innerHTML = '';
}
const item = document.createElement('div');
item.className = 'flex justify-between items-center bg-gray-800/30 p-2 rounded-lg mb-2';
item.id = `watchlist-${symbol}`;
item.innerHTML = `
<div class="flex items-center">
<span class="font-medium text-sm">${symbol}</span>
</div>
<div class="flex items-center space-x-4">
<div class="text-right">
<div class="text-xs text-gray-400">Bid</div>
<span class="text-green-400 text-sm font-mono" id="bid-${symbol}">--</span>
</div>
<div class="text-right">
<div class="text-xs text-gray-400">Ask</div>
<span class="text-orange-400 text-sm font-mono" id="ask-${symbol}">--</span>
</div>
<button class="remove-watchlist ml-2 text-gray-400 hover:text-danger transition" data-symbol="${symbol}">
<i class="fas fa-times"></i>
</button>
</div>
`;
container.appendChild(item);
// Store reference
this.watchList[symbol] = {
element: item,
bidElement: document.getElementById(`bid-${symbol}`),
askElement: document.getElementById(`ask-${symbol}`),
lastBid: null,
lastAsk: null
};
// Add remove event listener
item.querySelector('.remove-watchlist').addEventListener('click', (e) => {
this.removeFromWatchList(e.target.closest('button').dataset.symbol);
});
this.log(`Added ${symbol} to watchlist`, 'text-blue-400');
},
removeFromWatchList: function(symbol) {
if (this.watchList[symbol]) {
document.getElementById(`watchlist-${symbol}`).remove();
delete this.watchList[symbol];
this.log(`Removed ${symbol} from watchlist`, 'text-blue-400');
this.playSound(300, 100);
}
// Show "no symbols" message if watchlist is empty
if (Object.keys(this.watchList).length === 0) {
const container = document.getElementById('watchlist-container');
container.innerHTML = `
<div class="flex items-center justify-center h-full">
<div class="text-center">
<i class="fas fa-binoculars text-3xl text-gray-600 mb-2"></i>
<p class="text-gray-400">No symbols in watchlist</p>
</div>
</div>
`;
}
},
clearWatchList: function() {
Object.keys(this.watchList).forEach(symbol => {
this.removeFromWatchList(symbol);
});
},
updateWatchListPrices: function() {
Object.keys(this.watchList).forEach(symbol => {
// Simulate price changes
const change = (Math.random() * 0.001 - 0.0005);
if (!this.watchList[symbol].lastBid) {
// Initial price (random between 0.9 and 1.1 for forex, higher for others)
const basePrice = symbol === 'XAUUSD' ? 1800 + Math.random() * 200 :
symbol.includes('USD') ? 0.9 + Math.random() * 0.2 :
symbol === 'BTCUSD' ? 30000 + Math.random() * 10000 :
symbol === 'ETHUSD' ? 2000 + Math.random() * 1000 :
symbol === 'US30' ? 35000 + Math.random() * 2000 :
symbol === 'SPX500' ? 4500 + Math.random() * 500 :
100 + Math.random() * 100;
this.watchList[symbol].lastBid = basePrice;
this.watchList[symbol].lastAsk = basePrice + 0.0001;
} else {
this.watchList[symbol].lastBid += change;
this.watchList[symbol].lastAsk = this.watchList[symbol].lastBid + 0.0001;
}
// Update display
const bidElement = this.watchList[symbol].bidElement;
const askElement = this.watchList[symbol].askElement;
bidElement.textContent = this.watchList[symbol].lastBid.toFixed(symbol === 'XAUUSD' ? 2 : 5);
askElement.textContent = this.watchList[symbol].lastAsk.toFixed(symbol === 'XAUUSD' ? 2 : 5);
// Color change animation
if (this.watchList[symbol].lastBidChange !== undefined) {
if (this.watchList[symbol].lastBid < this.watchList[symbol].lastBidChange) {
bidElement.classList.add('text-red-400');
bidElement.classList.remove('text-green-400');
} else if (this.watchList[symbol].lastBid > this.watchList[symbol].lastBidChange) {
bidElement.classList.add('text-green-400');
bidElement.classList.remove('text-red-400');
}
setTimeout(() => {
bidElement.classList.remove('text-red-400', 'text-green-400');
bidElement.classList.add('text-green-400');
}, 1000);
}
this.watchList[symbol].lastBidChange = this.watchList[symbol].lastBid;
});
},
simulateTrade: function(symbol, action) {
if (this.avoidRepeat && this.lastTraded[symbol] &&
(new Date() - this.lastTraded[symbol]) < 600000) {
this.log(`Avoiding repeat trade on ${symbol} (10min cooldown)`, 'text-yellow-400');
return;
}
const price = action === 'BUY' ?
(this.watchList[symbol]?.lastAsk || 1.0) :
(this.watchList[symbol]?.lastBid || 1.0);
const lotSize = parseFloat(document.getElementById('lot-size').value) || 0.01;
const slPips = parseInt(document.getElementById('sl-pips').value) || 15;
const tpPips = parseInt(document.getElementById('tp-pips').value) || 25;
const pipValue = symbol === 'XAUUSD' ? 0.1 : 0.0001;
const sl = action === 'BUY' ?
(price - slPips * pipValue).toFixed(5) :
(price + slPips * pipValue).toFixed(5);
const tp = action === 'BUY' ?
(price + tpPips * pipValue).toFixed(5) :
(price - tpPips * pipValue).toFixed(5);
this.log(`${action} ${symbol} at ${price.toFixed(5)} (SL: ${sl}, TP: ${tp})`, 'text-green-400');
this.lastTraded[symbol] = new Date();
this.tradeCount++;
// Simulate trade execution
const ticket = Date.now();
this.activeTrades[ticket] = {
symbol: symbol,
direction: action,
entryPrice: price,
sl: parseFloat(sl),
tp: parseFloat(tp),
volume: lotSize,
time: new Date()
};
this.simulatePositions();
this.playSound(600, 100);
},
simulateAccountInfo: function() {
// Simulate account balance changes
const baseBalance = 5000;
const balanceChange = (Math.random() * 100 - 50);
const balance = baseBalance + balanceChange;
const equity = balance + (Math.random() * 500 - 250);
const margin = 250 + (Math.random() * 50 - 25);
const freeMargin = equity - margin;
const profit = equity - baseBalance;
document.getElementById('balance').textContent = `$${baseBalance.toFixed(2)}`;
document.getElementById('equity').textContent = `$${equity.toFixed(2)}`;
document.getElementById('margin').textContent = `$${margin.toFixed(2)}`;
document.getElementById('free-margin').textContent = `$${freeMargin.toFixed(2)}`;
// Update P/L displays
const dailyPL = 120.50 + (Math.random() * 50 - 25);
const weeklyPL = 420.75 + (Math.random() * 100 - 50);
const monthlyPL = 1245.30 + (Math.random() * 200 - 100);
const totalPL = 3245.30 + (Math.random() * 300 - 150);
document.getElementById('daily-pl').textContent = `${dailyPL >= 0 ? '+' : ''}$${dailyPL.toFixed(2)}`;
document.getElementById('daily-pl').className = dailyPL >= 0 ? 'font-medium text-success' : 'font-medium text-danger';
document.getElementById('weekly-pl').textContent = `${weeklyPL >= 0 ? '+' : ''}$${weeklyPL.toFixed(2)}`;
document.getElementById('weekly-pl').className = weeklyPL >= 0 ? 'font-medium text-success' : 'font-medium text-danger';
document.getElementById('monthly-pl').textContent = `${monthlyPL >= 0 ? '+' : ''}$${monthlyPL.toFixed(2)}`;
document.getElementById('monthly-pl').className = monthlyPL >= 0 ? 'font-medium text-success' : 'font-medium text-danger';
document.getElementById('total-pl').textContent = `${totalPL >= 0 ? '+' : ''}$${totalPL.toFixed(2)}`;
document.getElementById('total-pl').className = totalPL >= 0 ? 'font-medium text-success' : 'font-medium text-danger';
// Check profit target
if (profit >= this.profitTarget) {
this.log(`Profit target $${this.profitTarget.toFixed(2)} reached! Current P/L: $${profit.toFixed(2)}`, 'text-green-400');
this.playSound(1000, 500);
}
},
simulatePositions: function() {
const container = document.getElementById('positions-container');
const countElement = document.getElementById('positions-count');
if (Object.keys(this.activeTrades).length === 0) {
container.innerHTML = `
<div class="flex items-center justify-center h-full">
<div class="text-center">
<i class="fas fa-box-open text-3xl text-gray-600 mb-2"></i>
<p class="text-gray-400">No open positions</p>
</div>
</div>
`;
countElement.textContent = '0';
return;
}
let html = '';
let totalProfit = 0;
Object.keys(this.activeTrades).forEach(ticket => {
const trade = this.activeTrades[ticket];
const profit = (Math.random() * 100 - 30).toFixed(2);
totalProfit += parseFloat(profit);
const timeStr = trade.time.toLocaleTimeString();
const profitClass = profit >= 0 ? 'text-success' : 'text-danger';
const directionClass = trade.direction === 'BUY' ? 'text-success' : 'text-danger';
html += `
<div class="p-3 rounded-lg bg-gray-800/50 mb-2">
<div class="flex justify-between items-center mb-1">
<div class="flex items-center">
<span class="font-medium">${trade.symbol}</span>
<span class="text-xs ml-2 px-2 py-1 rounded ${directionClass} bg-gray-700">${trade.direction}</span>
</div>
<span class="${profitClass} font-medium">$${profit}</span>
</div>
<div class="grid grid-cols-2 gap-2 text-xs text-gray-400">
<div>
<div>Entry</div>
<div>${trade.entryPrice.toFixed(5)}</div>
</div>
<div>
<div>Volume</div>
<div>${trade.volume} lots</div>
</div>
<div>
<div>SL</div>
<div>${trade.sl.toFixed(5)}</div>
</div>
<div>
<div>TP</div>
<div>${trade.tp.toFixed(5)}</div>
</div>
</div>
<div class="mt-2 text-xs text-gray-500">
Opened: ${timeStr}
</div>
</div>
`;
});
// Add total summary
html += `
<div class="mt-3 p-3 rounded-lg bg-gray-800 flex justify-between items-center">
<div>
<div class="text-xs text-gray-400">Total Positions</div>
<div class="font-medium">${Object.keys(this.activeTrades).length}</div>
</div>
<div class="text-right">
<div class="text-xs text-gray-400">Total P/L</div>
<div class="font-medium ${totalProfit >= 0 ? 'text-success' : 'text-danger'}">
${totalProfit >= 0 ? '+' : ''}$${totalProfit.toFixed(2)}
</div>
</div>
</div>
`;
container.innerHTML = html;
countElement.textContent = Object.keys(this.activeTrades).length;
},
updateMarketAnalysis: function() {
// Simulate market analysis updates
const trends = ["Bullish", "Bearish", "Neutral"];
const biases = ["Buy", "Sell", "Neutral"];
// Forex updates
this.marketUpdates.Forex.trend = trends[Math.floor(Math.random() * trends.length)];
this.marketUpdates.Forex.bias = this.marketUpdates.Forex.trend === "Bullish" ? "Buy" :
this.marketUpdates.Forex.trend === "Bearish" ? "Sell" : "Neutral";
const forexComments = [
"USD weakening on Fed rate cut expectations",
"EUR gaining strength after positive PMI data",
"Markets consolidating ahead of NFP report",
"Risk-on sentiment supporting commodity currencies",
"Safe-haven flows boosting JPY and CHF"
];
this.marketUpdates.Forex.comment = forexComments[Math.floor(Math.random() * forexComments.length)];
// Gold updates
this.marketUpdates.Gold.trend = trends[Math.floor(Math.random() * trends.length)];
this.marketUpdates.Gold.bias = this.marketUpdates.Gold.trend === "Bullish" ? "Buy" :
this.marketUpdates.Gold.trend === "Bearish" ? "Sell" : "Neutral";
const goldComments = [
"Gold supported by geopolitical tensions",
"Real yields pressuring gold prices",
"Central bank buying supporting gold",
"Inflation hedge demand increasing",
"Range-bound between key support/resistance levels"
];
this.marketUpdates.Gold.comment = goldComments[Math.floor(Math.random() * goldComments.length)];
// Crypto updates
this.marketUpdates.Crypto.trend = trends[Math.floor(Math.random() * trends.length)];
this.marketUpdates.Crypto.bias = this.marketUpdates.Crypto.trend === "Bullish" ? "Buy" :
this.marketUpdates.Crypto.trend === "Bearish" ? "Sell" : "Neutral";
const cryptoComments = [
"BTC ETF inflows supporting prices",
"Altcoin season may be starting",
"Regulatory concerns weighing on market",
"Institutional adoption increasing",
"Volatility expected with upcoming events"
];
this.marketUpdates.Crypto.comment = cryptoComments[Math.floor(Math.random() * cryptoComments.length)];
// Update UI
this.updateMarketUpdatesDisplay();
},
updateMarketUpdatesDisplay: function() {
// Forex
const forexTrend = this.marketUpdates.Forex.trend;
document.getElementById('forex-trend').textContent = forexTrend;
document.getElementById('forex-trend').className = `text-xs px-2 py-1 rounded-full ${
forexTrend === "Bullish" ? "bg-green-900/30 text-green-300" :
forexTrend === "Bearish" ? "bg-red-900/30 text-red-300" : "bg-gray-600 text-gray-300"
}`;
const forexBias = this.marketUpdates.Forex.bias;
document.getElementById('forex-bias').textContent = `Bias: ${forexBias}`;
document.getElementById('forex-comment').textContent = this.marketUpdates.Forex.comment;
// Set recommendations based on trend
if (forexTrend === "Bullish") {
document.getElementById('forex-recommendations').textContent = "EURUSD, GBPUSD, AUDUSD";
} else if (forexTrend === "Bearish") {
document.getElementById('forex-recommendations').textContent = "USDJPY, USDCHF, USDCAD";
} else {
document.getElementById('forex-recommendations').textContent = "EURUSD, USDJPY, AUDUSD";
}
// Gold
const goldTrend = this.marketUpdates.Gold.trend;
document.getElementById('gold-trend').textContent = goldTrend;
document.getElementById('gold-trend').className = `text-xs px-2 py-1 rounded-full ${
goldTrend === "Bullish" ? "bg-green-900/30 text-green-300" :
goldTrend === "Bearish" ? "bg-red-900/30 text-red-300" : "bg-gray-600 text-gray-300"
}`;
const goldBias = this.marketUpdates.Gold.bias;
document.getElementById('gold-bias').textContent = `Bias: ${goldBias}`;
document.getElementById('gold-comment').textContent = this.marketUpdates.Gold.comment;
if (goldTrend === "Bullish") {
document.getElementById('gold-recommendation').textContent = "Look for buying opportunities";
document.getElementById('gold-recommendation').className = "text-green-300 text-xs";
} else if (goldTrend === "Bearish") {
document.getElementById('gold-recommendation').textContent = "Consider short positions";
document.getElementById('gold-recommendation').className = "text-red-300 text-xs";
} else {
document.getElementById('gold-recommendation').textContent = "Wait for breakout";
document.getElementById('gold-recommendation').className = "text-yellow-300 text-xs";
}
// Crypto
const cryptoTrend = this.marketUpdates.Crypto.trend;
document.getElementById('crypto-trend').textContent = cryptoTrend;
document.getElementById('crypto-trend').className = `text-xs px-2 py-1 rounded-full ${
cryptoTrend === "Bullish" ? "bg-green-900/30 text-green-300" :
cryptoTrend === "Bearish" ? "bg-red-900/30 text-red-300" : "bg-gray-600 text-gray-300"
}`;
const cryptoBias = this.marketUpdates.Crypto.bias;
document.getElementById('crypto-bias').textContent = `Bias: ${cryptoBias}`;
document.getElementById('crypto-comment').textContent = this.marketUpdates.Crypto.comment;
if (cryptoTrend === "Bullish") {
document.getElementById('crypto-recommendations').textContent = "BTCUSD, ETHUSD";
document.getElementById('crypto-recommendations').className = "text-green-300 text-xs";
} else if (cryptoTrend === "Bearish") {
document.getElementById('crypto-recommendations').textContent = "Consider shorts";
document.getElementById('crypto-recommendations').className = "text-red-300 text-xs";
} else {
document.getElementById('crypto-recommendations').textContent = "BTCUSD, ETHUSD";
document.getElementById('crypto-recommendations').className = "text-yellow-300 text-xs";
}
// Market sentiment
const bullishCount = [this.marketUpdates.Forex.trend, this.marketUpdates.Gold.trend, this.marketUpdates.Crypto.trend]
.filter(t => t === "Bullish").length;
const bearishCount = [this.marketUpdates.Forex.trend, this.marketUpdates.Gold.trend, this.marketUpdates.Crypto.trend]
.filter(t => t === "Bearish").length;
let sentiment, sentimentColor, sentimentComment;
if (bullishCount > bearishCount) {
sentiment = "Bullish";
sentimentColor = "bg-green-900/30 text-green-300";
sentimentComment = "Risk-on environment, favorable for longs";
} else if (bearishCount > bullishCount) {
sentiment = "Bearish";
sentimentColor = "bg-red-900/30 text-red-300";
sentimentComment = "Risk-off environment, consider defensive positions";
} else {
sentiment = "Neutral";
sentimentColor = "bg-gray-600 text-gray-300";
sentimentComment = "Markets in balance, trade ranges";
}
document.getElementById('market-sentiment').textContent = sentiment;
document.getElementById('market-sentiment').className = `text-xs px-2 py-1 rounded-full ${sentimentColor}`;
document.getElementById('sentiment-comment').textContent = sentimentComment;
// Trading tip
const tips = [
"Trade with the trend - it's your friend",
"Always use stop losses to protect your capital",
"Let profits run, cut losses short",
"Risk no more than 1-2% per trade",
"Avoid overtrading - quality over quantity",
"Wait for confirmation before entering trades",
"Keep a trading journal to improve your skills",
"Emotional control is key to trading success"
];
document.getElementById('trading-tip').textContent = tips[Math.floor(Math.random() * tips.length)];
},
updateProfitTargetDisplay: function() {
let target = 25.00;
const mode = this.profitMode;
if (mode === 'fixed_10') {
target = 10.00;
} else if (mode === 'fixed_25') {
target = 25.00;
} else if (mode === 'fixed_50') {
target = 50.00;
} else if (mode === 'fixed_100') {
target = 100.00;
} else if (mode.startsWith('percent_')) {
const percentage = parseFloat(mode.split('_')[1]);
const balance = parseFloat(document.getElementById('balance').textContent.replace('$',
<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=Dennis-78/codeing" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quantum Trader Pro - Advanced MT5 Trading Bot</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#3b82f6',
secondary: '#10b981',
dark: '#0f172a',
darker: '#020617',
accent: '#6366f1',
success: '#10b981',
danger: '#ef4444',
warning: '#f59e0b',
info: '#3b82f6',
chart: {
blue: '#3b82f6',
green: '#10b981',
red: '#ef4444',
purple: '#8b5cf6',
yellow: '#f59e0b'
}
},
animation: {
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
'ping-slow': 'ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite',
'float': 'float 6s ease-in-out infinite',
'wave': 'wave 1.5s linear infinite'
},
keyframes: {
float: {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-10px)' }
},
wave: {
'0%': { transform: 'translateX(0)' },
'100%': { transform: 'translateX(-100%)' }
}
}
}
}
}
</script>
<style>
/* Custom scrollbar */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.1);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.2);
}
/* Glow effects */
.glow-primary {
box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}
.glow-success {
box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}
.glow-danger {
box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}
.glow-accent {
box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}
/* Gradient text */
.gradient-text {
background: linear-gradient(90deg, #3b82f6, #6366f1);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
/* Trading card hover effect */
.trading-card {
transition: all 0.3s ease;
border: 1px solid rgba(255, 255, 255, 0.05);
position: relative;
overflow: hidden;
}
.trading-card:hover {
transform: translateY(-3px);
border-color: rgba(99, 102, 241, 0.5);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);