TEST calculateMarketState
This commit is contained in:
@@ -1267,7 +1267,7 @@ class FrictradeLearning(IStrategy):
|
||||
# hours_since_first_price = (current_time - trade.open_date_utc).seconds / 3600.0
|
||||
# days_since_first_price = (current_time - trade.open_date_utc).days
|
||||
hours = (current_time - trade.date_last_filled_utc).total_seconds() / 3600.0
|
||||
# minutes = (current_time - trade.date_last_filled_utc).total_seconds() / 60.0
|
||||
minutes = (current_time - trade.date_last_filled_utc).total_seconds() / 60.0
|
||||
|
||||
count_of_buys = trade.nr_of_successful_entries
|
||||
# current_time_utc = current_time.astimezone(timezone.utc)
|
||||
@@ -1331,8 +1331,8 @@ class FrictradeLearning(IStrategy):
|
||||
increase = - decline
|
||||
|
||||
# FIN ########################## ALGO ATH
|
||||
force = hours > 12 #self.hours_force.value and last_candle[self.indic_1h_force_buy.value] > 0
|
||||
condition = last_candle['percent'] > 0 \
|
||||
force = False #self.hours_force.value and last_candle[self.indic_1h_force_buy.value] > 0
|
||||
condition = minutes > 5 and last_candle['percent'] > 0 \
|
||||
and ((count_of_buys <= 4 and last_candle['sma24_deriv1'] > 0) or (count_of_buys > 4 and last_candle['sma60_deriv1'] > 0))\
|
||||
and last_candle['close'] < self.pairs[pair]['first_price']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user