correction expectedProfit
This commit is contained in:
@@ -1073,7 +1073,9 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
def expectedProfit(self, pair: str, last_candle: DataFrame):
|
||||
|
||||
first_price = last_candle['first_price']
|
||||
first_max = (last_candle['max200'] - first_price) / first_price
|
||||
first_max = 0.01
|
||||
if first_price < last_candle['max200']:
|
||||
first_max = (last_candle['max200'] - first_price) / first_price
|
||||
|
||||
expected_profit = min(0.01, first_max)
|
||||
|
||||
@@ -1612,8 +1614,9 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
if len(future_idx) < window_size:
|
||||
continue
|
||||
|
||||
future_highs = df.loc[future_idx, 'high']
|
||||
future_highs = df.loc[future_idx, 'close']
|
||||
if (future_highs >= price_now * (1 + percent)).any():
|
||||
print(df.loc[future_idx])
|
||||
hits += 1
|
||||
total += 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user