Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
m5l14i11 committed Nov 22, 2024
1 parent 61db427 commit 31ed386
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/models/entity/ohlcv.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ def from_dict(cls, data: Dict) -> "OHLCV":

return cls.from_list([data[key] for key in ohlcv_keys])

@property
def price_movement(self) -> float:
return self.close - self.open

@property
def type(self) -> CandleType:
if self.price_movement > 0:
Expand Down

0 comments on commit 31ed386

Please sign in to comment.