-
Notifications
You must be signed in to change notification settings - Fork 660
Open
Description
In the screen shot VET/USDT had more than 4% over the grinding entry but it didn't exit the grinding position
This is gd3 profit:
I had to exit them manually because it misses them and the price drops again
It missed gd1 so I had to exit it then it missed gd3 and the price dropped again before I notice and exit gd3
This an example only
it does this a lot
In AR/USDT it missed 3 exits with 7% profit or more before I notice it and the price dropped again unfortunately.
I'm extending the strategy to increase the profit ratio for grinding and stake portion, this is my code:
from NostalgiaForInfinityX6 import NostalgiaForInfinityX6
import logging
log = logging.getLogger(__name__)
class NFIX6Extended(NostalgiaForInfinityX6):
# Override grinding parameters
grind_1_stakes_spot = [0.35, 0.35, 0.40] # Increased from [0.24, 0.26, 0.28]
grind_1_profit_threshold_spot = 0.0300 # Increased from 0.018
grind_2_profit_threshold_spot = 0.0300
grind_2_stakes_spot = [0.35, 0.35, 0.40]
grind_3_profit_threshold_spot = 0.0300
grind_3_stakes_spot = [0.35, 0.35, 0.40]
grind_4_profit_threshold_spot = 0.0300
grind_4_stakes_spot = [0.35, 0.35, 0.40]
grind_5_profit_threshold_spot = 0.0300
grind_5_stakes_spot = [0.35, 0.35, 0.40]
grind_6_profit_threshold_spot = 0.0300
grind_1_derisk_1_profit_threshold_spot = 0.048
grind_1_derisk_1_stakes_spot = [0.35, 0.35, 0.40]
grind_2_derisk_1_profit_threshold_spot = 0.0300
grind_2_derisk_1_stakes_spot = [0.35, 0.35, 0.40]
def __init__(self, config: dict) -> None:
super().__init__(config)
# Long Exit Grind
# ---------------------------------------------------------------------------------------------
def long_exit_grind(
self,
pair: str,
current_rate: float,
profit_stake: float,
profit_ratio: float,
profit_current_stake_ratio: float,
profit_init_ratio: float,
max_profit: float,
max_loss: float,
filled_entries,
filled_exits,
last_candle,
previous_candle_1,
previous_candle_2,
previous_candle_3,
previous_candle_4,
previous_candle_5,
trade: "Trade",
current_time: "datetime",
enter_tags,
) -> tuple:
# tag 120 starts with really very small amounts so I had to increase profit ratio
if "120" in enter_tags:
if profit_init_ratio > 2.0:
return True, f"exit_{self.long_grind_mode_name}_g"
else:
return False, None
# Check if the profit ratio is greater than 0.25
if profit_init_ratio > 0.25:
return True, f"exit_{self.long_grind_mode_name}_g"
return False, None
Metadata
Metadata
Assignees
Labels
No labels