Skip to content

Commit

Permalink
- fix str on datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
wahyubiman committed Jul 2, 2022
1 parent 2ada439 commit 77a8269
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/strategy/indicator_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ async def _signal(self, ohlcvs):
# check LONG or SHORT signal
if (last.break_h.values[0] == 1) & (last.ema_fast.values[0] < last.close.values[0]):
result_up.append(
f'{ohlcv.name} - ${last.close.values[0]} on {last.timestamp[-1:].dt.strftime("%d/%m/%Y %H:%M:%S").astype(str)}')
f'{ohlcv.name} - ${last.close.values[0]} on {last.timestamp[-1:].dt.strftime("%d/%m/%Y %H:%M:%S").astype(str).values[0]}')
elif (last.break_l.values[0] == 1) & (last.ema_fast.values[0] > last.close.values[0]):
result_down.append(
f'{ohlcv.name} - ${last.close.values[0]} on {last.timestamp[-1:].dt.strftime("%d/%m/%Y %H:%M:%S").astype(str)}')
f'{ohlcv.name} - ${last.close.values[0]} on {last.timestamp[-1:].dt.strftime("%d/%m/%Y %H:%M:%S").astype(str).values[0]}')
return [result_up, result_down]
except Exception as e:
LOG.exception(e)
Expand Down

0 comments on commit 77a8269

Please sign in to comment.