File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1119,6 +1119,7 @@ def create_dry_run_order(
11191119 leverage : float ,
11201120 params : dict | None = None ,
11211121 stop_loss : bool = False ,
1122+ stop_price : float | None = None ,
11221123 ) -> CcxtOrder :
11231124 now = dt_now ()
11241125 order_id = f"dry_run_{ side } _{ pair } _{ now .timestamp ()} "
@@ -1145,7 +1146,7 @@ def create_dry_run_order(
11451146 }
11461147 if stop_loss :
11471148 dry_order ["info" ] = {"stopPrice" : dry_order ["price" ]}
1148- dry_order [self ._ft_has ["stop_price_prop" ]] = dry_order ["price" ]
1149+ dry_order [self ._ft_has ["stop_price_prop" ]] = stop_price or dry_order ["price" ]
11491150 # Workaround to avoid filling stoploss orders immediately
11501151 dry_order ["ft_order_type" ] = "stoploss"
11511152 orderbook : OrderBook | None = None
@@ -1517,8 +1518,9 @@ def create_stoploss(
15171518 ordertype ,
15181519 side ,
15191520 amount ,
1520- stop_price_norm ,
1521+ limit_rate or stop_price_norm ,
15211522 stop_loss = True ,
1523+ stop_price = stop_price_norm ,
15221524 leverage = leverage ,
15231525 )
15241526 return dry_order
You can’t perform that action at this time.
0 commit comments