Frictrade LGBMRegressor
This commit is contained in:
29
Frictrade.py
29
Frictrade.py
@@ -511,15 +511,14 @@ class Frictrade(IStrategy):
|
||||
dataframe.loc[
|
||||
(
|
||||
# (dataframe['sma5_inv'] == 1)
|
||||
(
|
||||
(dataframe['pct180'] < 0.5) |
|
||||
(
|
||||
(dataframe['close'] < dataframe['sma60'] )
|
||||
& (dataframe['sma24_deriv1'] > 0)
|
||||
)
|
||||
)
|
||||
& (dataframe['hapercent'] > 0)
|
||||
& (dataframe['sma24_deriv1'] > - 0.03)
|
||||
# (
|
||||
# ((dataframe['pct180'] < 0.5) | (dataframe['sma24_deriv1'] > 0))
|
||||
# |((dataframe['close'] < dataframe['sma24'] ) & (dataframe['sma24_deriv1'] > 0))
|
||||
#
|
||||
# )
|
||||
(dataframe['hapercent'] > 0)
|
||||
& (dataframe['rsi'] < 85)
|
||||
& (dataframe['sma24'] > dataframe['sma60'])
|
||||
# & (
|
||||
# (dataframe['percent3'] <= -0.003)
|
||||
# | (dataframe['percent12'] <= -0.003)
|
||||
@@ -578,7 +577,7 @@ class Frictrade(IStrategy):
|
||||
# base_size = montant de base que tu veux utiliser (ex: stake_amount ou autre)
|
||||
base_size = base_stake # exemple fraction du portefeuille; adapte selon ton code
|
||||
# new stake proportionnel à mult
|
||||
new_stake = base_size * mult
|
||||
new_stake = base_size #* mult
|
||||
return new_stake
|
||||
|
||||
def adjust_trade_position(self, trade: Trade, current_time: datetime,
|
||||
@@ -817,11 +816,11 @@ 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 (minutes < 180):
|
||||
return None
|
||||
if (minutes > 1440 and last_candle['sma60_deriv1'] > 0) :
|
||||
return None
|
||||
# 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 ? -----
|
||||
|
||||
2051
FrictradeLearning.py
Normal file
2051
FrictradeLearning.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user