MCPcopy
hub / github.com/tradytics/surpriver / parse_large_values

Method parse_large_values

detection_engine.py:134–144  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

132 return new / old
133
134 def parse_large_values(self, value):
135 if value < 1000:
136 value = str(value)
137 elif value >= 1000 and value < 1000000:
138 value = round(value / 1000, 2)
139 value = str(value) + "K"
140 else:
141 value = round(value / 1000000, 1)
142 value = str(value) + "M"
143
144 return value
145
146 def calculate_volume_changes(self, historical_price):
147 volume = list(historical_price["Volume"])

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected