Frictrade

This commit is contained in:
Jérôme Delacotte
2025-12-05 23:27:40 +01:00
parent 3efc95e415
commit ae98d11559
26 changed files with 15887 additions and 38 deletions

View File

@@ -668,8 +668,7 @@ class GodStraJD3_4(IStrategy):
# # Use default stake amount.
# return proposed_stake
def custom_sell(self, pair: str, trade: 'Trade', current_time: 'datetime', current_rate: float,
current_profit: float, **kwargs):
def custom_exit(self, pair, trade, current_time, current_rate, current_profit, **kwargs):
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
last_candle = dataframe.iloc[-1].squeeze()
previous_last_candle = dataframe.iloc[-2].squeeze()
@@ -971,8 +970,6 @@ class GodStraJD3_4(IStrategy):
if conditions:
dataframe.loc[
(reduce(lambda x, y: x & y, conditions)
# & (dataframe['percent_4h'] > 0)
& (dataframe['percent3_4h'] <= 0)
),
'buy']=1
# print(len(dataframe.keys()))