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:
4
.env
4
.env
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user