Spaces:
Build error

File size: 5,423 Bytes
c43487b
f1054ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import { CheckCircle, Target } from 'lucide-react';

const mockSignals = [
  {
    id: 1,
    pair: 'EURUSD',
    type: 'Bullish Order Block',
    timeframe: '1H',
    entry: 1.0820,
    stopLoss: 1.0795,
    takeProfit: 1.0880,
    confidence: 85,
    status: 'Active',
    timestamp: '10 mins ago',
    confluence: ['FVG', 'Liquidity Sweep', 'Break of Structure']
  },
  {
    id: 2,
    pair: 'GBPUSD',
    type: 'Bearish FVG',
    timeframe: '15M',
    entry: 1.2650,
    stopLoss: 1.2680,
    takeProfit: 1.2590,
    confidence: 72,
    status: 'Pending',
    timestamp: '25 mins ago',
    confluence: ['Equal Highs', 'Premium Pricing']
  },
  {
    id: 3,
    pair: 'XAUUSD',
    type: 'Breaker Block',
    timeframe: '4H',
    entry: 2042.00,
    stopLoss: 2035.00,
    takeProfit: 2060.00,
    confidence: 91,
    status: 'Hit TP1',
    timestamp: '1 hour ago',
    confluence: ['Market Structure Shift', 'OTE Retracement']
  }
];

export default function Signals() {
  return (
    <div className="space-y-6">
      <div>
        <h2 className="text-3xl font-bold text-white">Signal Generator</h2>
        <p className="text-slate-400 mt-1">AI-analyzed ICT setups based on knowledge base rules</p>
      </div>

      <div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
        {mockSignals.map((signal) => (
          <div key={signal.id} className="glass-panel p-6 relative overflow-hidden group hover:border-blue-500/50 transition-colors">
            <div className="absolute top-0 right-0 p-4 opacity-10 group-hover:opacity-20 transition-opacity">
              <Target size={120} />
            </div>

            <div className="flex justify-between items-start mb-4 relative z-10">
              <div>
                <div className="flex items-center space-x-2">
                  <span className="text-2xl font-bold text-white">{signal.pair}</span>
                  <span className="px-2 py-0.5 rounded text-xs font-medium bg-slate-700 text-slate-300 border border-slate-600">
                    {signal.timeframe}
                  </span>
                </div>
                <div className="text-blue-400 font-medium mt-1">{signal.type}</div>
              </div>
              <div className={`px-3 py-1 rounded-full text-xs font-bold border ${
                signal.status === 'Active' ? 'bg-emerald-900/30 text-emerald-400 border-emerald-800' :
                signal.status === 'Pending' ? 'bg-amber-900/30 text-amber-400 border-amber-800' :
                'bg-blue-900/30 text-blue-400 border-blue-800'
              }`}>
                {signal.status}
              </div>
            </div>

            <div className="grid grid-cols-3 gap-4 mb-6 relative z-10">
              <div className="bg-slate-800/50 p-3 rounded-lg border border-slate-700">
                <div className="text-xs text-slate-500 mb-1">Entry</div>
                <div className="font-mono text-white">{signal.entry}</div>
              </div>
              <div className="bg-slate-800/50 p-3 rounded-lg border border-slate-700">
                <div className="text-xs text-slate-500 mb-1">Stop Loss</div>
                <div className="font-mono text-rose-400">{signal.stopLoss}</div>
              </div>
              <div className="bg-slate-800/50 p-3 rounded-lg border border-slate-700">
                <div className="text-xs text-slate-500 mb-1">Take Profit</div>
                <div className="font-mono text-emerald-400">{signal.takeProfit}</div>
              </div>
            </div>

            <div className="space-y-3 relative z-10">
              <div className="flex items-center justify-between text-sm">
                <span className="text-slate-400">Confidence Score</span>
                <span className={`font-bold ${
                  signal.confidence > 80 ? 'text-emerald-400' : 
                  signal.confidence > 60 ? 'text-amber-400' : 'text-rose-400'
                }`}>{signal.confidence}%</span>
              </div>
              <div className="w-full bg-slate-700 rounded-full h-2">
                <div 
                  className={`h-2 rounded-full ${
                    signal.confidence > 80 ? 'bg-emerald-500' : 
                    signal.confidence > 60 ? 'bg-amber-500' : 'bg-rose-500'
                  }`}
                  style={{ width: `${signal.confidence}%` }}
                ></div>
              </div>

              <div className="pt-4 border-t border-slate-700/50">
                <div className="text-xs text-slate-500 mb-2 uppercase tracking-wider">Confluence Factors</div>
                <div className="flex flex-wrap gap-2">
                  {signal.confluence.map((factor, idx) => (
                    <span key={idx} className="inline-flex items-center px-2 py-1 rounded text-xs bg-slate-800 text-slate-300 border border-slate-700">
                      <CheckCircle size={10} className="mr-1 text-blue-400" />
                      {factor}
                    </span>
                  ))}
                </div>
              </div>
              
              <div className="flex justify-between items-center mt-4 text-xs text-slate-500">
                <span>Generated {signal.timestamp}</span>
                <button className="text-blue-400 hover:text-blue-300 font-medium">View Chart Analysis &rarr;</button>
              </div>
            </div>
          </div>
        ))}
      </div>
    </div>
  );
}