← 返回首页
数据更新:
加载中...
🔄 刷新
A股
港股
美股
加股
数字货币
{{ statusText }}
{{ i.name }}
{{ i.value }} ({{ i.change >= 0 ? '+' : '' }}{{ i.changePercent }}%)
{{ i.name }}
{{ i.value }} ({{ i.change >= 0 ? '+' : '' }}{{ i.changePercent }}%)
🐉 OpenDragon 美股看板
{{ time }}
利弗摩尔十大原则
{{ r.no }}.
{{ r.title }}
{{ r.no }}.
{{ r.title }}
总投资
本金
${{ formatNum(initialCapital) }}
占用
${{ formatNum(totalCost) }}
可用
${{ formatNum(availableCapital) }}
市值
${{ formatNum(totalMarketValue) }}
浮动盈亏
{{ (totalMarketValue - totalCost) >= 0 ? '+' : '' }}${{ formatNum(totalMarketValue - totalCost) }}
实际盈亏
{{ realizedProfit >= 0 ? '+' : '' }}${{ formatNum(realizedProfit) }}
总盈亏
{{ totalProfit >= 0 ? '+' : '' }}${{ formatNum(totalProfit) }}
收益率
{{ returnRate >= 0 ? '+' : '' }}{{ returnRate }}%
数据源: {{ apiStatus }}
最后更新:{{ lastUpdateTime }}
加载中...
{{ refreshing ? '刷新中...' : '🔄 刷新' }}
{{ updateToast.message }}
持仓明细 (实时)
{{ s.code }}
{{ s.name }}
{{ s.qty }}股 @ ${{ s.cost }}
现 ${{ s.price }} ({{ s.dayChange >= 0 ? '+' : '' }}{{ s.dayChangePercent }}%)
值 ${{ formatNum(s.price * s.qty) }}
盈亏 {{ s.profitRate >= 0 ? '+' : '' }}{{ s.profitRate }}%
/div>
交易记录
日期
类型
代码
名称
价格
数量
金额
原因
{{ t.date }}
{{ t.type }}
{{ t.code || '-' }}
{{ t.name }}
${{ t.price }}
{{ t.quantity }}
${{ formatNum(t.amount) }}
{{ t.reason || '-' }}
async function checkDataTime() { // 根据市场选择对应的数据文件 const market = window.location.pathname.includes('hk') ? 'hk' : window.location.pathname.includes('us') ? 'us' : window.location.pathname.includes('ca') ? 'ca' : window.location.pathname.includes('crypto') ? 'crypto' : 'cn'; const dataFile = 'data/trades_' + market + '.json'; try { const res = await fetch(dataFile + '?t=' + Date.now()); const data = await res.json(); // 读取 JSON 内的 timestamp const timestamp = data.timestamp; if (timestamp) { const timeEl = document.getElementById('dataTime'); const dateObj = new Date(timestamp.replace(" ", "T")); const dateStr = dateObj.toLocaleDateString("zh-CN", {month: "numeric", day: "numeric"}); const timeStr = dateObj.toLocaleTimeString("zh-CN", {hour: "2-digit", minute: "2-digit"}); timeEl.textContent = dateStr + " " + timeStr; // 检查是否过期(超过15分钟) const dataTime = new Date(timestamp.replace(' ', 'T')).getTime(); const age = Date.now() - dataTime; timeEl.style.color = (age > 15 * 60 * 1000) ? '#ef4444' : '#10b981'; } else { document.getElementById('dataTime').textContent = '无时间戳'; document.getElementById('dataTime').style.color = '#f59e0b'; } } catch(e) { document.getElementById('dataTime').textContent = '读取失败'; document.getElementById('dataTime').style.color = '#ef4444'; console.error('读取时间戳失败:', e); } } checkDataTime();