- |
-
- {pos.source === 'BOT' ? (pos.profileName || profiles.find(pr => pr.id === pos.profileId)?.name || 'BOT') : 'MANUAL'}
-
- |
+
+
+ {pos.source === 'BOT' ? (pos.profileName || profiles.find(pr => pr.id === pos.profileId)?.name || 'BOT') : 'MANUAL'}
+
+ |
{positionTruth.label}
|
@@ -1458,16 +1477,12 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
{pos.symbol} |
- {pos.side}
+ {pos.side}
{pos.planMode ? (
-
+
{pos.planMode === 'long_term' ? 'Long-term hold' : 'Short-term managed'}
-
+
) : null}
|
@@ -1479,14 +1494,14 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
{currentPrice !== null ? `$${currentPrice.toLocaleString()}` : '-'}
{slBreached && (
-
+
SL breached
-
+
)}
{!slBreached && tpHit && (
-
+
TP hit
-
+
)}
@@ -1704,9 +1719,9 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
)}
-
+
{order.profileId ? (profiles.find(pr => pr.id === order.profileId)?.name || 'BOT') : 'MANUAL'}
-
+
|
{truthSource.label}
@@ -1715,21 +1730,18 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
{order.timestamp ? new Date(order.timestamp).toLocaleString([], { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' }) : '-'}
|
{order.symbol} |
-
- {resolvedAction ? (
-
- {isEntry ? 'ENTRY' : 'EXIT'}
-
- ) : (
- {order.type}
- )}
- |
-
- {order.side}
- |
+
+ {resolvedAction ? (
+
+ {isEntry ? 'ENTRY' : 'EXIT'}
+
+ ) : (
+ {order.type}
+ )}
+ |
+
+ {order.side}
+ |
{Number(order.qty || 0).toFixed(4)} |
${Number(order.price).toLocaleString()} |
@@ -1746,30 +1758,21 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
const orderAge = order.timestamp ? Date.now() - order.timestamp : 0;
const isStale = isPendingNew && orderAge > 5 * 60 * 1000;
- let badgeClass = 'bg-white/10 text-gray-400';
- let tooltip = '';
-
- if (order.status === 'filled') {
- badgeClass = 'bg-green-500/20 text-green-400 border border-green-500/20';
- } else if (isStale) {
- badgeClass = 'bg-yellow-500/20 text-yellow-400 border border-yellow-500/20';
- tooltip = 'Order pending for >5 min - sync in progress';
- } else if (isExpired) {
- badgeClass = 'bg-orange-500/20 text-orange-400 border border-orange-500/20';
- tooltip = 'Order not found on exchange - likely never executed';
- } else if (isUnknown) {
- badgeClass = 'bg-gray-500/20 text-gray-400 border border-gray-500/20';
- tooltip = 'Order status could not be verified';
- }
-
- return (
-
-
- {order.status}
-
+ let tooltip = '';
+
+ if (isStale) {
+ tooltip = 'Order pending for >5 min - sync in progress';
+ } else if (isExpired) {
+ tooltip = 'Order not found on exchange - likely never executed';
+ } else if (isUnknown) {
+ tooltip = 'Order status could not be verified';
+ }
+
+ return (
+
+
+ {order.status}
+
{isStale && (
!
)}
@@ -1940,14 +1943,11 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
|
-
-
- {trace.profileName}
-
- |
+
+
+ {trace.profileName}
+
+ |
{trace.symbol}
|
@@ -1955,14 +1955,11 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
{trace.orderedEvents.map((event) => {
const actionLabel: OrderAction = event.action === 'EXIT' ? 'EXIT' : 'ENTRY';
- const actionClass = actionLabel === 'ENTRY'
- ? 'bg-blue-500/10 text-blue-300 border border-blue-500/20'
- : 'bg-amber-500/10 text-amber-300 border border-amber-500/20';
- return (
-
-
- {actionLabel}
-
+ return (
+
+
+ {actionLabel}
+
{event.timestamp ? new Date(event.timestamp).toLocaleString([], { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' }) : '-'}
@@ -1986,18 +1983,9 @@ export const PositionsTab = ({ botState, onManageHolding }: PositionsTabProps) =
-
- {trace.state}
-
+
+ {trace.state}
+
{trace.stateReason}
|