bring back market side setting in get_state_info

This commit is contained in:
robcaulk 2022-11-30 12:36:26 +01:00
parent 915524a161
commit e7f72d52b8

View File

@ -193,6 +193,10 @@ class BaseReinforcementLearningModel(IFreqaiModel):
now = datetime.now(timezone.utc).timestamp()
trade_duration = int((now - trade.open_date_utc.timestamp()) / self.base_tf_seconds)
current_profit = trade.calc_profit_ratio(current_rate)
if trade.is_short:
market_side = 0
else:
market_side = 1
return market_side, current_profit, int(trade_duration)