| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>Risk Management - MetaTrader Command Center</title> |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> |
| <script src="https://cdn.tailwindcss.com"></script> |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> |
| <script src="https://unpkg.com/feather-icons"></script> |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> |
| <script> |
| tailwind.config = { |
| darkMode: 'class', |
| theme: { |
| extend: { |
| colors: { |
| primary: { |
| 50: '#f0f9ff', |
| 100: '#e0f2fe', |
| 200: '#bae6fd', |
| 300: '#7dd3fc', |
| 400: '#38bdf8', |
| 500: '#0ea5e9', |
| 600: '#0284c7', |
| 700: '#0369a1', |
| 800: '#075985', |
| 900: '#0c4a6e', |
| }, |
| secondary: { |
| 50: '#fdf2f8', |
| 100: '#fce7f3', |
| 200: '#fbcfe8', |
| 300: '#f9a8d4', |
| 400: '#f472b6', |
| 500: '#ec4899', |
| 600: '#db2777', |
| 700: '#be185d', |
| 800: '#9d174d', |
| 900: '#831843', |
| } |
| } |
| } |
| } |
| } |
| </script> |
| <style> |
| @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); |
| body { |
| font-family: 'Inter', sans-serif; |
| background-color: #0f172a; |
| color: #e2e8f0; |
| } |
| .glass-effect { |
| background: rgba(30, 41, 59, 0.7); |
| backdrop-filter: blur(10px); |
| border: 1px solid rgba(148, 163, 184, 0.2); |
| } |
| .risk-card { |
| transition: all 0.3s ease; |
| } |
| .risk-card:hover { |
| transform: translateY(-3px); |
| box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3); |
| } |
| .risk-level-low { border-left: 4px solid #4ade80; } |
| .risk-level-medium { border-left: 4px solid #fbbf24; } |
| .risk-level-high { border-left: 4px solid #f87171; } |
| .progress-bar { |
| height: 8px; |
| border-radius: 4px; |
| overflow: hidden; |
| background: #334155; |
| } |
| .progress-fill { |
| height: 100%; |
| border-radius: 4px; |
| } |
| |
| .mobile-menu { |
| display: none; |
| } |
| @media (max-width: 768px) { |
| .desktop-menu { |
| display: none; |
| } |
| .mobile-menu { |
| display: block; |
| } |
| .mobile-menu-content { |
| max-height: 0; |
| overflow: hidden; |
| transition: max-height 0.3s ease-out; |
| } |
| .mobile-menu-content.open { |
| max-height: 500px; |
| transition: max-height 0.5s ease-in; |
| } |
| } |
| </style> |
| </head> |
| <body class="bg-slate-900 text-slate-100 min-h-screen"> |
| |
| <div class="flex flex-col md:flex-row min-h-screen"> |
| |
| <div class="w-full md:w-64 glass-effect p-4 flex flex-col"> |
| <div class="mb-8"> |
| <h1 class="text-2xl font-bold text-primary-400 flex items-center"> |
| <i data-feather="activity" class="mr-2"></i> |
| MT5 Command |
| </h1> |
| <p class="text-xs text-slate-400 mt-1">Trading Control Panel</p> |
| </div> |
|
|
| |
| <div class="mobile-menu mb-4"> |
| <button id="mobile-menu-toggle" class="w-full flex justify-between items-center p-3 rounded-lg bg-slate-800 hover:bg-slate-700"> |
| <span>Menu</span> |
| <i data-feather="menu" class="w-5 h-5"></i> |
| </button> |
| <div id="mobile-menu-content" class="mobile-menu-content bg-slate-800 rounded-lg mt-2"> |
| <ul class="py-2"> |
| <li> |
| <a href="index.html" class="flex items-center p-3 rounded-lg hover:bg-slate-700"> |
| <i data-feather="home" class="mr-3 w-5 h-5"></i> |
| <span>Dashboard</span> |
| </a> |
| </li> |
| <li> |
| <a href="trading-view.html" class="flex items-center p-3 rounded-lg hover:bg-slate-700"> |
| <i data-feather="bar-chart-2" class="mr-3 w-5 h-5"></i> |
| <span>Trading View</span> |
| </a> |
| </li> |
| <li> |
| <a href="experts.html" class="flex items-center p-3 rounded-lg hover:bg-slate-700"> |
| <i data-feather="settings" class="mr-3 w-5 h-5"></i> |
| <span>Expert Advisors</span> |
| </a> |
| </li> |
| <li> |
| <a href="calculator.html" class="flex items-center p-3 rounded-lg hover:bg-slate-700"> |
| <i data-feather="calculator" class="mr-3 w-5 h-5"></i> |
| <span>Position Calculator</span> |
| </a> |
| </li> |
| <li> |
| <a href="strategies.html" class="flex items-center p-3 rounded-lg hover:bg-slate-700"> |
| <i data-feather="layers" class="mr-3 w-5 h-5"></i> |
| <span>Strategies</span> |
| </a> |
| </li> |
| <li> |
| <a href="risk-management.html" class="flex items-center p-3 rounded-lg bg-primary-600 text-white"> |
| <i data-feather="shield" class="mr-3 w-5 h-5"></i> |
| <span>Risk Management</span> |
| </a> |
| </li> |
| <li> |
| <a href="reports.html" class="flex items-center p-3 rounded-lg hover:bg-slate-700"> |
| <i data-feather="file-text" class="mr-3 w-5 h-5"></i> |
| <span>Reports</span> |
| </a> |
| </li> |
| <li> |
| <a href="account-connection.html" class="flex items-center p-3 rounded-lg hover:bg-slate-700"> |
| <i data-feather="link" class="mr-3 w-5 h-5"></i> |
| <span>Account Connection</span> |
| </a> |
| </li> |
| </ul> |
| </div> |
| </div> |
|
|
| |
| <nav class="flex-1 desktop-menu"> |
| <ul class="space-y-2"> |
| <li> |
| <a href="index.html" class="flex items-center p-3 rounded-lg hover:bg-slate-800"> |
| <i data-feather="home" class="mr-3"></i> |
| Dashboard |
| </a> |
| </li> |
| <li> |
| <a href="trading-view.html" class="flex items-center p-3 rounded-lg hover:bg-slate-800"> |
| <i data-feather="bar-chart-2" class="mr-3"></i> |
| Trading View |
| </a> |
| </li> |
| <li> |
| <a href="experts.html" class="flex items-center p-3 rounded-lg hover:bg-slate-800"> |
| <i data-feather="settings" class="mr-3"></i> |
| Expert Advisors |
| </a> |
| </li> |
| <li> |
| <a href="calculator.html" class="flex items-center p-3 rounded-lg hover:bg-slate-800"> |
| <i data-feather="calculator" class="mr-3"></i> |
| Position Calculator |
| </a> |
| </li> |
| <li> |
| <a href="strategies.html" class="flex items-center p-3 rounded-lg hover:bg-slate-800"> |
| <i data-feather="layers" class="mr-3"></i> |
| Strategies |
| </a> |
| </li> |
| <li> |
| <a href="risk-management.html" class="flex items-center p-3 rounded-lg bg-primary-600 text-white"> |
| <i data-feather="shield" class="mr-3"></i> |
| Risk Management |
| </a> |
| </li> |
| <li> |
| <a href="reports.html" class="flex items-center p-3 rounded-lg hover:bg-slate-800"> |
| <i data-feather="file-text" class="mr-3"></i> |
| Reports |
| </a> |
| </li> |
| <li> |
| <a href="account-connection.html" class="flex items-center p-3 rounded-lg hover:bg-slate-800"> |
| <i data-feather="link" class="mr-3"></i> |
| Account Connection |
| </a> |
| </li> |
| </ul> |
| </nav> |
|
|
| <div class="mt-auto pt-4 border-t border-slate-700"> |
| <div class="flex items-center"> |
| <div class="bg-slate-700 rounded-full p-2 mr-3"> |
| <i data-feather="user" class="w-5 h-5"></i> |
| </div> |
| <div> |
| <p class="font-medium">Trader Pro</p> |
| <p class="text-xs text-slate-400">Active Session</p> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="flex-1 overflow-auto"> |
| |
| <header class="glass-effect p-4 flex justify-between items-center"> |
| <div> |
| <h2 class="text-xl font-bold">Risk Management</h2> |
| <p class="text-sm text-slate-400">Monitor and control trading risks</p> |
| </div> |
| <div class="flex items-center space-x-4"> |
| <button class="bg-slate-800 hover:bg-slate-700 px-4 py-2 rounded-lg flex items-center"> |
| <i data-feather="settings" class="mr-2"></i> |
| Settings |
| </button> |
| </div> |
| </header> |
| |
| <div class="p-4 grid grid-cols-1 md:grid-cols-4 gap-4"> |
| <div class="glass-effect rounded-xl p-4"> |
| <div class="flex justify-between items-start"> |
| <div> |
| <p class="text-slate-400 text-sm">Current Exposure</p> |
| <p class="text-2xl font-bold">3.2%</p> |
| </div> |
| <div class="bg-blue-500/20 p-2 rounded-lg"> |
| <i data-feather="bar-chart" class="text-blue-500"></i> |
| </div> |
| </div> |
| <p class="text-green-500 text-sm mt-2">Within limits</p> |
| </div> |
|
|
| <div class="glass-effect rounded-xl p-4"> |
| <div class="flex justify-between items-start"> |
| <div> |
| <p class="text-slate-400 text-sm">Daily Limit</p> |
| <p class="text-2xl font-bold">5.0%</p> |
| </div> |
| <div class="bg-green-500/20 p-2 rounded-lg"> |
| <i data-feather="check-circle" class="text-green-500"></i> |
| </div> |
| </div> |
| <p class="text-slate-400 text-sm mt-2">64% remaining</p> |
| </div> |
|
|
| <div class="glass-effect rounded-xl p-4"> |
| <div class="flex justify-between items-start"> |
| <div> |
| <p class="text-slate-400 text-sm">Max Drawdown</p> |
| <p class="text-2xl font-bold">-2.1%</p> |
| </div> |
| <div class="bg-yellow-500/20 p-2 rounded-lg"> |
| <i data-feather="trending-down" class="text-yellow-500"></i> |
| </div> |
| </div> |
| <p class="text-slate-400 text-sm mt-2">Acceptable level</p> |
| </div> |
|
|
| <div class="glass-effect rounded-xl p-4"> |
| <div class="flex justify-between items-start"> |
| <div> |
| <p class="text-slate-400 text-sm">Risk Rating</p> |
| <p class="text-2xl font-bold">B+</p> |
| </div> |
| <div class="bg-purple-500/20 p-2 rounded-lg"> |
| <i data-feather="award" class="text-purple-500"></i> |
| </div> |
| </div> |
| <p class="text-slate-400 text-sm mt-2">Conservative profile</p> |
| </div> |
| </div> |
|
|
| |
| <div class="p-4"> |
| <div class="glass-effect rounded-xl p-4"> |
| <h3 class="font-bold mb-4">Risk Controls</h3> |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"> |
| <div class="risk-card glass-effect rounded-lg p-4"> |
| <div class="flex items-center mb-3"> |
| <div class="bg-blue-500/20 p-2 rounded-lg mr-3"> |
| <i data-feather="sliders" class="text-blue-500 w-5 h-5"></i> |
| </div> |
| <h4 class="font-medium">Position Limits</h4> |
| </div> |
| <p class="text-sm text-slate-400 mb-3">Set maximum exposure per position</p> |
| <div class="flex items-center justify-between"> |
| <span class="text-sm">Enabled</span> |
| <div class="relative inline-block w-10 mr-2 align-middle select-none"> |
| <input type="checkbox" name="toggle" id="positionLimits" class="checked:bg-blue-500 outline-none focus:ring-0" checked> |
| <label for="positionLimits" class="block h-6 w-10 cursor-pointer rounded-full bg-slate-700 border border-slate-600"></label> |
| </div> |
| </div> |
| </div> |
| |
| <div class="risk-card glass-effect rounded-lg p-4"> |
| <div class="flex items-center mb-3"> |
| <div class="bg-green-500/20 p-2 rounded-lg mr-3"> |
| <i data-feather="clock" class="text-green-500 w-5 h-5"></i> |
| </div> |
| <h4 class="font-medium">Time-based Stops</h4> |
| </div> |
| <p class="text-sm text-slate-400 mb-3">Auto-close positions after time limit</p> |
| <div class="flex items-center justify-between"> |
| <span class="text-sm">Enabled</span> |
| <div class="relative inline-block w-10 mr-2 align-middle select-none"> |
| <input type="checkbox" name="toggle" id="timeStops" class="checked:bg-blue-500 outline-none focus:ring-0" checked> |
| <label for="timeStops" class="block h-6 w-10 cursor-pointer rounded-full bg-slate-700 border border-slate-600"></label> |
| </div> |
| </div> |
| </div> |
| |
| <div class="risk-card glass-effect rounded-lg p-4"> |
| <div class="flex items-center mb-3"> |
| <div class="bg-yellow-500/20 p-2 rounded-lg mr-3"> |
| <i data-feather="alert-triangle" class="text-yellow-500 w-5 h-5"></i> |
| </div> |
| <h4 class="font-medium">Drawdown Limits</h4> |
| </div> |
| <p class="text-sm text-slate-400 mb-3">Pause trading when drawdown exceeds threshold</p> |
| <div class="flex items-center justify-between"> |
| <span class="text-sm">Enabled</span> |
| <div class="relative inline-block w-10 mr-2 align-middle select-none"> |
| <input type="checkbox" name="toggle" id="drawdownLimits" class="checked:bg-blue-500 outline-none focus:ring-0" checked> |
| <label for="drawdownLimits" class="block h-6 w-10 cursor-pointer rounded-full bg-slate-700 border border-slate-600"></label> |
| </div> |
| </div> |
| </div> |
| |
| <div class="risk-card glass-effect rounded-lg p-4"> |
| <div class="flex items-center mb-3"> |
| <div class="bg-red-500/20 p-2 rounded-lg mr-3"> |
| <i data-feather="pause" class="text-red-500 w-5 h-5"></i> |
| </div> |
| <h4 class="font-medium">Emergency Stop</h4> |
| </div> |
| <p class="text-sm text-slate-400 mb-3">Immediate halt to all trading activities</p> |
| <div class="flex items-center justify-between"> |
| <span class="text-sm">Disabled</span> |
| <div class="relative inline-block w-10 mr-2 align-middle select-none"> |
| <input type="checkbox" name="toggle" id="emergencyStop" class="checked:bg-blue-500 outline-none focus:ring-0"> |
| <label for="emergencyStop" class="block h-6 w-10 cursor-pointer rounded-full bg-slate-700 border border-slate-600"></label> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="p-4"> |
| <div class="glass-effect rounded-xl p-4"> |
| <h3 class="font-bold mb-4">Portfolio Risk Analysis</h3> |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6"> |
| <div> |
| <h4 class="font-medium mb-3">Asset Allocation</h4> |
| <div class="space-y-4"> |
| <div class="flex items-center"> |
| <div class="w-32 text-sm text-slate-400">EURUSD</div> |
| <div class="flex-1 ml-2"> |
| <div class="progress-bar"> |
| <div class="progress-fill bg-blue-500" style="width: 35%"></div> |
| </div> |
| </div> |
| <div class="w-12 text-right text-sm">35%</div> |
| </div> |
| <div class="flex items-center"> |
| <div class="w-32 text-sm text-slate-400">GBPUSD</div> |
| <div class="flex-1 ml-2"> |
| <div class="progress-bar"> |
| <div class="progress-fill bg-green-500" style="width: 25%"></div> |
| </div> |
| </div> |
| <div class="w-12 text-right text-sm">25%</div> |
| </div> |
| <div class="flex items-center"> |
| <div class="w-32 text-sm text-slate-400">USDJPY</div> |
| <div class="flex-1 ml-2"> |
| <div class="progress-bar"> |
| <div class="progress-fill bg-yellow-500" style="width: 20%"></div> |
| </div> |
| </div> |
| <div class="w-12 text-right text-sm">20%</div> |
| </div> |
| <div class="flex items-center"> |
| <div class="w-32 text-sm text-slate-400">Others</div> |
| <div class="flex-1 ml-2"> |
| <div class="progress-bar"> |
| <div class="progress-fill bg-purple-500" style="width: 20%"></div> |
| </div> |
| </div> |
| <div class="w-12 text-right text-sm">20%</div> |
| </div> |
| </div> |
| </div> |
| <div> |
| <h4 class="font-medium mb-3">Risk by Strategy</h4> |
| <div class="space-y-4"> |
| <div class="flex items-center"> |
| <div class="w-32 text-sm text-slate-400">Scalping</div> |
| <div class="flex-1 ml-2"> |
| <div class="progress-bar"> |
| <div class="progress-fill bg-blue-500" style="width: 40%"></div> |
| </div> |
| </div> |
| <div class="w-12 text-right text-sm">Low</div> |
| </div> |
| <div class="flex items-center"> |
| <div class="w-32 text-sm text-slate-400">Trend Following</div> |
| <div class="flex-1 ml-2"> |
| <div class="progress-bar"> |
| <div class="progress-fill bg-green-500" style="width: 60%"></div> |
| </div> |
| </div> |
| <div class="w-12 text-right text-sm">Medium</div> |
| </div> |
| <div class="flex items-center"> |
| <div class="w-32 text-sm text-slate-400">Breakout</div> |
| <div class="flex-1 ml-2"> |
| <div class="progress-bar"> |
| <div class="progress-fill bg-yellow-500" style="width: 80%"></div> |
| </div> |
| </div> |
| <div class="w-12 text-right text-sm">High</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="p-4"> |
| <div class="glass-effect rounded-xl p-4"> |
| <div class="flex justify-between items-center mb-4"> |
| <h3 class="font-bold">Risk Alerts</h3> |
| <button class="text-sm text-primary-400">View History</button> |
| </div> |
| <div class="space-y-3"> |
| <div class="flex items-start p-3 bg-slate-800 rounded-lg risk-level-medium"> |
| <div class="mr-3 mt-1"> |
| <i data-feather="alert-triangle" class="text-yellow-500 w-5 h-5"></i> |
| </div> |
| <div> |
| <p class="font-medium">Portfolio concentration risk detected</p> |
| <p class="text-sm text-slate-400">EURUSD exposure exceeds 30% threshold</p> |
| <p class="text-xs text-slate-500 mt-1">2 hours ago</p> |
| </div> |
| </div> |
| <div class="flex items-start p-3 bg-slate-800 rounded-lg risk-level-low"> |
| <div class="mr-3 mt-1"> |
| <i data-feather="info" class="text-blue-500 w-5 h-5"></i> |
| </div> |
| <div> |
| <p class="font-medium">New correlation detected</p> |
| <p class="text-sm text-slate-400">GBPUSD and EURGBP showing increased correlation</p> |
| <p class="text-xs text-slate-500 mt-1">1 day ago</p> |
| </div> |
| </div> |
| <div class="flex items-start p-3 bg-slate-800 rounded-lg risk-level-high"> |
| <div class="mr-3 mt-1"> |
| <i data-feather="alert-circle" class="text-red-500 w-5 h-5"></i> |
| </div> |
| <div> |
| <p class="font-medium">High volatility warning</p> |
| <p class="text-sm text-slate-400">USDJPY volatility 2x historical average</p> |
| <p class="text-xs text-slate-500 mt-1">2 days ago</p> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <script> |
| |
| feather.replace(); |
| |
| |
| document.addEventListener('DOMContentLoaded', function() { |
| const menuToggle = document.getElementById('mobile-menu-toggle'); |
| const menuContent = document.getElementById('mobile-menu-content'); |
| |
| if (menuToggle && menuContent) { |
| menuToggle.addEventListener('click', function() { |
| const icon = this.querySelector('[data-feather]'); |
| if (menuContent.classList.contains('open')) { |
| menuContent.classList.remove('open'); |
| icon.setAttribute('data-feather', 'menu'); |
| } else { |
| menuContent.classList.add('open'); |
| icon.setAttribute('data-feather', 'x'); |
| } |
| feather.replace(); |
| }); |
| } |
| }); |
| </script> |
| </body> |
| </html> |
|
|