feat: Add missing take profit levels to multi-timeframe analysis
- Display TP1 and TP2 targets in Entry Setup section for each timeframe - Support both structured take profit format (tp1/tp2) and simple format - Include proper fallback for different take profit data structures - Enhanced visual display with emojis and proper formatting - Now showing complete trading setup: Entry, Stop Loss, and Take Profit levels Fixes missing take profit display in multi-timeframe analysis view
This commit is contained in:
@@ -534,6 +534,32 @@ export default function AIAnalysisPanel() {
|
||||
🛑 SL: ${safeRender(timeframeResult.result.analysis.stopLoss.price)}
|
||||
</div>
|
||||
)}
|
||||
{timeframeResult.result.analysis.takeProfits && (
|
||||
<div className="text-sm text-green-300 mt-1 space-y-1">
|
||||
{timeframeResult.result.analysis.takeProfits.tp1 && (
|
||||
<div>
|
||||
🎯 TP1: ${typeof timeframeResult.result.analysis.takeProfits.tp1.price !== 'undefined'
|
||||
? safeRender(timeframeResult.result.analysis.takeProfits.tp1.price)
|
||||
: safeRender(timeframeResult.result.analysis.takeProfits.tp1)}
|
||||
</div>
|
||||
)}
|
||||
{timeframeResult.result.analysis.takeProfits.tp2 && (
|
||||
<div>
|
||||
🎯 TP2: ${typeof timeframeResult.result.analysis.takeProfits.tp2.price !== 'undefined'
|
||||
? safeRender(timeframeResult.result.analysis.takeProfits.tp2.price)
|
||||
: safeRender(timeframeResult.result.analysis.takeProfits.tp2)}
|
||||
</div>
|
||||
)}
|
||||
{/* Fallback for simple take profit format */}
|
||||
{!timeframeResult.result.analysis.takeProfits.tp1 && !timeframeResult.result.analysis.takeProfits.tp2 && (
|
||||
<div>
|
||||
🎯 TP: {typeof timeframeResult.result.analysis.takeProfits === 'object'
|
||||
? Object.values(timeframeResult.result.analysis.takeProfits).map((tp: any) => `$${safeRender(tp)}`).join(', ')
|
||||
: `$${safeRender(timeframeResult.result.analysis.takeProfits)}`}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user