fix: Use TRIGGER_LIMIT for stop loss orders

- Changed from LIMIT to TRIGGER_LIMIT for proper stop loss display
- SL now shows correctly on Drift UI with trigger line
- Added 0.5% buffer on limit price below trigger for safety
- Widened default SL to -2% for safer testing
- Tested and verified all 3 exit orders (TP1, TP2, SL) working
This commit is contained in:
mindesbunister
2025-10-26 20:15:12 +01:00
parent 4cc294baef
commit f733c11711
2 changed files with 13 additions and 7 deletions

4
.env
View File

@@ -61,7 +61,7 @@ PYTH_HERMES_URL=https://hermes.pyth.network
# Position sizing
# Base position size in USD (default: 50 for safe testing)
# Example: 50 with 10x leverage = $500 notional position
MAX_POSITION_SIZE_USD=10
MAX_POSITION_SIZE_USD=20
# Leverage multiplier (1-20, default: 10)
# Higher leverage = bigger gains AND bigger losses
@@ -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=-0.9
STOP_LOSS_PERCENT=-2.0
# Take Profit 1: Close 50% of position at this profit level
# Example: +0.7% on 10x = +7% account gain