Phase 4: TP/SL Optimization Visual Dashboard
- Created /analytics/optimization page with comprehensive UI - Displays MAE/MFE analysis with percentiles - Shows current TP/SL performance with hit rate bars - Visualizes optimal recommendations vs current levels - Projects impact of optimization (win rate, profit factor, P&L improvement) - Provides reasoning for each recommended level - Added navigation link from main analytics page Dashboard features: - Overview stats: total trades, win rate, profit factor, money left on table - MAE analysis: avg, median, 25th/75th percentile, worst - MFE analysis: avg, median, 25th/75th percentile, best - Current config: TP1/TP2/SL hit rates with progress bars - Recommendations: optimal levels with color-coded cards - Reasoning cards: explanation for each recommendation - Projected impact: win rate change, profit factor change, profit improvement - Direct link to Settings page to apply recommendations Access at: http://localhost:3001/analytics/optimization Phase 1-4 Complete! System now tracks MAE/MFE, captures market context, analyzes performance, and provides data-driven TP/SL recommendations.
This commit is contained in:
@@ -106,18 +106,27 @@ export default function AnalyticsPage() {
|
||||
</div>
|
||||
|
||||
{/* Time Period Selector */}
|
||||
<div className="flex items-center space-x-2">
|
||||
<span className="text-sm text-gray-400">Period:</span>
|
||||
<select
|
||||
value={selectedDays}
|
||||
onChange={(e) => setSelectedDays(Number(e.target.value))}
|
||||
className="bg-gray-700 text-white rounded-lg px-4 py-2 border border-gray-600 focus:border-blue-500 focus:outline-none"
|
||||
<div className="flex items-center space-x-4">
|
||||
<a
|
||||
href="/analytics/optimization"
|
||||
className="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg text-white font-semibold transition-colors"
|
||||
>
|
||||
<option value={7}>7 days</option>
|
||||
<option value={30}>30 days</option>
|
||||
<option value={90}>90 days</option>
|
||||
<option value={365}>1 year</option>
|
||||
</select>
|
||||
🎯 TP/SL Optimization
|
||||
</a>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<span className="text-sm text-gray-400">Period:</span>
|
||||
<select
|
||||
value={selectedDays}
|
||||
onChange={(e) => setSelectedDays(Number(e.target.value))}
|
||||
className="bg-gray-700 text-white rounded-lg px-4 py-2 border border-gray-600 focus:border-blue-500 focus:outline-none"
|
||||
>
|
||||
<option value={7}>7 days</option>
|
||||
<option value={30}>30 days</option>
|
||||
<option value={90}>90 days</option>
|
||||
<option value={365}>1 year</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user