fix: add MAE/MFE fields to all ActiveTrade initializations
Updated execute, test, and test-db endpoints to include: - maxFavorableExcursion: 0 - maxAdverseExcursion: 0 - maxFavorablePrice: entryPrice - maxAdversePrice: entryPrice Required for TypeScript compilation after adding MAE/MFE tracking
This commit is contained in:
@@ -246,6 +246,10 @@ export async function POST(request: NextRequest): Promise<NextResponse<ExecuteTr
|
||||
unrealizedPnL: 0,
|
||||
peakPnL: 0,
|
||||
peakPrice: entryPrice,
|
||||
maxFavorableExcursion: 0,
|
||||
maxAdverseExcursion: 0,
|
||||
maxFavorablePrice: entryPrice,
|
||||
maxAdversePrice: entryPrice,
|
||||
priceCheckCount: 0,
|
||||
lastPrice: entryPrice,
|
||||
lastUpdateTime: Date.now(),
|
||||
|
||||
@@ -179,6 +179,10 @@ export async function POST(request: NextRequest): Promise<NextResponse<TestTrade
|
||||
unrealizedPnL: 0,
|
||||
peakPnL: 0,
|
||||
peakPrice: entryPrice,
|
||||
maxFavorableExcursion: 0,
|
||||
maxAdverseExcursion: 0,
|
||||
maxFavorablePrice: entryPrice,
|
||||
maxAdversePrice: entryPrice,
|
||||
priceCheckCount: 0,
|
||||
lastPrice: entryPrice,
|
||||
lastUpdateTime: Date.now(),
|
||||
|
||||
@@ -185,6 +185,10 @@ export async function POST(request: NextRequest): Promise<NextResponse<TestTrade
|
||||
unrealizedPnL: 0,
|
||||
peakPnL: 0,
|
||||
peakPrice: entryPrice,
|
||||
maxFavorableExcursion: 0,
|
||||
maxAdverseExcursion: 0,
|
||||
maxFavorablePrice: entryPrice,
|
||||
maxAdversePrice: entryPrice,
|
||||
priceCheckCount: 0,
|
||||
lastPrice: entryPrice,
|
||||
lastUpdateTime: Date.now(),
|
||||
|
||||
Reference in New Issue
Block a user