diff --git a/NostalgiaForInfinityX4.py b/NostalgiaForInfinityX4.py index 6f07f08adf..41410ebed1 100644 --- a/NostalgiaForInfinityX4.py +++ b/NostalgiaForInfinityX4.py @@ -68,7 +68,7 @@ class NostalgiaForInfinityX4(IStrategy): INTERFACE_VERSION = 3 def version(self) -> str: - return "v14.1.621" + return "v14.1.622" stoploss = -0.99 @@ -33165,6 +33165,7 @@ def long_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -33301,6 +33302,7 @@ def long_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -33446,6 +33448,7 @@ def long_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -33607,6 +33610,7 @@ def long_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -33768,6 +33772,7 @@ def long_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -33929,6 +33934,7 @@ def long_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -34090,6 +34096,7 @@ def long_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -34262,6 +34269,7 @@ def long_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -35159,6 +35167,7 @@ def long_adjust_trade_position_no_derisk( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -35280,6 +35289,7 @@ def long_adjust_trade_position_no_derisk( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -35401,6 +35411,7 @@ def long_adjust_trade_position_no_derisk( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -35533,6 +35544,7 @@ def long_adjust_trade_position_no_derisk( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -35665,6 +35677,7 @@ def long_adjust_trade_position_no_derisk( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit < -0.06) ) + and ((num_open_grinds == 0) or (slice_profit < -0.02)) and ( (last_candle["protections_long_rebuy"] == True) and (last_candle["protections_long_global"] == True) @@ -43672,6 +43685,7 @@ def short_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -43808,6 +43822,7 @@ def short_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -43953,6 +43968,7 @@ def short_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -44114,6 +44130,7 @@ def short_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -44275,6 +44292,7 @@ def short_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -44436,6 +44454,7 @@ def short_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -44597,6 +44616,7 @@ def short_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -44764,6 +44784,7 @@ def short_grind_adjust_trade_position( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -45646,6 +45667,7 @@ def short_adjust_trade_position_no_derisk( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -45733,6 +45755,7 @@ def short_adjust_trade_position_no_derisk( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -45820,6 +45843,7 @@ def short_adjust_trade_position_no_derisk( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -45918,6 +45942,7 @@ def short_adjust_trade_position_no_derisk( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True) @@ -46016,6 +46041,7 @@ def short_adjust_trade_position_no_derisk( or (current_time - timedelta(hours=6) > filled_orders[-1].order_filled_utc) or (slice_profit > 0.06) ) + and ((num_open_grinds == 0) or (slice_profit > 0.02)) and ( (last_candle["protections_short_rebuy"] == True) and (last_candle["protections_short_global"] == True)