Total Trades

284

This month: 47

Win Rate

68.3%

194 wins • 90 losses

Total P&L

+$4,250

+8.5% return

Profit Factor

1.85

Gross: $8,750 / Loss: $4,500

Equity Curve

to

Recent Trades

Showing 20 of 284 trades

Time Symbol Type Volume Open Close P&L Details

2024-01-15

14:35:22

EUR/USD BUY 0.20 1.08542 1.08765

+$44.60

+22.3 pips

2024-01-15

13:22:15

GBP/JPY SELL 0.15 185.234 185.123

+$16.50

+11.1 pips

2024-01-15

11:45:33

XAU/USD BUY 0.10 2015.30 2012.45

-$28.50

-28.5 pips

2024-01-15

10:15:12

USD/JPY BUY 0.25 149.875 150.125

+$62.50

+25.0 pips

2024-01-15

09:30:45

EUR/GBP SELL 0.20 0.85642 0.85865

-$44.60

-22.3 pips

Showing 1-20 of 284

Performance by Symbol

EU EUR/USD

+$1,250

72 trades

GJ GBP/JPY

+$980

45 trades

XU XAU/USD

+$1,520

38 trades

UJ USD/JPY

-$500

29 trades

Daily Performance

Monday

+$450

Tuesday

+$320

Wednesday

-$180

Thursday

+$680

Friday

+$1,240

+ context.parsed.y.toLocaleString(); } } } }, scales: { x: { grid: { color: 'rgba(75, 85, 99, 0.3)' }, ticks: { color: '#9CA3AF' } }, y: { grid: { color: 'rgba(75, 85, 99, 0.3)' }, ticks: { color: '#9CA3AF', callback: function(value) { return ' + value.toLocaleString(); } } } } } }); // Real-time equity updates function updateEquityChart() { const newEquity = 50850 + (Math.random() - 0.5) * 200; const newData = equityChart.data.datasets[0].data; newData.push(newEquity); newData.shift(); const currentTime = new Date(); const timeLabel = currentTime.getHours() + ':00'; const labels = equityChart.data.labels; labels.push(timeLabel); labels.shift(); equityChart.update('none'); } // Trade detail modal function showTradeDetail(tradeId) { const modal = document.createElement('div'); modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/50'; modal.innerHTML = `

Trade Details - #${tradeId}

Symbol

EUR/USD

Type

BUY

Volume

0.20 lots

Duration

2h 15m

Price Timeline

Open 2024-01-15 14:35:22 - 1.08542
Highest 1.08780
Lowest 1.08490
Close 2024-01-15 16:50:45 - 1.08765

Trade Analysis

`; document.body.appendChild(modal); feather.replace(); // Create mini chart for this trade const tradeCtx = modal.querySelector('#tradeChart').getContext('2d'); new Chart(tradeCtx, { type: 'line', data: { labels: ['14:35', '15:00', '15:30', '16:00', '16:30', '16:50'], datasets: [{ label: 'Price', data: [1.08542, 1.08620, 1.08580, 1.08690, 1.08730, 1.08765], borderColor: '#3B82F6', backgroundColor: 'rgba(59, 130, 246, 0.1)', tension: 0.4, fill: true }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } }, scales: { x: { display: false }, y: { display: false } } } }); } // Add click handlers to trade rows document.querySelectorAll('.trade-row').forEach(row => { row.addEventListener('click', function() { const tradeId = Math.floor(Math.random() * 100000); showTradeDetail(tradeId); }); }); // Advanced filtering function applyFilters() { const dateFrom = document.querySelector('input[type="date"]').value; const dateTo = document.querySelectorAll('input[type="date"]')[1].value; const symbol = document.querySelector('select').value; const type = document.querySelectorAll('select')[1].value; showNotification('Filters applied successfully', 'success'); // Simulate filtering const rows = document.querySelectorAll('tbody tr'); rows.forEach(row => { if (Math.random() > 0.5) { row.style.display = 'none'; } else { row.style.display = ''; } }); } // Export functionality function exportData(format) { if (format === 'csv') { const csv = generateCSV(); downloadFile(csv, 'trade_history.csv', 'text/csv'); } else if (format === 'pdf') { showNotification('PDF export coming soon', 'info'); } } function generateCSV() { const headers = ['Time', 'Symbol', 'Type', 'Volume', 'Open', 'Close', 'P&L']; const rows = Array.from(document.querySelectorAll('tbody tr')).map(row => { const cells = row.querySelectorAll('td'); return [ cells[0].textContent.trim(), cells[1].textContent.trim(), cells[2].textContent.trim(), cells[3].textContent.trim(), cells[4].textContent.trim(), cells[5].textContent.trim(), cells[6].textContent.trim() ].join(','); }); return [headers.join(','), ...rows].join('\n'); } function downloadFile(content, filename, type) { const blob = new Blob([content], { type }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click(); URL.revokeObjectURL(url); } // Add event listeners document.querySelector('button[onclick*="Export"]').addEventListener('click', () => exportData('csv')); document.querySelector('button:has([data-feather="filter"])').addEventListener('click', () => { document.querySelector('.glass-effect.rounded-xl.p-4').scrollIntoView({ behavior: 'smooth' }); }); // Real-time updates setInterval(updateEquityChart, 5000); setInterval(() => { // Update performance metrics const winRate = document.querySelector('.text-green-400.text-2xl'); if (winRate) { const currentRate = parseFloat(winRate.textContent); const newRate = currentRate + (Math.random() - 0.5) * 0.1; winRate.textContent = newRate.toFixed(1) + '%'; } }, 10000); + value.toLocaleString(); } } } } } }); // Real-time equity updates function updateEquityChart() { const newEquity = 50850 + (Math.random() - 0.5) * 200; const newData = equityChart.data.datasets[0].data; newData.push(newEquity); newData.shift(); const currentTime = new Date(); const timeLabel = currentTime.getHours() + ':00'; const labels = equityChart.data.labels; labels.push(timeLabel); labels.shift(); equityChart.update('none'); } // Trade detail modal function showTradeDetail(tradeId) { const modal = document.createElement('div'); modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/50'; modal.innerHTML = `

Trade Details - #${tradeId}

Symbol

EUR/USD

Type

BUY

Volume

0.20 lots

Duration

2h 15m

Price Timeline

Open 2024-01-15 14:35:22 - 1.08542
Highest 1.08780
Lowest 1.08490
Close 2024-01-15 16:50:45 - 1.08765

Trade Analysis

`; document.body.appendChild(modal); feather.replace(); // Create mini chart for this trade const tradeCtx = modal.querySelector('#tradeChart').getContext('2d'); new Chart(tradeCtx, { type: 'line', data: { labels: ['14:35', '15:00', '15:30', '16:00', '16:30', '16:50'], datasets: [{ label: 'Price', data: [1.08542, 1.08620, 1.08580, 1.08690, 1.08730, 1.08765], borderColor: '#3B82F6', backgroundColor: 'rgba(59, 130, 246, 0.1)', tension: 0.4, fill: true }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } }, scales: { x: { display: false }, y: { display: false } } } }); } // Add click handlers to trade rows document.querySelectorAll('.trade-row').forEach(row => { row.addEventListener('click', function() { const tradeId = Math.floor(Math.random() * 100000); showTradeDetail(tradeId); }); }); // Advanced filtering function applyFilters() { const dateFrom = document.querySelector('input[type="date"]').value; const dateTo = document.querySelectorAll('input[type="date"]')[1].value; const symbol = document.querySelector('select').value; const type = document.querySelectorAll('select')[1].value; showNotification('Filters applied successfully', 'success'); // Simulate filtering const rows = document.querySelectorAll('tbody tr'); rows.forEach(row => { if (Math.random() > 0.5) { row.style.display = 'none'; } else { row.style.display = ''; } }); } // Export functionality function exportData(format) { if (format === 'csv') { const csv = generateCSV(); downloadFile(csv, 'trade_history.csv', 'text/csv'); } else if (format === 'pdf') { showNotification('PDF export coming soon', 'info'); } } function generateCSV() { const headers = ['Time', 'Symbol', 'Type', 'Volume', 'Open', 'Close', 'P&L']; const rows = Array.from(document.querySelectorAll('tbody tr')).map(row => { const cells = row.querySelectorAll('td'); return [ cells[0].textContent.trim(), cells[1].textContent.trim(), cells[2].textContent.trim(), cells[3].textContent.trim(), cells[4].textContent.trim(), cells[5].textContent.trim(), cells[6].textContent.trim() ].join(','); }); return [headers.join(','), ...rows].join('\n'); } function downloadFile(content, filename, type) { const blob = new Blob([content], { type }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click(); URL.revokeObjectURL(url); } // Add event listeners document.querySelector('button[onclick*="Export"]').addEventListener('click', () => exportData('csv')); document.querySelector('button:has([data-feather="filter"])').addEventListener('click', () => { document.querySelector('.glass-effect.rounded-xl.p-4').scrollIntoView({ behavior: 'smooth' }); }); // Real-time updates setInterval(updateEquityChart, 5000); setInterval(() => { // Update performance metrics const winRate = document.querySelector('.text-green-400.text-2xl'); if (winRate) { const currentRate = parseFloat(winRate.textContent); const newRate = currentRate + (Math.random() - 0.5) * 0.1; winRate.textContent = newRate.toFixed(1) + '%'; } }, 10000); + context.parsed.y.toLocaleString(); } } } }, scales: { x: { grid: { color: 'rgba(75, 85, 99, 0.3)' }, ticks: { color: '#9CA3AF' } }, y: { grid: { color: 'rgba(75, 85, 99, 0.3)' }, ticks: { color: '#9CA3AF', callback: function(value) { return ' + value.toLocaleString(); } } } } } }); // Real-time equity updates function updateEquityChart() { const newEquity = 50850 + (Math.random() - 0.5) * 200; const newData = equityChart.data.datasets[0].data; newData.push(newEquity); newData.shift(); const currentTime = new Date(); const timeLabel = currentTime.getHours() + ':00'; const labels = equityChart.data.labels; labels.push(timeLabel); labels.shift(); equityChart.update('none'); } // Trade detail modal function showTradeDetail(tradeId) { const modal = document.createElement('div'); modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/50'; modal.innerHTML = `

Trade Details - #${tradeId}

Symbol

EUR/USD

Type

BUY

Volume

0.20 lots

Duration

2h 15m

Price Timeline

Open 2024-01-15 14:35:22 - 1.08542
Highest 1.08780
Lowest 1.08490
Close 2024-01-15 16:50:45 - 1.08765

Trade Analysis

`; document.body.appendChild(modal); feather.replace(); // Create mini chart for this trade const tradeCtx = modal.querySelector('#tradeChart').getContext('2d'); new Chart(tradeCtx, { type: 'line', data: { labels: ['14:35', '15:00', '15:30', '16:00', '16:30', '16:50'], datasets: [{ label: 'Price', data: [1.08542, 1.08620, 1.08580, 1.08690, 1.08730, 1.08765], borderColor: '#3B82F6', backgroundColor: 'rgba(59, 130, 246, 0.1)', tension: 0.4, fill: true }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } }, scales: { x: { display: false }, y: { display: false } } } }); } // Add click handlers to trade rows document.querySelectorAll('.trade-row').forEach(row => { row.addEventListener('click', function() { const tradeId = Math.floor(Math.random() * 100000); showTradeDetail(tradeId); }); }); // Advanced filtering function applyFilters() { const dateFrom = document.querySelector('input[type="date"]').value; const dateTo = document.querySelectorAll('input[type="date"]')[1].value; const symbol = document.querySelector('select').value; const type = document.querySelectorAll('select')[1].value; showNotification('Filters applied successfully', 'success'); // Simulate filtering const rows = document.querySelectorAll('tbody tr'); rows.forEach(row => { if (Math.random() > 0.5) { row.style.display = 'none'; } else { row.style.display = ''; } }); } // Export functionality function exportData(format) { if (format === 'csv') { const csv = generateCSV(); downloadFile(csv, 'trade_history.csv', 'text/csv'); } else if (format === 'pdf') { showNotification('PDF export coming soon', 'info'); } } function generateCSV() { const headers = ['Time', 'Symbol', 'Type', 'Volume', 'Open', 'Close', 'P&L']; const rows = Array.from(document.querySelectorAll('tbody tr')).map(row => { const cells = row.querySelectorAll('td'); return [ cells[0].textContent.trim(), cells[1].textContent.trim(), cells[2].textContent.trim(), cells[3].textContent.trim(), cells[4].textContent.trim(), cells[5].textContent.trim(), cells[6].textContent.trim() ].join(','); }); return [headers.join(','), ...rows].join('\n'); } function downloadFile(content, filename, type) { const blob = new Blob([content], { type }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click(); URL.revokeObjectURL(url); } // Add event listeners document.querySelector('button[onclick*="Export"]').addEventListener('click', () => exportData('csv')); document.querySelector('button:has([data-feather="filter"])').addEventListener('click', () => { document.querySelector('.glass-effect.rounded-xl.p-4').scrollIntoView({ behavior: 'smooth' }); }); // Real-time updates setInterval(updateEquityChart, 5000); setInterval(() => { // Update performance metrics const winRate = document.querySelector('.text-green-400.text-2xl'); if (winRate) { const currentRate = parseFloat(winRate.textContent); const newRate = currentRate + (Math.random() - 0.5) * 0.1; winRate.textContent = newRate.toFixed(1) + '%'; } }, 10000); + value.toLocaleString(); } } } } } }); // Real-time equity updates function updateEquityChart() { const newEquity = 50850 + (Math.random() - 0.5) * 200; const newData = equityChart.data.datasets[0].data; newData.push(newEquity); newData.shift(); const currentTime = new Date(); const timeLabel = currentTime.getHours() + ':00'; const labels = equityChart.data.labels; labels.push(timeLabel); labels.shift(); equityChart.update('none'); } // Trade detail modal function showTradeDetail(tradeId) { const modal = document.createElement('div'); modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/50'; modal.innerHTML = `

Trade Details - #${tradeId}

Symbol

EUR/USD

Type

BUY

Volume

0.20 lots

Duration

2h 15m

Price Timeline

Open 2024-01-15 14:35:22 - 1.08542
Highest 1.08780
Lowest 1.08490
Close 2024-01-15 16:50:45 - 1.08765

Trade Analysis

`; document.body.appendChild(modal); feather.replace(); // Create mini chart for this trade const tradeCtx = modal.querySelector('#tradeChart').getContext('2d'); new Chart(tradeCtx, { type: 'line', data: { labels: ['14:35', '15:00', '15:30', '16:00', '16:30', '16:50'], datasets: [{ label: 'Price', data: [1.08542, 1.08620, 1.08580, 1.08690, 1.08730, 1.08765], borderColor: '#3B82F6', backgroundColor: 'rgba(59, 130, 246, 0.1)', tension: 0.4, fill: true }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } }, scales: { x: { display: false }, y: { display: false } } } }); } // Add click handlers to trade rows document.querySelectorAll('.trade-row').forEach(row => { row.addEventListener('click', function() { const tradeId = Math.floor(Math.random() * 100000); showTradeDetail(tradeId); }); }); // Advanced filtering function applyFilters() { const dateFrom = document.querySelector('input[type="date"]').value; const dateTo = document.querySelectorAll('input[type="date"]')[1].value; const symbol = document.querySelector('select').value; const type = document.querySelectorAll('select')[1].value; showNotification('Filters applied successfully', 'success'); // Simulate filtering const rows = document.querySelectorAll('tbody tr'); rows.forEach(row => { if (Math.random() > 0.5) { row.style.display = 'none'; } else { row.style.display = ''; } }); } // Export functionality function exportData(format) { if (format === 'csv') { const csv = generateCSV(); downloadFile(csv, 'trade_history.csv', 'text/csv'); } else if (format === 'pdf') { showNotification('PDF export coming soon', 'info'); } } function generateCSV() { const headers = ['Time', 'Symbol', 'Type', 'Volume', 'Open', 'Close', 'P&L']; const rows = Array.from(document.querySelectorAll('tbody tr')).map(row => { const cells = row.querySelectorAll('td'); return [ cells[0].textContent.trim(), cells[1].textContent.trim(), cells[2].textContent.trim(), cells[3].textContent.trim(), cells[4].textContent.trim(), cells[5].textContent.trim(), cells[6].textContent.trim() ].join(','); }); return [headers.join(','), ...rows].join('\n'); } function downloadFile(content, filename, type) { const blob = new Blob([content], { type }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click(); URL.revokeObjectURL(url); } // Add event listeners document.querySelector('button[onclick*="Export"]').addEventListener('click', () => exportData('csv')); document.querySelector('button:has([data-feather="filter"])').addEventListener('click', () => { document.querySelector('.glass-effect.rounded-xl.p-4').scrollIntoView({ behavior: 'smooth' }); }); // Real-time updates setInterval(updateEquityChart, 5000); setInterval(() => { // Update performance metrics const winRate = document.querySelector('.text-green-400.text-2xl'); if (winRate) { const currentRate = parseFloat(winRate.textContent); const newRate = currentRate + (Math.random() - 0.5) * 0.1; winRate.textContent = newRate.toFixed(1) + '%'; } }, 10000); + context.parsed.y.toLocaleString(); } } } }, scales: { x: { grid: { color: 'rgba(75, 85, 99, 0.3)' }, ticks: { color: '#9CA3AF' } }, y: { grid: { color: 'rgba(75, 85, 99, 0.3)' }, ticks: { color: '#9CA3AF', callback: function(value) { return ' + value.toLocaleString(); } } } } } }); // Real-time equity updates function updateEquityChart() { const newEquity = 50850 + (Math.random() - 0.5) * 200; const newData = equityChart.data.datasets[0].data; newData.push(newEquity); newData.shift(); const currentTime = new Date(); const timeLabel = currentTime.getHours() + ':00'; const labels = equityChart.data.labels; labels.push(timeLabel); labels.shift(); equityChart.update('none'); } // Trade detail modal function showTradeDetail(tradeId) { const modal = document.createElement('div'); modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/50'; modal.innerHTML = `

Trade Details - #${tradeId}

Symbol

EUR/USD

Type

BUY

Volume

0.20 lots

Duration

2h 15m

Price Timeline

Open 2024-01-15 14:35:22 - 1.08542
Highest 1.08780
Lowest 1.08490
Close 2024-01-15 16:50:45 - 1.08765

Trade Analysis

`; document.body.appendChild(modal); feather.replace(); // Create mini chart for this trade const tradeCtx = modal.querySelector('#tradeChart').getContext('2d'); new Chart(tradeCtx, { type: 'line', data: { labels: ['14:35', '15:00', '15:30', '16:00', '16:30', '16:50'], datasets: [{ label: 'Price', data: [1.08542, 1.08620, 1.08580, 1.08690, 1.08730, 1.08765], borderColor: '#3B82F6', backgroundColor: 'rgba(59, 130, 246, 0.1)', tension: 0.4, fill: true }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } }, scales: { x: { display: false }, y: { display: false } } } }); } // Add click handlers to trade rows document.querySelectorAll('.trade-row').forEach(row => { row.addEventListener('click', function() { const tradeId = Math.floor(Math.random() * 100000); showTradeDetail(tradeId); }); }); // Advanced filtering function applyFilters() { const dateFrom = document.querySelector('input[type="date"]').value; const dateTo = document.querySelectorAll('input[type="date"]')[1].value; const symbol = document.querySelector('select').value; const type = document.querySelectorAll('select')[1].value; showNotification('Filters applied successfully', 'success'); // Simulate filtering const rows = document.querySelectorAll('tbody tr'); rows.forEach(row => { if (Math.random() > 0.5) { row.style.display = 'none'; } else { row.style.display = ''; } }); } // Export functionality function exportData(format) { if (format === 'csv') { const csv = generateCSV(); downloadFile(csv, 'trade_history.csv', 'text/csv'); } else if (format === 'pdf') { showNotification('PDF export coming soon', 'info'); } } function generateCSV() { const headers = ['Time', 'Symbol', 'Type', 'Volume', 'Open', 'Close', 'P&L']; const rows = Array.from(document.querySelectorAll('tbody tr')).map(row => { const cells = row.querySelectorAll('td'); return [ cells[0].textContent.trim(), cells[1].textContent.trim(), cells[2].textContent.trim(), cells[3].textContent.trim(), cells[4].textContent.trim(), cells[5].textContent.trim(), cells[6].textContent.trim() ].join(','); }); return [headers.join(','), ...rows].join('\n'); } function downloadFile(content, filename, type) { const blob = new Blob([content], { type }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click(); URL.revokeObjectURL(url); } // Add event listeners document.querySelector('button[onclick*="Export"]').addEventListener('click', () => exportData('csv')); document.querySelector('button:has([data-feather="filter"])').addEventListener('click', () => { document.querySelector('.glass-effect.rounded-xl.p-4').scrollIntoView({ behavior: 'smooth' }); }); // Real-time updates setInterval(updateEquityChart, 5000); setInterval(() => { // Update performance metrics const winRate = document.querySelector('.text-green-400.text-2xl'); if (winRate) { const currentRate = parseFloat(winRate.textContent); const newRate = currentRate + (Math.random() - 0.5) * 0.1; winRate.textContent = newRate.toFixed(1) + '%'; } }, 10000); + value.toLocaleString(); } } } } } }); // Real-time equity updates function updateEquityChart() { const newEquity = 50850 + (Math.random() - 0.5) * 200; const newData = equityChart.data.datasets[0].data; newData.push(newEquity); newData.shift(); const currentTime = new Date(); const timeLabel = currentTime.getHours() + ':00'; const labels = equityChart.data.labels; labels.push(timeLabel); labels.shift(); equityChart.update('none'); } // Trade detail modal function showTradeDetail(tradeId) { const modal = document.createElement('div'); modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/50'; modal.innerHTML = `

Trade Details - #${tradeId}

Symbol

EUR/USD

Type

BUY

Volume

0.20 lots

Duration

2h 15m

Price Timeline

Open 2024-01-15 14:35:22 - 1.08542
Highest 1.08780
Lowest 1.08490
Close 2024-01-15 16:50:45 - 1.08765

Trade Analysis

`; document.body.appendChild(modal); feather.replace(); // Create mini chart for this trade const tradeCtx = modal.querySelector('#tradeChart').getContext('2d'); new Chart(tradeCtx, { type: 'line', data: { labels: ['14:35', '15:00', '15:30', '16:00', '16:30', '16:50'], datasets: [{ label: 'Price', data: [1.08542, 1.08620, 1.08580, 1.08690, 1.08730, 1.08765], borderColor: '#3B82F6', backgroundColor: 'rgba(59, 130, 246, 0.1)', tension: 0.4, fill: true }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } }, scales: { x: { display: false }, y: { display: false } } } }); } // Add click handlers to trade rows document.querySelectorAll('.trade-row').forEach(row => { row.addEventListener('click', function() { const tradeId = Math.floor(Math.random() * 100000); showTradeDetail(tradeId); }); }); // Advanced filtering function applyFilters() { const dateFrom = document.querySelector('input[type="date"]').value; const dateTo = document.querySelectorAll('input[type="date"]')[1].value; const symbol = document.querySelector('select').value; const type = document.querySelectorAll('select')[1].value; showNotification('Filters applied successfully', 'success'); // Simulate filtering const rows = document.querySelectorAll('tbody tr'); rows.forEach(row => { if (Math.random() > 0.5) { row.style.display = 'none'; } else { row.style.display = ''; } }); } // Export functionality function exportData(format) { if (format === 'csv') { const csv = generateCSV(); downloadFile(csv, 'trade_history.csv', 'text/csv'); } else if (format === 'pdf') { showNotification('PDF export coming soon', 'info'); } } function generateCSV() { const headers = ['Time', 'Symbol', 'Type', 'Volume', 'Open', 'Close', 'P&L']; const rows = Array.from(document.querySelectorAll('tbody tr')).map(row => { const cells = row.querySelectorAll('td'); return [ cells[0].textContent.trim(), cells[1].textContent.trim(), cells[2].textContent.trim(), cells[3].textContent.trim(), cells[4].textContent.trim(), cells[5].textContent.trim(), cells[6].textContent.trim() ].join(','); }); return [headers.join(','), ...rows].join('\n'); } function downloadFile(content, filename, type) { const blob = new Blob([content], { type }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click(); URL.revokeObjectURL(url); } // Add event listeners document.querySelector('button[onclick*="Export"]').addEventListener('click', () => exportData('csv')); document.querySelector('button:has([data-feather="filter"])').addEventListener('click', () => { document.querySelector('.glass-effect.rounded-xl.p-4').scrollIntoView({ behavior: 'smooth' }); }); // Real-time updates setInterval(updateEquityChart, 5000); setInterval(() => { // Update performance metrics const winRate = document.querySelector('.text-green-400.text-2xl'); if (winRate) { const currentRate = parseFloat(winRate.textContent); const newRate = currentRate + (Math.random() - 0.5) * 0.1; winRate.textContent = newRate.toFixed(1) + '%'; } }, 10000); + context.parsed.y.toLocaleString(); } } } }, scales: { x: { grid: { color: 'rgba(75, 85, 99, 0.3)' }, ticks: { color: '#9CA3AF' } }, y: { grid: { color: 'rgba(75, 85, 99, 0.3)' }, ticks: { color: '#9CA3AF', callback: function(value) { return ' + value.toLocaleString(); } } } } } }); // Real-time equity updates function updateEquityChart() { const newEquity = 50850 + (Math.random() - 0.5) * 200; const newData = equityChart.data.datasets[0].data; newData.push(newEquity); newData.shift(); const currentTime = new Date(); const timeLabel = currentTime.getHours() + ':00'; const labels = equityChart.data.labels; labels.push(timeLabel); labels.shift(); equityChart.update('none'); } // Trade detail modal function showTradeDetail(tradeId) { const modal = document.createElement('div'); modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/50'; modal.innerHTML = `

Trade Details - #${tradeId}

Symbol

EUR/USD

Type

BUY

Volume

0.20 lots

Duration

2h 15m

Price Timeline

Open 2024-01-15 14:35:22 - 1.08542
Highest 1.08780
Lowest 1.08490
Close 2024-01-15 16:50:45 - 1.08765

Trade Analysis

`; document.body.appendChild(modal); feather.replace(); // Create mini chart for this trade const tradeCtx = modal.querySelector('#tradeChart').getContext('2d'); new Chart(tradeCtx, { type: 'line', data: { labels: ['14:35', '15:00', '15:30', '16:00', '16:30', '16:50'], datasets: [{ label: 'Price', data: [1.08542, 1.08620, 1.08580, 1.08690, 1.08730, 1.08765], borderColor: '#3B82F6', backgroundColor: 'rgba(59, 130, 246, 0.1)', tension: 0.4, fill: true }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } }, scales: { x: { display: false }, y: { display: false } } } }); } // Add click handlers to trade rows document.querySelectorAll('.trade-row').forEach(row => { row.addEventListener('click', function() { const tradeId = Math.floor(Math.random() * 100000); showTradeDetail(tradeId); }); }); // Advanced filtering function applyFilters() { const dateFrom = document.querySelector('input[type="date"]').value; const dateTo = document.querySelectorAll('input[type="date"]')[1].value; const symbol = document.querySelector('select').value; const type = document.querySelectorAll('select')[1].value; showNotification('Filters applied successfully', 'success'); // Simulate filtering const rows = document.querySelectorAll('tbody tr'); rows.forEach(row => { if (Math.random() > 0.5) { row.style.display = 'none'; } else { row.style.display = ''; } }); } // Export functionality function exportData(format) { if (format === 'csv') { const csv = generateCSV(); downloadFile(csv, 'trade_history.csv', 'text/csv'); } else if (format === 'pdf') { showNotification('PDF export coming soon', 'info'); } } function generateCSV() { const headers = ['Time', 'Symbol', 'Type', 'Volume', 'Open', 'Close', 'P&L']; const rows = Array.from(document.querySelectorAll('tbody tr')).map(row => { const cells = row.querySelectorAll('td'); return [ cells[0].textContent.trim(), cells[1].textContent.trim(), cells[2].textContent.trim(), cells[3].textContent.trim(), cells[4].textContent.trim(), cells[5].textContent.trim(), cells[6].textContent.trim() ].join(','); }); return [headers.join(','), ...rows].join('\n'); } function downloadFile(content, filename, type) { const blob = new Blob([content], { type }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click(); URL.revokeObjectURL(url); } // Add event listeners document.querySelector('button[onclick*="Export"]').addEventListener('click', () => exportData('csv')); document.querySelector('button:has([data-feather="filter"])').addEventListener('click', () => { document.querySelector('.glass-effect.rounded-xl.p-4').scrollIntoView({ behavior: 'smooth' }); }); // Real-time updates setInterval(updateEquityChart, 5000); setInterval(() => { // Update performance metrics const winRate = document.querySelector('.text-green-400.text-2xl'); if (winRate) { const currentRate = parseFloat(winRate.textContent); const newRate = currentRate + (Math.random() - 0.5) * 0.1; winRate.textContent = newRate.toFixed(1) + '%'; } }, 10000);