Skip to content

Commit

Permalink
X5: futures: doom stops based on user stake (without leverage).
Browse files Browse the repository at this point in the history
  • Loading branch information
iterativv committed Nov 25, 2024
1 parent 6dbc2c9 commit 7d2e8f1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions NostalgiaForInfinityX5.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class NostalgiaForInfinityX5(IStrategy):
INTERFACE_VERSION = 3

def version(self) -> str:
return "v15.1.239"
return "v15.1.240"

stoploss = -0.99

Expand Down Expand Up @@ -176,13 +176,13 @@ def version(self) -> str:
stop_threshold_spot = 0.10
stop_threshold_futures = 0.10
stop_threshold_doom_spot = 0.25
stop_threshold_doom_futures = 0.25
stop_threshold_doom_futures = 0.60
stop_threshold_spot_rebuy = 1.0
stop_threshold_futures_rebuy = 1.0
stop_threshold_futures_rebuy = 3.0
stop_threshold_rapid_spot = 0.25
stop_threshold_rapid_futures = 0.25
stop_threshold_rapid_futures = 0.60
stop_threshold_derisk_spot = 0.25
stop_threshold_derisk_futures = 0.25
stop_threshold_derisk_futures = 0.60

# user specified fees to be used for profit calculations
custom_fee_open_rate = None
Expand Down Expand Up @@ -11830,7 +11830,7 @@ def long_exit_rapid(
< -(
filled_entries[0].cost
* (self.stop_threshold_rapid_futures if self.is_futures_mode else self.stop_threshold_rapid_spot)
# / (trade.leverage if self.is_futures_mode else 1.0)
/ trade.leverage
)
)
# temporary
Expand Down Expand Up @@ -24083,7 +24083,7 @@ def long_exit_stoploss(
< -(
filled_entries[0].cost
* (self.stop_threshold_doom_futures if self.is_futures_mode else self.stop_threshold_doom_spot)
# / trade.leverage
/ trade.leverage
)
# temporary
and (trade.open_date_utc.replace(tzinfo=None) >= datetime(2024, 9, 13) or is_backtest)
Expand Down Expand Up @@ -28869,7 +28869,7 @@ def short_exit_rapid(
< -(
filled_entries[0].cost
* (self.stop_threshold_rapid_futures if self.is_futures_mode else self.stop_threshold_rapid_spot)
# / (trade.leverage if self.is_futures_mode else 1.0)
/ trade.leverage
)
)
# temporary
Expand Down Expand Up @@ -41122,7 +41122,7 @@ def short_exit_stoploss(
< -(
filled_entries[0].cost
* (self.stop_threshold_doom_futures if self.is_futures_mode else self.stop_threshold_doom_spot)
# / trade.leverage
/ trade.leverage
)
# temporary
and (trade.open_date_utc.replace(tzinfo=None) >= datetime(2024, 9, 13) or is_backtest)
Expand Down

0 comments on commit 7d2e8f1

Please sign in to comment.