Fix runner activation and order cancellation
- Change takeProfit2SizePercent from 100% to 80% to leave 5% runner - Fix cancelAllOrders() to detect trigger orders using orderId > 0 - Trigger orders (TRIGGER_MARKET, TRIGGER_LIMIT) now properly canceled - Trailing stop will now activate on 5% runner position
This commit is contained in:
@@ -97,7 +97,7 @@ export const DEFAULT_TRADING_CONFIG: TradingConfig = {
|
||||
useMarketOrders: true, // Use market orders for reliable fills
|
||||
confirmationTimeout: 30000, // 30 seconds max wait
|
||||
takeProfit1SizePercent: 75, // Close 75% at TP1 to lock in profit
|
||||
takeProfit2SizePercent: 100, // Close remaining 25% at TP2
|
||||
takeProfit2SizePercent: 80, // Close 80% of remaining 25% at TP2 (leaves 5% as runner)
|
||||
}
|
||||
|
||||
// Supported markets on Drift Protocol
|
||||
|
||||
Reference in New Issue
Block a user