Frictrade

This commit is contained in:
Jérôme Delacotte
2025-11-29 12:48:24 +01:00
parent 0e787f54e6
commit 89abd0b4da

View File

@@ -511,8 +511,15 @@ class Frictrade(IStrategy):
dataframe.loc[
(
# (dataframe['sma5_inv'] == 1)
((dataframe['pct180'] < 0.5) | (dataframe['close'] < dataframe['sma60']))
(
(dataframe['pct180'] < 0.5) |
(
(dataframe['close'] < dataframe['sma60'] )
& (dataframe['sma24_deriv1'] > 0)
)
)
& (dataframe['hapercent'] > 0)
& (dataframe['sma24_deriv1'] > - 0.03)
# & (
# (dataframe['percent3'] <= -0.003)
# | (dataframe['percent12'] <= -0.003)
@@ -636,7 +643,8 @@ class Frictrade(IStrategy):
condition = last_candle['hapercent'] > 0 and last_candle['sma24_deriv1'] > 0
limit_buy = 40
if decline >= dca_threshold and condition:
# or (last_candle['close'] <= last_candle['min180'] and hours > 3)
if (decline >= dca_threshold) and condition:
try:
if self.pairs[pair]['has_gain'] and profit > 0:
self.pairs[pair]['force_sell'] = True
@@ -809,8 +817,12 @@ class Frictrade(IStrategy):
stake=0
)
if last_candle['sma24_deriv1'] > 0 and minutes < 180 and baisse < 30: # and last_candle['sma5_deriv1'] > -0.15:
if last_candle['sma24_deriv1'] > 0 : #and minutes < 180 and baisse < 30: # and last_candle['sma5_deriv1'] > -0.15:
if (minutes < 180):
return None
if (minutes > 1440 and last_candle['sma60_deriv1'] > 0) :
return None
# ----- 4) OFFSET : faut-il attendre de dépasser trailing_stop_positive_offset ? -----
if current_trailing_only_offset_is_reached: