Compare commits

..

1 Commits

Author SHA1 Message Date
Nelson Torres dc2e41e550 Add Plot
Here is the `plot_graph()` that is in char of the bars, scatter and vertical line plot items.

Also all the necessary code  for the graph to be shown.
2025-02-04 17:52:52 -03:00
1 changed files with 4 additions and 4 deletions

View File

@ -141,10 +141,10 @@ async def max_pain_daemon(
vertical_line = InfiniteLine(
pos=max_pain,
angle=90,
pen=pg.mkPen(color='yellow', width=2, style=QtCore.Qt.PenStyle.DotLine),
pen=pg.mkPen(color='yellow', width=1, style=QtCore.Qt.PenStyle.DotLine),
label=f'Max pain: {max_pain:,.0f}',
labelOpts={
'position': 0.8,
'position': 0.85,
'color': 'yellow',
'movable': True
}
@ -216,8 +216,8 @@ async def max_pain_daemon(
print('-----------------------------------------------')
print(f'timestamp: {datetime.fromtimestamp(max_pain['timestamp'])}')
print(f'expiry_date: {max_pain['expiry_date']}')
print(f'max_pain: {max_pain['max_pain']}')
print(f'total intrinsic value: {max_pain['total_intrinsic_value']}')
print(f'max_pain: {max_pain['max_pain']:,.0f}')
print(f'total intrinsic value: {max_pain['total_intrinsic_value']:,.0f}')
print('-----------------------------------------------')
# Process GUI events to keep the window responsive