Compare commits
1 Commits
54e5f4bb4e
...
833a4f1d1c
Author | SHA1 | Date |
---|---|---|
|
833a4f1d1c |
|
@ -12,7 +12,8 @@ from piker.brokers.deribit.api import (
|
||||||
)
|
)
|
||||||
import sys
|
import sys
|
||||||
import pyqtgraph as pg
|
import pyqtgraph as pg
|
||||||
from pyqtgraph import ScatterPlotItem
|
from PyQt6 import QtCore
|
||||||
|
from pyqtgraph import ScatterPlotItem, InfiniteLine
|
||||||
from PyQt6.QtWidgets import QApplication
|
from PyQt6.QtWidgets import QApplication
|
||||||
|
|
||||||
def check_if_complete(
|
def check_if_complete(
|
||||||
|
@ -135,6 +136,21 @@ async def max_pain_daemon(
|
||||||
)
|
)
|
||||||
plot.addItem(scatter_iv)
|
plot.addItem(scatter_iv)
|
||||||
|
|
||||||
|
total_intrinsic_value, max_pain = get_intrinsic_value_and_max_pain(intrinsic_values)
|
||||||
|
|
||||||
|
vertical_line = InfiniteLine(
|
||||||
|
pos=max_pain,
|
||||||
|
angle=90,
|
||||||
|
pen=pg.mkPen(color='yellow', width=2, style=QtCore.Qt.PenStyle.DotLine),
|
||||||
|
label=f'Max pain: {max_pain:,.0f}',
|
||||||
|
labelOpts={
|
||||||
|
'position': 0.8,
|
||||||
|
'color': 'yellow',
|
||||||
|
'movable': True
|
||||||
|
}
|
||||||
|
)
|
||||||
|
plot.addItem(vertical_line)
|
||||||
|
|
||||||
def update_oi_by_strikes(msg: tuple):
|
def update_oi_by_strikes(msg: tuple):
|
||||||
nonlocal oi_by_strikes
|
nonlocal oi_by_strikes
|
||||||
if 'oi' == msg[0]:
|
if 'oi' == msg[0]:
|
||||||
|
|
Loading…
Reference in New Issue