diff --git a/.env b/.env index 5498589..2b924c0 100644 --- a/.env +++ b/.env @@ -70,7 +70,7 @@ LEVERAGE=5 # Risk parameters (as percentages) # Stop Loss: Close 100% of position when price drops this much # Example: -1.5% on 10x = -15% account loss -STOP_LOSS_PERCENT=-2.0 +STOP_LOSS_PERCENT=-1.5 # ================================ # DUAL STOP SYSTEM (Advanced) @@ -93,19 +93,19 @@ HARD_STOP_PERCENT=-2.5 # Take Profit 1: Close 50% of position at this profit level # Example: +0.7% on 10x = +7% account gain -TAKE_PROFIT_1_PERCENT=0.5 +TAKE_PROFIT_1_PERCENT=0.7 # Take Profit 1 Size: What % of position to close at TP1 # Example: 50 = close 50% of position -TAKE_PROFIT_1_SIZE_PERCENT=75 +TAKE_PROFIT_1_SIZE_PERCENT=50 # Take Profit 2: Close remaining 50% at this profit level # Example: +1.5% on 10x = +15% account gain -TAKE_PROFIT_2_PERCENT=2.5 +TAKE_PROFIT_2_PERCENT=1.5 # Take Profit 2 Size: What % of remaining position to close at TP2 # Example: 100 = close all remaining position -TAKE_PROFIT_2_SIZE_PERCENT=100 +TAKE_PROFIT_2_SIZE_PERCENT=50 # Emergency Stop: Hard stop if this level is breached # Example: -2.0% on 10x = -20% account loss (rare but protects from flash crashes) @@ -119,7 +119,7 @@ BREAKEVEN_TRIGGER_PERCENT=0.5 PROFIT_LOCK_TRIGGER_PERCENT=1.2 # How much profit to lock (move SL to this profit level) -PROFIT_LOCK_PERCENT=0.5 +PROFIT_LOCK_PERCENT=0.2 # Risk limits # Stop trading if daily loss exceeds this amount (USD) diff --git a/app/settings/page.tsx b/app/settings/page.tsx index 003a7ee..1f540d1 100644 --- a/app/settings/page.tsx +++ b/app/settings/page.tsx @@ -91,8 +91,8 @@ export default function SettingsPage() { setRestarting(false) } - const testTrade = async () => { - if (!confirm('⚠️ This will execute a REAL trade with current settings. Continue?')) { + const testTrade = async (direction: 'long' | 'short') => { + if (!confirm(`⚠️ This will execute a REAL ${direction.toUpperCase()} trade with current settings. Continue?`)) { return } @@ -106,7 +106,7 @@ export default function SettingsPage() { }, body: JSON.stringify({ symbol: 'SOLUSDT', - direction: 'long', + direction: direction, }), }) @@ -118,7 +118,7 @@ export default function SettingsPage() { : `SL: $${data.stopLoss?.toFixed(4)}` setMessage({ type: 'success', - text: `✅ Test trade executed! Size: $${data.positionSize?.toFixed(2)} | Entry: $${data.entryPrice?.toFixed(4)} | ${dualStopsMsg} | TX: ${data.positionId?.substring(0, 8)}...` + text: `✅ ${direction.toUpperCase()} test trade executed! Size: $${data.positionSize?.toFixed(2)} | Entry: $${data.entryPrice?.toFixed(4)} | ${dualStopsMsg} | TX: ${data.positionId?.substring(0, 8)}...` }) } else { setMessage({ type: 'error', text: `Failed: ${data.error || data.message}` }) @@ -406,14 +406,23 @@ export default function SettingsPage() { - {/* Test Trade Button */} - + {/* Test Trade Buttons */} +
+ + +