diff --git a/Empty.json b/Empty.json
index b19c874..1194588 100644
--- a/Empty.json
+++ b/Empty.json
@@ -2,7 +2,7 @@
"strategy_name": "Empty",
"params": {
"roi": {
- "0": 10
+ "0": 5
},
"stoploss": {
"stoploss": -1.0
@@ -14,26 +14,33 @@
"trailing_only_offset_is_reached": false
},
"max_open_trades": {
- "max_open_trades": 1
- },
- "buy": {
- "buy_deriv1_sma12d": -0.05,
- "buy_deriv1_sma5d": -0.03,
- "buy_deriv1_sma60": 0.0,
- "buy_deriv2_sma12d": 0.0,
- "buy_deriv2_sma5d": -0.07,
- "buy_deriv2_sma60": -0.003,
- "buy_longue": 200
+ "max_open_trades": 20
},
"protection": {
- "drop_from_last_entry": 0.0
+ "b30_indicateur": "sma36",
+ "baisse": 0.33,
+ "drop_from_last_entry": -0.03
+ },
+ "buy": {
+ "buy_deriv1_sma12d": -0.04,
+ "buy_deriv1_sma5d": -0.02,
+ "buy_deriv1_sma60": 0.001,
+ "buy_deriv2_sma12d": -0.02,
+ "buy_deriv2_sma5d": 0.0,
+ "buy_deriv2_sma60": -0.001,
+ "buy_longue": 160,
+ "buy_longue_derive": "sma80_deriv1_1d",
+ "start_bear_deriv1": -0.004,
+ "start_bear_deriv2": 0.002,
+ "start_bear_indicator": "sma80",
+ "start_bull_deriv1": 0.001,
+ "start_bull_deriv2": -0.002,
+ "start_bull_indicator": "sma120"
},
"sell": {
- "sell_crossed_sma_indicators": "sma60",
- "sell_score_indicator": "sma60_score",
- "sell_sma_indicators": "sma48_1d"
+ "sell_score_indicator": "sma24_score"
}
},
"ft_stratparam_v": 1,
- "export_time": "2026-02-26 20:23:41.717021+00:00"
+ "export_time": "2026-02-28 17:28:20.867470+00:00"
}
\ No newline at end of file
diff --git a/Empty.py b/Empty.py
index 0235d35..c0929ff 100644
--- a/Empty.py
+++ b/Empty.py
@@ -39,19 +39,24 @@ timeperiods = [3, 5, 12, 24, 36, 48, 60]
long_timeperiods = [80, 100, 120, 140, 160, 180, 200]
sma_indicators = list()
+sma_indicators_h = list()
+sma_indicators_d = list()
score_indicators = list()
stop_buying_indicators = list()
-god_genes_with_timeperiod = list()
+sma_deriv1_indicators = list()
for timeperiod in timeperiods:
sma_indicators.append(f"sma{timeperiod}")
+ sma_indicators_h.append(f"sma{timeperiod}")
+ sma_indicators_d.append(f"sma{timeperiod}")
sma_indicators.append(f"sma{timeperiod}_1d")
# god_genes_with_timeperiod.append(f'max{timeperiod}')
# god_genes_with_timeperiod.append(f'min{timeperiod}')
# god_genes_with_timeperiod.append(f"percent{timeperiod}")
# god_genes_with_timeperiod.append(f"sma{timeperiod}")
- god_genes_with_timeperiod.append(f"sma{timeperiod}_deriv1")
- god_genes_with_timeperiod.append(f"sma{timeperiod}_deriv2")
- god_genes_with_timeperiod.append(f"sma{timeperiod}_score")
+ # sma_deriv1_indicators.append(f"sma{timeperiod}_deriv1")
+ sma_deriv1_indicators.append(f"sma{timeperiod}_deriv1")
+ # sma_deriv1_indicators.append(f"sma{timeperiod}_deriv2")
+ # sma_deriv1_indicators.append(f"sma{timeperiod}_score")
# stoploss_indicators.append(f"stop_buying{timeperiod}")
stop_buying_indicators.append(f"stop_buying{timeperiod}_1d")
@@ -63,29 +68,10 @@ for timeperiod in timeperiods:
# god_genes_with_timeperiod.append(f"sma{timeperiod}_trend_down")
# god_genes_with_timeperiod.append(f"sma{timeperiod}_trend_change_up")
# god_genes_with_timeperiod.append(f"sma{timeperiod}_trend_change_down")
+for timeperiod in long_timeperiods:
+ sma_deriv1_indicators.append(f"sma{timeperiod}_deriv1_1d")
+ sma_indicators_d.append(f"sma{timeperiod}")
-
-operators = [
- "D", # Disabled gene
- ">", # Indicator, bigger than cross indicator
- "<", # Indicator, smaller than cross indicator
- "=", # Indicator, equal with cross indicator
- "C", # Indicator, crossed the cross indicator
- "CA", # Indicator, crossed above the cross indicator
- "CB", # Indicator, crossed below the cross indicator
- # ">R", # Normalized indicator, bigger than real number
- # "=R", # Normalized indicator, equal with real number
- # "R", # Normalized indicator devided to cross indicator, bigger than real number
- # "/=R", # Normalized indicator devided to cross indicator, equal with real number
- # "/ 10)
-
- # TODO : it ill callculated in populate indicators.
- pd.set_option('display.max_rows', None)
- pd.set_option('display.max_columns', None)
- pd.set_option("display.width", 200)
-
- # print(f"{indicator} {crossed_indicator} {real_num}")
-
- dataframe[indicator] = gene_calculator(dataframe, indicator)
- dataframe[crossed_indicator] = gene_calculator(dataframe, crossed_indicator)
-
- indicator_trend_sma = f"{indicator}-SMA-{TREND_CHECK_CANDLES}"
- if operator in ["UT", "DT", "OT", "CUT", "CDT", "COT"]:
- dataframe[indicator_trend_sma] = gene_calculator(dataframe, indicator_trend_sma)
-
- if operator == ">":
- condition = (dataframe[indicator] > dataframe[crossed_indicator])
- elif operator == "=":
- condition = (np.isclose(dataframe[indicator], dataframe[crossed_indicator]))
- elif operator == "<":
- condition = (dataframe[indicator] < dataframe[crossed_indicator])
- elif operator == "C":
- condition = (
- (qtpylib.crossed_below(dataframe[indicator], dataframe[crossed_indicator])) |
- (qtpylib.crossed_above(
- dataframe[indicator], dataframe[crossed_indicator]))
- )
- elif operator == "CA":
- condition = (qtpylib.crossed_above(dataframe[indicator], dataframe[crossed_indicator]))
- elif operator == "CB":
- condition = (qtpylib.crossed_below(dataframe[indicator], dataframe[crossed_indicator]))
- elif operator == ">R":
- condition = (dataframe[indicator] > real_num)
- elif operator == "=R":
- condition = (np.isclose(dataframe[indicator], real_num))
- elif operator == "R":
- condition = (dataframe[indicator].div(dataframe[crossed_indicator]) > real_num)
- elif operator == "/=R":
- condition = (np.isclose(dataframe[indicator].div(dataframe[crossed_indicator]), real_num))
- elif operator == "/ dataframe[indicator_trend_sma])
- elif operator == "DT":
- condition = (dataframe[indicator] < dataframe[indicator_trend_sma])
- elif operator == "OT":
- condition = (np.isclose(dataframe[indicator], dataframe[indicator_trend_sma]))
- elif operator == "CUT":
- condition = (
- (
- qtpylib.crossed_above(dataframe[indicator],dataframe[indicator_trend_sma])
- ) & (
- dataframe[indicator] > dataframe[indicator_trend_sma]
- )
- )
- elif operator == "CDT":
- condition = (
- (
- qtpylib.crossed_below(dataframe[indicator], dataframe[indicator_trend_sma])
- ) &
- (
- dataframe[indicator] < dataframe[indicator_trend_sma]
- )
- )
- elif operator == "COT":
- condition = (
- (
- (
- qtpylib.crossed_below(dataframe[indicator], dataframe[indicator_trend_sma])
- ) |
- (
- qtpylib.crossed_above(dataframe[indicator], dataframe[indicator_trend_sma])
- )
- ) &
- (
- np.isclose(dataframe[indicator], dataframe[indicator_trend_sma])
- )
- )
-
- return condition, dataframe
-# #########################################################################################################################
-
# This class is a sample. Feel free to customize it.
class Empty(IStrategy):
@@ -364,6 +187,14 @@ class Empty(IStrategy):
}
}
+ start_bull_indicator = CategoricalParameter(sma_indicators_d, default='sma100', space='buy', optimize=True, load=True)
+ start_bull_deriv1 = DecimalParameter(-0.005, 0.005, decimals=3, default=0, space='buy', optimize=True, load=True)
+ start_bull_deriv2 = DecimalParameter(-0.005, 0.005, decimals=3, default=0, space='buy', optimize=True, load=True)
+
+ start_bear_indicator = CategoricalParameter(sma_indicators_d, default='sma100', space='buy', optimize=True, load=True)
+ start_bear_deriv1 = DecimalParameter(-0.005, 0.005, decimals=3, default=0, space='buy', optimize=True, load=True)
+ start_bear_deriv2 = DecimalParameter(-0.005, 0.005, decimals=3, default=0, space='buy', optimize=True, load=True)
+
buy_deriv1_sma60 = DecimalParameter(-0.005, 0.005, decimals=3, default=0, space='buy', optimize=False, load=True)
buy_deriv1_sma5d = DecimalParameter(-0.07, 0.07, decimals=2, default=0, space='buy', optimize=False, load=True)
buy_deriv1_sma12d = DecimalParameter(-0.07, 0.07, decimals=2, default=0, space='buy', optimize=False, load=True)
@@ -372,48 +203,24 @@ class Empty(IStrategy):
buy_deriv2_sma5d = DecimalParameter(-0.07, 0.07, decimals=2, default=0, space='buy', optimize=False, load=True)
buy_deriv2_sma12d = DecimalParameter(-0.07, 0.07, decimals=2, default=0, space='buy', optimize=False, load=True)
- buy_longue = CategoricalParameter(long_timeperiods, default=120, space='buy')
-
- # Buy Hyperoptable Parameters/Spaces.
- # buy_crossed_indicator0 = CategoricalParameter(god_genes_with_timeperiod, default="ADD-20", space='buy')
- # buy_crossed_indicator1 = CategoricalParameter(god_genes_with_timeperiod, default="ASIN-6", space='buy')
- # buy_crossed_indicator2 = CategoricalParameter(god_genes_with_timeperiod, default="CDLEVENINGSTAR-50", space='buy')
- #
- # buy_indicator0 = CategoricalParameter(god_genes_with_timeperiod, default="SMA-100", space='buy')
- # buy_indicator1 = CategoricalParameter(god_genes_with_timeperiod, default="WILLR-50", space='buy')
- # buy_indicator2 = CategoricalParameter(god_genes_with_timeperiod, default="CDLHANGINGMAN-20", space='buy')
- #
- # buy_operator0 = CategoricalParameter(operators, default="/ 0.01:
+ # factor = self.pairs[pair]['last_trade'].close_profit / 0.01
+ # amount = amount / factor
return min(amount, self.wallets.get_available_stake_amount())
@@ -546,6 +364,9 @@ class Empty(IStrategy):
last_candle_2 = dataframe.iloc[-2].squeeze()
last_candle_3 = dataframe.iloc[-3].squeeze()
+ # if (last_candle['has_cross_min_6'] and last_candle['sma60_deriv1'] > 0) or (last_candle['sma12_inv_1d']):
+ # self.pairs[pair]['count_of_lost'] = 0
+
condition = False if self.pairs[pair]['count_of_lost'] >= 1 \
and (last_candle['sma12_deriv1_1d'] < 0.001 \
or last_candle['sma12_deriv2_1d'] < 0.001) else True
@@ -619,19 +440,19 @@ class Empty(IStrategy):
buys=1,
stake=round(stake_amount, 2)
)
- else:
- self.log_trade(
- last_candle=last_candle,
- date=current_time,
- action=("π©Buy" if allow_to_buy else "Canceled") + " " + reason,
- pair=pair,
- rate=rate,
- dispo=dispo,
- profit=0,
- trade_type=entry_tag,
- buys=1,
- stake=0
- )
+ # else:
+ # self.log_trade(
+ # last_candle=last_candle,
+ # date=current_time,
+ # action=("π©Buy" if allow_to_buy else "Canceled") + " " + reason,
+ # pair=pair,
+ # rate=rate,
+ # dispo=dispo,
+ # profit=0,
+ # trade_type=entry_tag,
+ # buys=1,
+ # stake=0
+ # )
return allow_to_buy
def confirm_trade_exit(self, pair: str, trade: Trade, order_type: str, amount: float, rate: float,
@@ -701,6 +522,8 @@ class Empty(IStrategy):
self.pairs[pair]['max_profit'] = max(self.pairs[pair]['max_profit'], profit)
max_profit = self.pairs[pair]['max_profit']
+ # baisse_min = last_candle['close'] - last_candle['min12']
+
baisse = 0
if profit > 0:
baisse = 1 - (profit / max_profit)
@@ -722,19 +545,19 @@ class Empty(IStrategy):
# buys=count_of_buys,
# stake=0
# )
+ # if self.pairs[pair]['current_trade'].enter_tag == 'fall':
+ # if current_profit < - 0.02 and last_candle[f"close"] <= last_candle['sma60'] and self.wallets.get_available_stake_amount() < 50:
+ # self.pairs[pair]['force_sell'] = True
+ # return 'sma60'
+ # else:
if current_profit < - 0.02 and last_candle[f"close"] <= last_candle['sma60']:
self.pairs[pair]['force_sell'] = True
return 'sma60'
- cross = qtpylib.crossed_below(dataframe[self.sell_sma_indicators.value], dataframe[self.sell_crossed_sma_indicators.value])
-
- # if profit > 0 and cross.iloc[-1]:
- # self.pairs[pair]['force_sell'] = True
- # return 'Cross'
-
- if profit > max(5, expected_profit) and baisse > 0.30 and last_candle[f"close"] <= last_candle['sma36']:
- # and last_candle['percent3'] < 0 and last_candle['percent5'] < 0:
+ if profit > max(5, expected_profit) and \
+ (baisse > self.baisse.value and last_candle[f"close"] <= last_candle[self.b30_indicateur.value]) \
+ and last_candle['hapercent'] <0 :
self.pairs[pair]['force_sell'] = True
return 'B30'
@@ -827,7 +650,9 @@ class Empty(IStrategy):
dataframe['mid'] = dataframe['haopen'] + (dataframe['haclose'] - dataframe['haopen']) / 2
dataframe['zero'] = 0
+ dataframe[f"percent"] = dataframe['close'].pct_change()
for timeperiod in timeperiods:
+ dataframe[f"mid_smooth{timeperiod}"] = dataframe['mid'].rolling(timeperiod).mean()
dataframe[f'max{timeperiod}'] = talib.MAX(dataframe['close'], timeperiod=timeperiod)
dataframe[f'min{timeperiod}'] = talib.MIN(dataframe['close'], timeperiod=timeperiod)
dataframe[f"percent{timeperiod}"] = dataframe['close'].pct_change(timeperiod)
@@ -853,11 +678,27 @@ class Empty(IStrategy):
for timeperiod in long_timeperiods:
informative[f"sma{timeperiod}"] = informative['mid'].ewm(span=timeperiod, adjust=False).mean()
+ self.calculeDerivees(informative, f"sma{timeperiod}", timeframe=self.timeframe, ema_period=timeperiod)
+
informative['rsi'] = talib.RSI(informative['close'], timeperiod=14)
self.calculeDerivees(informative, f"rsi", timeframe=self.timeframe, ema_period=14)
informative['max_rsi_12'] = talib.MAX(informative['rsi'], timeperiod=12)
informative['max_rsi_24'] = talib.MAX(informative['rsi'], timeperiod=24)
+ informative[f'stop_buying_deb'] = qtpylib.crossed_below(informative[f"sma12"], informative['sma36']) & (informative['close'] < informative['sma100'])
+ informative[f'stop_buying_end'] = qtpylib.crossed_above(informative[f"sma12"], informative['sma36']) & (informative['close'] > informative['sma100'])
+
+ latched = np.zeros(len(informative), dtype=bool)
+
+ for i in range(1, len(informative)):
+ if informative['stop_buying_deb'].iloc[i]:
+ latched[i] = True
+ elif informative['stop_buying_end'].iloc[i]:
+ latched[i] = False
+ else:
+ latched[i] = latched[i - 1]
+ informative['stop_buying'] = latched
+
dataframe = merge_informative_pair(dataframe, informative, self.timeframe, "1d", ffill=True)
# ######################################################################################################
@@ -868,7 +709,8 @@ class Empty(IStrategy):
# dataframe['cross_sma60'] = qtpylib.crossed_below(dataframe[self.sell_sma_indicators.value], dataframe[self.sell_crossed_sma_indicators.value])
- dataframe[f'stop_buying'] = qtpylib.crossed_below(dataframe[f"sma12"], dataframe['sma48'])
+ dataframe[f'has_cross_min'] = qtpylib.crossed_above(dataframe[f"close"], dataframe['min60_1d'])
+ dataframe[f'has_cross_min_6'] = (dataframe['has_cross_min'].rolling(6).max() == 1)
dataframe['atr'] = talib.ATR(dataframe)
dataframe['rsi'] = talib.RSI(dataframe['close'], timeperiod=14)
@@ -891,62 +733,13 @@ class Empty(IStrategy):
def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
- # dataframe.loc[
- # (
- # (dataframe['sma24_score'].shift(2) <= dataframe['zero'])
- # & (dataframe['sma5'].shift(1) <= dataframe['sma5'])
- # & (dataframe['sma5_inv'] == -1)
- # & (dataframe['min24'].shift(3) == dataframe['min24'])
- # ),
- # 'buy'] = 1
-
conditions = list()
- # # print(dataframe.columns)
- #
- # buy_indicator = self.buy_indicator0.value
- # buy_crossed_indicator = self.buy_crossed_indicator0.value
- # buy_operator = self.buy_operator0.value
- # buy_real_num = self.buy_real_num0.value
- # condition, dataframe = condition_generator(
- # dataframe,
- # buy_operator,
- # buy_indicator,
- # buy_crossed_indicator,
- # buy_real_num
- # )
- # conditions.append(condition)
- # # backup
- # buy_indicator = self.buy_indicator1.value
- # buy_crossed_indicator = self.buy_crossed_indicator1.value
- # buy_operator = self.buy_operator1.value
- # buy_real_num = self.buy_real_num1.value
- #
- # condition, dataframe = condition_generator(
- # dataframe,
- # buy_operator,
- # buy_indicator,
- # buy_crossed_indicator,
- # buy_real_num
- # )
- # conditions.append(condition)
- #
- # buy_indicator = self.buy_indicator2.value
- # buy_crossed_indicator = self.buy_crossed_indicator2.value
- # buy_operator = self.buy_operator2.value
- # buy_real_num = self.buy_real_num2.value
- # condition, dataframe = condition_generator(
- # dataframe,
- # buy_operator,
- # buy_indicator,
- # buy_crossed_indicator,
- # buy_real_num
- # )
- # conditions.append(condition)
- # conditions.append((dataframe[self.stop_buying_indicator.value] == False) | (dataframe['range_pos'] < 0))
-
- #conditions.append((dataframe[self.stop_buying_indicator.value] == False) | (dataframe['range_pos'] < 0))
-
+ # #####################################################################################
+ # CA MONTE !!
+ # #####################################################################################
+ # conditions.append(dataframe[f"{self.start_bull_indicator.value}_deriv1_1d" ] > self.start_bull_deriv1.value)
+ # conditions.append(dataframe[f"{self.start_bull_indicator.value}_deriv2_1d"] > self.start_bull_deriv2.value)
conditions.append(dataframe['sma12_deriv1'] > self.buy_deriv1_sma60.value)
conditions.append(dataframe['sma5_deriv1_1d'] > self.buy_deriv1_sma5d.value)
conditions.append(dataframe['sma12_deriv1_1d'] > self.buy_deriv1_sma12d.value)
@@ -962,11 +755,6 @@ class Empty(IStrategy):
dynamic_rsi_threshold = 70 + 15 * np.tanh(dataframe["dist_sma200_1d"] * 5)
conditions.append((dataframe['max_rsi_12_1d'] < dynamic_rsi_threshold))
- # | (
- # (dataframe['sma5_deriv1'] > 0) & (dataframe['sma12_deriv1'] > 0) & (dataframe['sma24_deriv1'] > 0) & (
- # dataframe['sma48_deriv1'] > 0) & (dataframe['sma60_deriv1'] > 0) & (dataframe['sma5_deriv1_1d'] > 0))
- # )
-
conditions.append(dataframe[f"close"] > dataframe['sma60'])
conditions.append(((dataframe[f"range_pos"] < 0.05) ) | ((dataframe['sma12_deriv1'] > 0) & (dataframe['sma12_deriv2'] > 0)))
@@ -975,17 +763,84 @@ class Empty(IStrategy):
| (dataframe['sma60_inv_1d'] == -1)
)
- # print(f"BUY indicators tested \n"
- # f"{self.buy_indicator0.value} {self.buy_crossed_indicator0.value} {self.buy_operator0.value} {self.buy_real_num0.value} \n"
- # f"{self.buy_indicator1.value} {self.buy_crossed_indicator1.value} {self.buy_operator1.value} {self.buy_real_num1.value} \n"
- # f"{self.buy_indicator2.value} {self.buy_crossed_indicator2.value} {self.buy_operator2.value} {self.buy_real_num2.value} \n"
- # )
-
if conditions:
dataframe.loc[
reduce(lambda x, y: x & y, conditions),
['enter_long', 'enter_tag']
- ] = (1, 'god')
+ ] = (1, 'bull')
+
+ # #####################################################################################
+ # CA BAISSE !!
+ # "buy": {
+ # "buy_deriv1_sma12d": 0.0,
+ # "buy_deriv1_sma5d": 0.0,
+ # "buy_deriv1_sma60": 0.003,
+ # "buy_deriv2_sma12d": -0.03,
+ # "buy_deriv2_sma5d": 0.0,
+ # "buy_deriv2_sma60": -0.002,
+ # "buy_longue": 200,
+ # "buy_longue_derive": "sma160_deriv1_1d"
+ # },
+ # "protection": {
+ # "drop_from_last_entry": -0.03,
+ # "b30_indicateur": "sma3",
+ # "baisse": 0.31
+ # },
+ # #####################################################################################
+ conditions = list()
+ conditions.append(dataframe[f"{self.start_bear_indicator.value}_deriv1_1d" ] < self.start_bear_deriv1.value)
+ conditions.append(dataframe[f"{self.start_bear_indicator.value}_deriv2_1d"] < self.start_bear_deriv2.value)
+
+ conditions.append(dataframe['sma12_deriv1'] > 0.003)
+ conditions.append(dataframe['sma5_deriv1_1d'] > 0.0)
+ conditions.append(dataframe['sma12_deriv1_1d'] > 0.0)
+
+ conditions.append(dataframe['sma12_deriv2'] > -0.002)
+ conditions.append(dataframe['sma5_deriv2_1d'] > 0)
+ conditions.append(dataframe['sma12_deriv2_1d'] > -0.03)
+
+ conditions.append(dataframe['hapercent'] > 0)
+ # conditions.append(dataframe['percent12'] < 0.01)
+ # conditions.append(dataframe['percent5'] < 0.01)
+ conditions.append(dataframe['max_rsi_24'] < 80)
+
+ dynamic_rsi_threshold = 70 + 15 * np.tanh(dataframe["dist_sma200_1d"] * 5)
+ conditions.append((dataframe['max_rsi_12_1d'] < dynamic_rsi_threshold))
+ conditions.append(dataframe[f"close"] > dataframe['sma60'])
+ conditions.append(((dataframe[f"range_pos"] < 0.05) ) | ((dataframe['sma12_deriv1'] > 0) & (dataframe['sma12_deriv2'] > 0)))
+
+ conditions.append(
+ (dataframe['close_1d'] > dataframe[f'sma{self.buy_longue.value}_1d'])
+ | (dataframe['sma60_inv_1d'] == -1)
+ )
+
+ # if conditions:
+ # dataframe.loc[
+ # reduce(lambda x, y: x & y, conditions),
+ # ['enter_long', 'enter_tag']
+ # ] = (1, 'bear')
+
+ # conditions = list()
+ # conditions.append(dataframe['close_1d'] < dataframe[f'sma{self.buy_longue.value}_1d'])
+ # conditions.append(dataframe['has_cross_min'].rolling(6).max() == 1)
+ # conditions.append(dataframe['mid_smooth5'] > dataframe['mid_smooth5'].shift(1))
+ # conditions.append(dataframe['hapercent'] > 0)
+ # conditions.append(dataframe['percent5'] < 0.01)
+ # dataframe.loc[
+ # reduce(lambda x, y: x & y, conditions),
+ # ['enter_long', 'enter_tag']
+ # ] = (1, 'cross_min')
+
+ # conditions = list()
+ # # conditions.append(dataframe['close_1d'] < dataframe[f'sma{self.buy_longue.value}_1d'])
+ # # conditions.append(dataframe['has_cross_min'].rolling(6).max() == 1)
+ # # conditions.append(dataframe['mid_smooth5'] > dataframe['mid_smooth5'].shift(1))
+ # conditions.append(dataframe['min12'] == dataframe['min12'].shift(3))
+ # conditions.append((dataframe['percent24'] < -0.025) | (dataframe['percent12'] < -0.025))
+ # dataframe.loc[
+ # reduce(lambda x, y: x & y, conditions),
+ # ['enter_long', 'enter_tag']
+ # ] = (1, 'fall')
return dataframe
@@ -1087,35 +942,35 @@ class Empty(IStrategy):
# ####################################################################
# Calcul de la pente lissΓ©e
- d1 = series.diff()
- d1_smooth = d1.rolling(5).mean()
- # Normalisation
- z = (d1_smooth - d1_smooth.rolling(ema_period).mean()) / d1_smooth.rolling(ema_period).std()
+ # d1 = series.diff()
+ # d1_smooth = d1.rolling(5).mean()
+ # # Normalisation
+ # z = (d1_smooth - d1_smooth.rolling(ema_period).mean()) / d1_smooth.rolling(ema_period).std()
- dataframe[f"{name}{suffixe}_trend_up"] = (
- (d1_smooth.shift(1) < 0) &
- (d1_smooth > 0) &
- (z > 1.0)
- )
-
- dataframe[f"{name}{suffixe}_trend_down"] = (
- (d1_smooth.shift(1) > 0) &
- (d1_smooth < 0) &
- (z < -1.0)
- )
-
- momentum_short = d1.rolling(int(ema_period / 2)).mean()
- momentum_long = d1.rolling(ema_period * 2).mean()
-
- dataframe[f"{name}{suffixe}_trend_change_up"] = (
- (momentum_short.shift(1) < momentum_long.shift(1)) &
- (momentum_short > momentum_long)
- )
-
- dataframe[f"{name}{suffixe}_trend_change_down"] = (
- (momentum_short.shift(1) > momentum_long.shift(1)) &
- (momentum_short < momentum_long)
- )
+ # dataframe[f"{name}{suffixe}_trend_up"] = (
+ # (d1_smooth.shift(1) < 0) &
+ # (d1_smooth > 0) &
+ # (z > 1.0)
+ # )
+ #
+ # dataframe[f"{name}{suffixe}_trend_down"] = (
+ # (d1_smooth.shift(1) > 0) &
+ # (d1_smooth < 0) &
+ # (z < -1.0)
+ # )
+ #
+ # momentum_short = d1.rolling(int(ema_period / 2)).mean()
+ # momentum_long = d1.rolling(ema_period * 2).mean()
+ #
+ # dataframe[f"{name}{suffixe}_trend_change_up"] = (
+ # (momentum_short.shift(1) < momentum_long.shift(1)) &
+ # (momentum_short > momentum_long)
+ # )
+ #
+ # dataframe[f"{name}{suffixe}_trend_change_down"] = (
+ # (momentum_short.shift(1) > momentum_long.shift(1)) &
+ # (momentum_short < momentum_long)
+ # )
return dataframe
@@ -1290,4 +1145,12 @@ class Empty(IStrategy):
expected_profit = lim * self.pairs[pair]['total_amount'] # min(3 * lim, max(lim, pct_to_max)) # 0.004 + 0.002 * self.pairs[pair]['count_of_buys'] #min(0.01, first_max)
self.pairs[pair]['expected_profit'] = expected_profit
- return expected_profit
\ No newline at end of file
+ return expected_profit
+
+ def getLastClosedTrade(self):
+ # rΓ©cupΓ©rer le dernier trade fermΓ©
+ trades = Trade.get_trades_proxy(pair=pair,is_open=False)
+ if trades:
+ last_trade = trades[-1]
+ self.pairs[pair]['last_profit'] = last_trade.close_profit # ex: 0.12 = +12%
+ self.pairs[pair]['last_trade'] = last_trade
\ No newline at end of file
diff --git a/Empty.txt b/Empty.txt
index 20872b5..c226f13 100644
--- a/Empty.txt
+++ b/Empty.txt
@@ -232,3 +232,281 @@ Backtested 2022-01-01 00:00:00 -> 2026-02-20 00:00:00 | Max open trades : 1
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Empty β 92 β 1.62 β 2474.507 β 247.45 β 3 days, 23:07:00 β 45 0 47 48.9 β 359.078 USDT 10.66% β
ββββββββββββ΄βββββββββ΄βββββββββββββββ΄ββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββββββββ΄βββββββββββββββββββββββ
+
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2023-01-10 17:00 |π©Buy 0 | BTC | bull | 17302.55| 1000 | 0/0| - | 17302.15 | - | 17302 | 17302 | 1/1| 1000.0
+| 2023-02-09 22:00 |π₯Sell 43500 | BTC | B30 | 21856.3| - |260.9/395.52| 0.263 | 17302.15 | 0.263 | 17302 | 17302 | /1| -
+| 2023-02-15 00:00 |π©Buy 7320 | BTC | bull | 22199.84| 1261 | 0/0| - | 22199.84 | - | 22199 | 17302 | 1/1| 1260.9
+| 2023-02-16 23:00 |π₯Sell 2820 | BTC | B30 | 23994.76| - |99.31/160.46| 0.081 | 22199.84 | 0.081 | 22199 | 17302 | /1| -
+| 2023-02-17 17:00 |π©Buy 1080 | BTC | bull | 24091.21| 1360 | 0/0| - | 24091.21 | - | 24091 | 17302 | 1/1|1360.21
+| 2023-02-19 18:00 |π₯Sell 2940 | BTC | B30 | 24361.74| - |12.69/44.15| 0.011 | 24091.21 | 0.011 | 24091 | 17302 | /1| -
+| 2023-02-28 17:00 |π©Buy 12900 | BTC | bull | 23456.05| 1373 | 0/0| - | 23456.05 | - | 24091 | 17302 | 1/1| 1372.9
+| 2023-03-03 02:00 |π₯Sell 3420 | BTC | sma60 | 22150.31| - |-79.09/21.4| -0.056 | 23456.05 | -0.056 | 24091 | 17302 | /1| -
+| 2023-03-16 09:00 |π©Buy 19140 | BTC | bull | 24581.1| 1294 | 0/0| - | 24581.1 | - | 24581 | 17302 | 1/1| 1293.8
+| 2023-03-22 20:00 |π₯Sell 9300 | BTC | B30 | 26667.33| - |107.18/211.2| 0.085 | 24581.1 | 0.085 | 24581 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2023-03-30 03:00 |π©Buy 10500 | BTC | bull | 28964.76| 1401 | 0/0| - | 28964.76 | - | 28964 | 17302 | 1/1|1400.98
+| 2023-03-30 18:00 |π₯Sell 900 | BTC | sma60 | 27839.41| - | -57.17/0| -0.039 | 28964.76 | -0.039 | 28964 | 17302 | /1| -
+| 2023-03-31 15:00 |π©Buy 1260 | BTC | bull | 28521.78| 1344 | 0/0| - | 28521.78 | - | 28964 | 17302 | 1/1|1343.81
+| 2023-04-02 20:00 |π₯Sell 3180 | BTC | sma60 | 27943.85| - |-29.89/1.49| -0.02 | 28521.78 | -0.02 | 28964 | 17302 | /1| -
+| 2023-04-13 04:00 |π©Buy 14880 | BTC | bull | 30072.17| 1314 | 0/0| - | 30072.17 | - | 30072 | 17302 | 1/1|1313.92
+| 2023-04-15 02:00 |π₯Sell 2760 | BTC | B30 | 30370.01| - |10.37/35.37| 0.01 | 30072.17 | 0.01 | 30072 | 17302 | /1| -
+| 2023-04-26 00:00 |π©Buy 15720 | BTC | bull | 28300.8| 1324 | 0/0| - | 28300.79 | - | 30072 | 17302 | 1/1| 1324.3
+| 2023-04-28 14:00 |π₯Sell 3720 | BTC | B30 | 29029.48| - |31.41/75.16| 0.026 | 28300.79 | 0.026 | 30072 | 17302 | /1| -
+| 2023-04-28 23:00 |π©Buy 540 | BTC | bull | 29345.35| 1356 | 0/0| - | 29345.34 | - | 30072 | 17302 | 1/1|1355.71
+| 2023-05-01 02:00 |π₯Sell 3060 | BTC | sma60 | 28504.36| - |-41.52/14.46| -0.029 | 29345.34 | -0.029 | 30072 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2023-05-30 12:00 |π©Buy 42360 | BTC | bull | 28021.39| 1314 | 0/0| - | 28021.4 | - | 30072 | 17302 | 1/1|1314.19
+| 2023-05-31 05:00 |π₯Sell 1020 | BTC | sma60 | 27257.7| - | -38.4/0| -0.027 | 28021.4 | -0.027 | 30072 | 17302 | /1| -
+| 2023-06-19 19:00 |π©Buy 28200 | BTC | bull | 26495.99| 1276 | 0/0| - | 26496.0 | - | 30072 | 17302 | 1/1|1275.79
+| 2023-07-17 19:00 |π₯Sell 40320 | BTC | B30 | 29802.39| - |156.49/243.25| 0.125 | 26496.0 | 0.125 | 30072 | 17302 | /1| -
+| 2023-07-19 05:00 |π©Buy 2040 | BTC | bull | 30099.08| 1432 | 0/0| - | 30099.08 | - | 30099 | 17302 | 1/1|1432.28
+| 2023-07-24 10:00 |π₯Sell 7500 | BTC | sma60 | 29178.01| - |-46.65/8.02| -0.031 | 30099.08 | -0.031 | 30099 | 17302 | /1| -
+| 2023-09-20 03:00 |π©Buy 83100 | BTC | bull | 27165.48| 1386 | 0/0| - | 27165.48 | - | 30099 | 17302 | 1/1|1385.64
+| 2023-09-21 11:00 |π₯Sell 1920 | BTC | sma60 | 26649.89| - | -29.04/0| -0.019 | 27165.48 | -0.019 | 30099 | 17302 | /1| -
+| 2023-10-01 08:00 |π©Buy 14220 | BTC | bull | 27107.94| 1357 | 0/0| - | 27107.95 | - | 30099 | 17302 | 1/1| 1356.6
+| 2023-10-02 22:00 |π₯Sell 2280 | BTC | B30 | 27472.22| - |15.5/69.08| 0.013 | 27107.95 | 0.013 | 30099 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2023-10-15 20:00 |π©Buy 18600 | BTC | bull | 27043.75| 1372 | 0/0| - | 27043.75 | - | 30099 | 17302 | 1/1| 1372.1
+| 2023-10-18 15:00 |π₯Sell 4020 | BTC | B30 | 28190.49| - |55.37/82.75| 0.042 | 27043.75 | 0.042 | 30099 | 17302 | /1| -
+| 2023-10-19 12:00 |π©Buy 1260 | BTC | bull | 28450.7| 1427 | 0/0| - | 28450.69 | - | 30099 | 17302 | 1/1|1427.47
+| 2024-01-15 00:00 |π₯Sell 126000 | BTC | B30 | 41732.35| - |662.82/1005.58| 0.467 | 28450.69 | 0.467 | 30099 | 17302 | /1| -
+| 2024-01-27 22:00 |π©Buy 18600 | BTC | bull | 42150.59| 2090 | 0/0| - | 42150.59 | - | 42150 | 17302 | 1/1|2090.29
+| 2024-01-31 00:00 |π₯Sell 4440 | BTC | B30 | 42941.1| - |34.98/68.37| 0.019 | 42150.59 | 0.019 | 42150 | 17302 | /1| -
+| 2024-02-08 00:00 |π©Buy 11520 | BTC | bull | 44349.6| 2125 | 0/0| - | 44349.6 | - | 44349 | 17302 | 1/1|2125.27
+| 2024-03-19 09:00 |π₯Sell 58140 | BTC | B30 | 63464.0| - |910.78/1394.94| 0.431 | 44349.6 | 0.431 | 44349 | 17302 | /1| -
+| 2024-03-24 11:00 |π©Buy 7320 | BTC | bull | 65098.01| 3036 | 0/0| - | 65098.01 | - | 65098 | 17302 | 1/1|3036.05
+| 2024-03-27 16:00 |π₯Sell 4620 | BTC | B30 | 68874.0| 1 |169.83/275.49| 0.058 | 65098.01 | 0.058 | 65098 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2024-03-28 07:00 |π©Buy 900 | BTC | bull | 70363.74| 3206 | 0/0| - | 70363.74 | - | 70363 | 17302 | 1/1|3205.87
+| 2024-04-01 15:00 |π₯Sell 6240 | BTC | sma60 | 68906.07| - |-72.76/47.03| -0.021 | 70363.74 | -0.021 | 70363 | 17302 | /1| -
+| 2024-04-08 08:00 |π©Buy 9660 | BTC | bull | 70698.64| 3133 | 0/0| - | 70698.63 | - | 70698 | 17302 | 1/1|3133.12
+| 2024-04-09 15:00 |π₯Sell 1860 | BTC | sma60 | 69358.32| - |-65.6/69.22| -0.019 | 70698.63 | -0.019 | 70698 | 17302 | /1| -
+| 2024-04-10 20:00 |π©Buy 1740 | BTC | bull | 70084.0| 3068 | 0/0| - | 70083.99 | - | 70698 | 17302 | 1/1|3067.52
+| 2024-04-12 18:00 |π₯Sell 2760 | BTC | sma60 | 68140.02| 1 |-91.12/38.98| -0.028 | 70083.99 | -0.028 | 70698 | 17302 | /1| -
+| 2024-04-24 05:00 |π©Buy 16500 | BTC | bull | 67008.0| 2976 | 0/0| - | 67008.0 | - | 70698 | 17302 | 1/1| 2976.4
+| 2024-04-24 15:00 |π₯Sell 600 | BTC | sma60 | 65234.85| 1 | -84.62/0| -0.026 | 67008.0 | -0.026 | 70698 | 17302 | /1| -
+| 2024-05-06 08:00 |π©Buy 16860 | BTC | bull | 64540.75| 2892 | 0/0| - | 64540.75 | - | 70698 | 17302 | 1/1|2891.79
+| 2024-05-06 15:00 |π₯Sell 420 | BTC | sma60 | 63271.97| - |-62.57/22.21| -0.02 | 64540.75 | -0.02 | 70698 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2024-05-07 10:00 |π©Buy 1140 | BTC | bull | 64119.98| 2829 | 0/0| - | 64119.98 | - | 70698 | 17302 | 1/1|2829.22
+| 2024-05-07 23:00 |π₯Sell 780 | BTC | sma60 | 62850.92| - | -61.59/0| -0.02 | 64119.98 | -0.02 | 70698 | 17302 | /1| -
+| 2024-05-17 08:00 |π©Buy 13500 | BTC | bull | 66386.93| 2768 | 0/0| - | 66386.94 | - | 70698 | 17302 | 1/1|2767.63
+| 2024-05-19 15:00 |π₯Sell 3300 | BTC | B30 | 66928.0| 1 |17.0/33.73| 0.008 | 66386.94 | 0.008 | 70698 | 17302 | /1| -
+| 2024-05-27 16:00 |π©Buy 11580 | BTC | bull | 70373.86| 2785 | 0/0| - | 70373.85 | - | 70698 | 17302 | 1/1|2784.62
+| 2024-05-28 02:00 |π₯Sell 600 | BTC | sma60 | 68614.11| 1 | -75.11/0| -0.025 | 70373.85 | -0.025 | 70698 | 17302 | /1| -
+| 2024-06-05 01:00 |π©Buy 11460 | BTC | bull | 70775.99| 2710 | 0/0| - | 70776.0 | - | 70776 | 17302 | 1/1|2709.51
+| 2024-06-07 19:00 |π₯Sell 3960 | BTC | sma60 | 69154.43| - |-67.43/29.92| -0.023 | 70776.0 | -0.023 | 70776 | 17302 | /1| -
+| 2024-07-15 00:00 |π©Buy 53580 | BTC | bull | 60797.91| 2642 | 0/0| - | 60797.91 | - | 70776 | 17302 | 1/1|2642.08
+| 2024-07-16 09:00 |π₯Sell 1980 | BTC | B30 | 62820.67| - |82.52/170.52| 0.033 | 60797.91 | 0.033 | 70776 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2024-07-16 17:00 |π©Buy 480 | BTC | bull | 64500.0| 2725 | 0/0| - | 64500.0 | - | 70776 | 17302 | 1/1| 2724.6
+| 2024-07-22 15:00 |π₯Sell 8520 | BTC | B30 | 66712.0| - |87.89/150.43| 0.034 | 64500.0 | 0.034 | 70776 | 17302 | /1| -
+| 2024-07-27 00:00 |π©Buy 6300 | BTC | bull | 67908.0| 2812 | 0/0| - | 67907.99 | - | 70776 | 17302 | 1/1|2812.49
+| 2024-07-30 01:00 |π₯Sell 4380 | BTC | sma60 | 66610.0| - |-59.32/72.62| -0.019 | 67907.99 | -0.019 | 70776 | 17302 | /1| -
+| 2024-08-25 23:00 |π©Buy 38760 | BTC | bull | 64482.0| 2753 | 0/0| - | 64482.01 | - | 70776 | 17302 | 1/1|2753.17
+| 2024-08-26 22:00 |π₯Sell 1380 | BTC | sma60 | 63155.81| - | -62.06/0| -0.021 | 64482.01 | -0.021 | 70776 | 17302 | /1| -
+| 2024-09-14 00:00 |π©Buy 26040 | BTC | bull | 60497.99| 2691 | 0/0| - | 60498.0 | - | 70776 | 17302 | 1/1| 2691.1
+| 2024-09-16 00:00 |π₯Sell 2880 | BTC | sma60 | 59132.0| - | -66.08/0| -0.023 | 60498.0 | -0.023 | 70776 | 17302 | /1| -
+| 2024-09-19 00:00 |π©Buy 4320 | BTC | bull | 61759.98| 2625 | 0/0| - | 61759.99 | - | 70776 | 17302 | 1/1|2625.02
+| 2024-09-20 18:00 |π₯Sell 2520 | BTC | B30 | 62704.0| - |34.83/83.22| 0.015 | 61759.99 | 0.015 | 70776 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2024-09-28 04:00 |π©Buy 10680 | BTC | bull | 66063.76| 2660 | 0/0| - | 66063.76 | - | 70776 | 17302 | 1/1|2659.86
+| 2024-09-30 02:00 |π₯Sell 2760 | BTC | sma60 | 64769.99| - | -57.35/0| -0.02 | 66063.76 | -0.02 | 70776 | 17302 | /1| -
+| 2024-10-14 05:00 |π©Buy 20340 | BTC | bull | 64137.99| 2603 | 0/0| - | 64137.99 | - | 70776 | 17302 | 1/1| 2602.5
+| 2024-10-21 14:00 |π₯Sell 10620 | BTC | B30 | 67312.0| - |123.44/200.4| 0.049 | 64137.99 | 0.049 | 70776 | 17302 | /1| -
+| 2024-10-27 15:00 |π©Buy 8700 | BTC | bull | 67696.0| 2726 | 0/0| - | 67695.99 | - | 70776 | 17302 | 1/1|2725.94
+| 2024-10-31 14:00 |π₯Sell 5700 | BTC | B30 | 71308.0| - |139.82/214.71| 0.053 | 67695.99 | 0.053 | 70776 | 17302 | /1| -
+| 2024-11-06 01:00 |π©Buy 7860 | BTC | bull | 71096.03| 2866 | 0/0| - | 71096.04 | - | 71096 | 17302 | 1/1|2865.76
+| 2024-12-20 09:00 |π₯Sell 63840 | BTC | B30 | 95473.74| 1 |975.71/1490.41| 0.343 | 71096.04 | 0.343 | 71096 | 17302 | /1| -
+| 2024-12-26 00:00 |π©Buy 8100 | BTC | bull | 99429.61| 3841 | 0/0| - | 99429.6 | - | 99429 | 17302 | 1/1|3841.47
+| 2024-12-26 09:00 |π₯Sell 540 | BTC | sma60 | 95878.56| 1 | -144.72/0| -0.036 | 99429.6 | -0.036 | 99429 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2025-01-05 23:00 |π©Buy 15240 | BTC | bull | 98695.21| 3697 | 0/0| - | 98695.21 | - | 99429 | 17302 | 1/1|3696.75
+| 2025-01-07 13:00 |π₯Sell 2280 | BTC | B30 |100750.89| 1 |69.52/125.06| 0.021 | 98695.21 | 0.021 | 99429 | 17302 | /1| -
+| 2025-01-13 22:00 |π©Buy 9180 | BTC | bull | 94193.49| 3766 | 0/0| - | 94193.49 | - | 99429 | 17302 | 1/1|3766.26
+| 2025-01-16 15:00 |π₯Sell 3900 | BTC | B30 | 97618.89| - |129.28/244.24| 0.036 | 94193.49 | 0.036 | 99429 | 17302 | /1| -
+| 2025-01-17 02:00 |π©Buy 660 | BTC | bull | 101659.8| 3896 | 0/0| - | 101659.8 | - | 101659 | 17302 | 1/1|3895.54
+| 2025-01-19 22:00 |π₯Sell 4080 | BTC | B30 |103684.44| 1 |69.7/168.86| 0.02 | 101659.8 | 0.02 | 101659 | 17302 | /1| -
+| 2025-01-23 18:00 |π©Buy 5520 | BTC | bull |105927.78| 3965 | 0/0| - | 105927.78 | - | 105927 | 17302 | 1/1|3965.24
+| 2025-01-23 20:00 |π₯Sell 120 | BTC | sma60 |103770.04| - | -88.61/0| -0.02 | 105927.78 | -0.02 | 105927 | 17302 | /1| -
+| 2025-01-31 17:00 |π©Buy 11340 | BTC | bull |105081.86| 3877 | 0/0| - | 105081.87 | - | 105927 | 17302 | 1/1|3876.63
+| 2025-01-31 19:00 |π₯Sell 120 | BTC | sma60 |102627.29| - | -98.21/0| -0.023 | 105081.87 | -0.023 | 105927 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2025-04-14 04:00 |π©Buy 104220 | BTC | bull | 84566.04| 3778 | 0/0| - | 84566.03 | - | 105927 | 17302 | 1/1|3778.41
+| 2025-06-05 20:00 |π₯Sell 75840 | BTC | B30 |101914.77| - |766.81/1207.18| 0.205 | 84566.03 | 0.205 | 105927 | 17302 | /1| -
+| 2025-06-08 17:00 |π©Buy 4140 | BTC | bull | 106190.0| 4545 | 0/0| - | 106189.99 | - | 106189 | 17302 | 1/1|4545.22
+| 2025-06-11 18:00 |π₯Sell 4380 | BTC | B30 |108984.72| - |110.4/165.55| 0.026 | 106189.99 | 0.026 | 106189 | 17302 | /1| -
+| 2025-06-24 00:00 |π©Buy 17640 | BTC | bull |105333.94| 4656 | 0/0| - | 105333.93 | - | 106189 | 17302 | 1/1|4655.63
+| 2025-06-26 14:00 |π₯Sell 3720 | BTC | B30 |106960.01| 1 |62.47/105.0| 0.015 | 105333.93 | 0.015 | 106189 | 17302 | /1| -
+| 2025-07-09 14:00 |π©Buy 18720 | BTC | bull |109183.99| 4718 | 0/0| - | 109184.0 | - | 109184 | 17302 | 1/1| 4718.1
+| 2025-07-15 03:00 |π₯Sell 7980 | BTC | B30 |118251.05| - |381.96/575.56| 0.083 | 109184.0 | 0.083 | 109184 | 17302 | /1| -
+| 2025-07-23 00:00 |π©Buy 11340 | BTC | bull |119954.43| 5100 | 0/0| - | 119954.42 | - | 119954 | 17302 | 1/1|5100.06
+| 2025-07-23 14:00 |π₯Sell 840 | BTC | sma60 |117381.44| 1 | -119.47/0| -0.021 | 119954.42 | -0.021 | 119954 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2025-07-24 02:00 |π©Buy 720 | BTC | bull | 119094.4| 4981 | 0/0| - | 119094.4 | - | 119954 | 17302 | 1/1| 4980.6
+| 2025-07-25 03:00 |π₯Sell 1500 | BTC | sma60 |116353.67| - | -124.46/0| -0.023 | 119094.4 | -0.023 | 119954 | 17302 | /1| -
+| 2025-08-09 11:00 |π©Buy 22080 | BTC | bull |117424.16| 4856 | 0/0| - | 117424.16 | - | 119954 | 17302 | 1/1|4856.13
+| 2025-08-11 18:00 |π₯Sell 3300 | BTC | B30 | 119500.0| 1 |76.04/191.73| 0.018 | 117424.16 | 0.018 | 119954 | 17302 | /1| -
+| 2025-08-12 17:00 |π©Buy 1380 | BTC | bull |119647.69| 4932 | 0/0| - | 119647.7 | - | 119954 | 17302 | 1/1|4932.17
+| 2025-08-14 11:00 |π₯Sell 2520 | BTC | B30 | 120933.0| - |43.06/163.09| 0.011 | 119647.7 | 0.011 | 119954 | 17302 | /1| -
+| 2025-09-02 03:00 |π©Buy 26880 | BTC | bull | 110246.0| 4975 | 0/0| - | 110246.01 | - | 119954 | 17302 | 1/1|4975.23
+| 2025-09-04 04:00 |π₯Sell 2940 | BTC | B30 |111148.97| 1 |30.75/83.2| 0.008 | 110246.01 | 0.008 | 119954 | 17302 | /1| -
+| 2025-09-05 00:00 |π©Buy 1200 | BTC | bull |110730.87| 5006 | 0/0| - | 110730.87 | - | 119954 | 17302 | 1/1|5005.99
+| 2025-09-09 01:00 |π₯Sell 5820 | BTC | B30 |111650.03| 1 |31.49/102.15| 0.008 | 110730.87 | 0.008 | 119954 | 17302 | /1| -
+| Date | Action |Pair | Trade Type | Rate | Dispo | Profit | Pct | max_touch | last_lost | last_max| last_max| Buys| Stake | rsi|
++------------------+------------+-----+--------------------+---------+--------+------------+--------+-------------+--------------+------------------+-----+-------++------+-------+-----+-----+-----+-----+-----+-----+
+| 2025-09-09 09:00 |π©Buy 480 | BTC | bull |112992.69| 5037 | 0/0| - | 112992.69 | - | 119954 | 17302 | 1/1|5037.48
+| 2025-09-09 16:00 |π₯Sell 420 | BTC | sma60 |110880.76| - | -104.13/0| -0.019 | 112992.69 | -0.019 | 119954 | 17302 | /1| -
+| 2025-09-10 09:00 |π©Buy 1020 | BTC | bull |112370.07| 4933 | 0/0| - | 112370.08 | - | 119954 | 17302 | 1/1|4933.35
+| 2025-09-14 16:00 |π₯Sell 6180 | BTC | B30 |115224.01| - |115.3/177.07| 0.025 | 112370.08 | 0.025 | 119954 | 17302 | /1| -
+| 2025-09-18 01:00 |π©Buy 4860 | BTC | bull |116350.65| 5049 | 0/0| - | 116350.65 | - | 119954 | 17302 | 1/1|5048.65
+| 2025-09-22 03:00 |π₯Sell 5880 | BTC | sma60 |114187.81| - |-103.85/53.72| -0.019 | 116350.65 | -0.019 | 119954 | 17302 | /1| -
+| 2025-10-01 01:00 |π©Buy 12840 | BTC | bull |114239.53| 4945 | 0/0| - | 114239.53 | - | 119954 | 17302 | 1/1| 4944.8
+| 2025-10-07 16:00 |π₯Sell 9540 | BTC | B30 |121846.01| 1 |318.99/499.08| 0.067 | 114239.53 | 0.067 | 119954 | 17302 | /1| -
+2026-02-28 17:34:59,918 - freqtrade.misc - INFO - dumping json to
+"/freqtrade/user_data/backtest_results/backtest-result-2026-02-28_17-34-59.meta.json"
+Result for strategy Empty
+ BACKTESTING REPORT
+ββββββββββββ³βββββββββ³βββββββββββββββ³ββββββββββββββββββ³βββββββββββββββ³βββββββββββββββββββ³βββββββββββββββββββββββββ
+β Pair β Trades β Avg Profit % β Tot Profit USDT β Tot Profit % β Avg Duration β Win Draw Loss Win% β
+β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
+β BTC/USDT β 59 β 3.3 β 4263.790 β 426.38 β 6 days, 23:28:00 β 33 0 26 55.9 β
+β TOTAL β 59 β 3.3 β 4263.790 β 426.38 β 6 days, 23:28:00 β 33 0 26 55.9 β
+ββββββββββββ΄βββββββββ΄βββββββββββββββ΄ββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββββββββ
+ LEFT OPEN TRADES REPORT
+βββββββββ³βββββββββ³βββββββββββββββ³ββββββββββββββββββ³βββββββββββββββ³βββββββββββββββ³βββββββββββββββββββββββββ
+β Pair β Trades β Avg Profit % β Tot Profit USDT β Tot Profit % β Avg Duration β Win Draw Loss Win% β
+β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
+β TOTAL β 0 β 0.0 β 0.000 β 0.0 β 0:00 β 0 0 0 0 β
+βββββββββ΄βββββββββ΄βββββββββββββββ΄ββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββ
+ ENTER TAG STATS
+βββββββββββββ³ββββββββββ³βββββββββββββββ³ββββββββββββββββββ³βββββββββββββββ³βββββββββββββββββββ³βββββββββββββββββββββββββ
+β Enter Tag β Entries β Avg Profit % β Tot Profit USDT β Tot Profit % β Avg Duration β Win Draw Loss Win% β
+β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
+β bull β 59 β 3.3 β 4263.790 β 426.38 β 6 days, 23:28:00 β 33 0 26 55.9 β
+β TOTAL β 59 β 3.3 β 4263.790 β 426.38 β 6 days, 23:28:00 β 33 0 26 55.9 β
+βββββββββββββ΄ββββββββββ΄βββββββββββββββ΄ββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββββββββ
+ EXIT REASON STATS
+βββββββββββββββ³ββββββββ³βββββββββββββββ³ββββββββββββββββββ³βββββββββββββββ³βββββββββββββββββββ³βββββββββββββββββββββββββ
+β Exit Reason β Exits β Avg Profit % β Tot Profit USDT β Tot Profit % β Avg Duration β Win Draw Loss Win% β
+β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
+β B30 β 33 β 8.0 β 6194.610 β 619.46 β 11 days, 5:36:00 β 33 0 0 100 β
+β sma60 β 26 β -2.67 β -1930.820 β -193.08 β 1 day, 13:51:00 β 0 0 26 0 β
+β TOTAL β 59 β 3.3 β 4263.790 β 426.38 β 6 days, 23:28:00 β 33 0 26 55.9 β
+βββββββββββββββ΄ββββββββ΄βββββββββββββββ΄ββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββββββββ
+ MIXED TAG STATS
+βββββββββββββ³ββββββββββββββ³βββββββββ³βββββββββββββββ³ββββββββββββββββββ³βββββββββββββββ³βββββββββββββββββββ³βββββββββββββββββββββββββ
+β Enter Tag β Exit Reason β Trades β Avg Profit % β Tot Profit USDT β Tot Profit % β Avg Duration β Win Draw Loss Win% β
+β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
+β bull β B30 β 33 β 8.0 β 6194.610 β 619.46 β 11 days, 5:36:00 β 33 0 0 100 β
+β bull β sma60 β 26 β -2.67 β -1930.820 β -193.08 β 1 day, 13:51:00 β 0 0 26 0 β
+β TOTAL β β 59 β 3.3 β 4263.790 β 426.38 β 6 days, 23:28:00 β 33 0 26 55.9 β
+βββββββββββββ΄ββββββββββββββ΄βββββββββ΄βββββββββββββββ΄ββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββββββββ
+ MONTH BREAKDOWN
+ββββββββββββββ³βββββββββ³ββββββββββββββββββ³ββββββββββββββββ³βββββββββββββββββββββββββ
+β Month β Trades β Tot Profit USDT β Profit Factor β Win Draw Loss Win% β
+β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
+β 28/02/2023 β 3 β 372.897 β 0.0 β 3 0 0 100 β
+β 31/03/2023 β 3 β -29.085 β 0.79 β 1 0 2 33.3 β
+β 30/04/2023 β 3 β 11.898 β 1.4 β 2 0 1 66.7 β
+β 31/05/2023 β 2 β -79.919 β 0.0 β 0 0 2 0 β
+β 30/06/2023 β 0 β 0 β 0.0 β 0 0 0 0 β
+β 31/07/2023 β 2 β 109.847 β 3.35 β 1 0 1 50.0 β
+β 31/08/2023 β 0 β 0 β 0.0 β 0 0 0 0 β
+β 30/09/2023 β 1 β -29.039 β 0.0 β 0 0 1 0 β
+β 31/10/2023 β 2 β 70.87 β 0.0 β 2 0 0 100 β
+β 30/11/2023 β 0 β 0 β 0.0 β 0 0 0 0 β
+β 31/12/2023 β 0 β 0 β 0.0 β 0 0 0 0 β
+β 31/01/2024 β 2 β 697.801 β 0.0 β 2 0 0 100 β
+β 29/02/2024 β 0 β 0 β 0.0 β 0 0 0 0 β
+β 31/03/2024 β 2 β 1080.605 β 0.0 β 2 0 0 100 β
+β 30/04/2024 β 4 β -314.088 β 0.0 β 0 0 4 0 β
+β 31/05/2024 β 4 β -182.279 β 0.09 β 1 0 3 25.0 β
+β 30/06/2024 β 1 β -67.429 β 0.0 β 0 0 1 0 β
+β 31/07/2024 β 3 β 111.09 β 2.87 β 2 0 1 66.7 β
+β 31/08/2024 β 1 β -62.063 β 0.0 β 0 0 1 0 β
+β 30/09/2024 β 3 β -88.603 β 0.28 β 1 0 2 33.3 β
+β 31/10/2024 β 2 β 263.26 β 0.0 β 2 0 0 100 β
+β 30/11/2024 β 0 β 0 β 0.0 β 0 0 0 0 β
+β 31/12/2024 β 2 β 830.987 β 6.74 β 1 0 1 50.0 β
+β 31/01/2025 β 5 β 81.667 β 1.44 β 3 0 2 60.0 β
+β 28/02/2025 β 0 β 0 β 0.0 β 0 0 0 0 β
+β 31/03/2025 β 0 β 0 β 0.0 β 0 0 0 0 β
+β 30/04/2025 β 0 β 0 β 0.0 β 0 0 0 0 β
+β 31/05/2025 β 0 β 0 β 0.0 β 0 0 0 0 β
+β 30/06/2025 β 3 β 939.688 β 0.0 β 3 0 0 100 β
+β 31/07/2025 β 3 β 138.029 β 1.57 β 1 0 2 33.3 β
+β 31/08/2025 β 2 β 119.103 β 0.0 β 2 0 0 100 β
+β 30/09/2025 β 5 β -30.436 β 0.85 β 3 0 2 60.0 β
+β 31/10/2025 β 1 β 318.991 β 0.0 β 1 0 0 100 β
+ββββββββββββββ΄βββββββββ΄ββββββββββββββββββ΄ββββββββββββββββ΄βββββββββββββββββββββββββ
+ SUMMARY METRICS
+βββββββββββββββββββββββββββββββββ³βββββββββββββββββββββββββββββββββββ
+β Metric β Value β
+β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
+β Backtesting from β 2023-01-01 00:00:00 β
+β Backtesting to β 2025-10-11 00:00:00 β
+β Trading Mode β Spot β
+β Max open trades β 1 β
+β β β
+β Total/Daily Avg Trades β 59 / 0.06 β
+β Starting balance β 1000 USDT β
+β Final balance β 5263.79 USDT β
+β Absolute profit β 4263.79 USDT β
+β Total profit % β 426.38% β
+β CAGR % β 81.82% β
+β Sortino β 2.82 β
+β Sharpe β 0.35 β
+β Calmar β 42.68 β
+β SQN β 2.37 β
+β Profit factor β 3.21 β
+β Expectancy (Ratio) β 72.27 (0.97) β
+β Avg. daily profit β 4.205 USDT β
+β Avg. stake amount β 2946.519 USDT β
+β Total trade volume β 352657.589 USDT β
+β β β
+β Best Pair β BTC/USDT 426.38% β
+β Worst Pair β BTC/USDT 426.38% β
+β Best trade β BTC/USDT 46.39% β
+β Worst trade β BTC/USDT -5.76% β
+β Best day β 975.709 USDT β
+β Worst day β -144.722 USDT β
+β Days win/draw/lose β 32 / 914 / 26 β
+β Min/Max/Avg. Duration Winners β 1d 09:00 / 87d 12:00 / 11d 05:36 β
+β Min/Max/Avg. Duration Losers β 0d 02:00 / 5d 05:00 / 1d 13:51 β
+β Max Consecutive Wins / Loss β 6 / 6 β
+β Rejected Entry signals β 0 β
+β Entry/Exit Timeouts β 0 / 0 β
+β β β
+β Min balance β 1260.898 USDT β
+β Max balance β 5263.79 USDT β
+β Max % of account underwater β 18.82% β
+β Absolute drawdown β 603.373 USDT (18.82%) β
+β Drawdown duration β 186 days 10:00:00 β
+β Profit at drawdown start β 2205.874 USDT β
+β Profit at drawdown end β 1602.501 USDT β
+β Drawdown start β 2024-03-27 16:00:00 β
+β Drawdown end β 2024-09-30 02:00:00 β
+β Market change β 580.68% β
+βββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ
+
+Backtested 2023-01-01 00:00:00 -> 2025-10-11 00:00:00 | Max open trades : 1
+ STRATEGY SUMMARY
+ββββββββββββ³βββββββββ³βββββββββββββββ³ββββββββββββββββββ³βββββββββββββββ³βββββββββββββββββββ³ββββββββββββββββββββββββ³βββββββββββββββββββββββ
+β Strategy β Trades β Avg Profit % β Tot Profit USDT β Tot Profit % β Avg Duration β Win Draw Loss Win% β Drawdown β
+β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
+β Empty β 59 β 3.30 β 4263.790 β 426.38 β 6 days, 23:28:00 β 33 0 26 β 603.373 USDT 18.82% β
+β β β β β β β 55.9 β β
+ββββββββββββ΄βββββββββ΄βββββββββββββββ΄ββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββ΄βββββββββββββββββββββββ