Skip to content

Commit

Permalink
X4: grinding: mode 1: adjust the buy amount if it's too low.
Browse files Browse the repository at this point in the history
  • Loading branch information
iterativv committed Oct 1, 2023
1 parent 45f1d2d commit f924f9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NostalgiaForInfinityX4.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class NostalgiaForInfinityX4(IStrategy):
INTERFACE_VERSION = 3

def version(self) -> str:
return "v14.0.279"
return "v14.0.280"

# ROI table:
minimal_roi = {
Expand Down Expand Up @@ -2227,6 +2227,8 @@ def grind_adjust_trade_position(self, trade: Trade, current_time: datetime,
buy_amount = max_stake
if (buy_amount < min_stake):
return None
if (buy_amount < (min_stake * 1.5)):
buy_amount = min_stake * 1.5
self.dp.send_msg(f"Grinding entry [{trade.pair}] | Rate: {current_rate} | Stake amount: {buy_amount} | Profit (stake): {profit_stake} | Profit: {(profit_ratio * 100.0):.2f}%")
return buy_amount

Expand Down

0 comments on commit f924f9a

Please sign in to comment.