Files
trading_bot_v3/components/Navigation.tsx
mindesbunister 2db2be241b Implement Jupiter-style trading chart with lightweight-charts
- Add TradingView Lightweight Charts library for professional chart display
- Create TradingChart component with real-time candlestick data
- Implement position overlays (entry, stop loss, take profit lines)
- Add chart header with symbol and price information
- Create CompactTradingPanel for Jupiter-style order form
- Build ChartTradingPage combining chart and trading panel
- Add demo and test pages for chart functionality
- Use dynamic imports to avoid SSR issues with lightweight-charts
- Generate sample price data for demonstration

Features:
- Full-screen candlestick chart with dark theme
- Position markers on chart (blue entry, red SL, green TP)
- Real-time price display and P&L tracking
- Responsive design with proper chart resizing
- Professional trading interface similar to Jupiter Perps
2025-07-16 12:31:58 +02:00

79 lines
2.0 KiB
TypeScript

"use client"
import React from 'react'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
const navItems = [
{
name: 'Overview',
href: '/',
icon: '🏠',
description: 'Dashboard overview'
},
{
name: 'Analysis',
href: '/analysis',
icon: '📊',
description: 'AI analysis & insights'
},
{
name: 'Trading',
href: '/trading',
icon: '💰',
description: 'Execute trades'
},
{
name: 'Chart Trading',
href: '/chart-trading-demo',
icon: '📈',
description: 'Advanced chart trading'
},
{
name: 'Automation',
href: '/automation',
icon: '🤖',
description: 'Auto-trading settings'
},
{
name: 'Settings',
href: '/settings',
icon: '⚙️',
description: 'Developer settings'
}
]
export default function Navigation() {
const pathname = usePathname()
return (
<nav className="bg-gray-900/50 backdrop-blur-sm border-b border-gray-800">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex items-center justify-between h-14">
<div className="flex items-center space-x-8">
{navItems.map((item) => {
const isActive = pathname === item.href
return (
<Link
key={item.name}
href={item.href}
className={`flex items-center space-x-2 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 group ${
isActive
? 'bg-blue-600/20 text-blue-400 border border-blue-500/30'
: 'text-gray-400 hover:text-gray-200 hover:bg-gray-800/50'
}`}
>
<span className={`text-lg ${isActive ? 'text-blue-400' : 'text-gray-500 group-hover:text-gray-300'}`}>
{item.icon}
</span>
<span>{item.name}</span>
</Link>
)
})}
</div>
</div>
</div>
</nav>
)
}