-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ordermode pps #205
Ordermode pps #205
Conversation
99a9500
to
bae23a6
Compare
9bf40fe
to
e4d02f8
Compare
@@ -1295,10 +1297,14 @@ def pack_position(pos: Position) -> dict[str, Any]: | |||
else: | |||
symbol = con.symbol | |||
|
|||
symkey = '.'.join([ | |||
symbol.lower(), | |||
(con.primaryExchange or con.exchange).lower(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a bug where on pp loading from the broker, a sub-string of the actual intended instrument symbol would match showing a pp indicator for the wrong chart. explicitly truncating and appending the exchange solves this.
|
||
else: | ||
await stream.send({sym: quote}) | ||
with trio.move_on_after(0.2) as cs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is effectively a backpressure detector and should basically never get entered unless there's an issue on the consumer side (which hopefully all these are resolved now).
Not sure if we should put this onto master though with the .breakpoint()
but I haven't seen it happen yet in practice.
|
||
class LinkedSplits(QtWidgets.QWidget): | ||
class ChartnPane(QFrame): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Composite to make the order pane stuff work alongside the linked split charts.
Acts as a fix for lodpi and better sizing logic for the pp status bar. Drop all the redundant passing of the form to its child layouts during instantiating (since they're all added as layouts to the tree). Comment out the feed status label for now since it's not hooked up to the backend and we'll get it going in a new PR. Down the road we probably want to do all the pp pane component-widget sizing *after* the `pyqtgraph` chart is up; it's going to take some reworking of the charting api tho.
We weren't updating the LHS size labels on creation and we now use the lot size digits to do so. Change `PositionTracker.update()` to `.update_from_pp_msg()`.
01184db
to
3713831
Compare
30d0317
to
21019e6
Compare
21019e6
to
202b857
Compare
Follow up issue list inspired or drafted in this patch set:
|
Working draft of highly game-like position and order tracking for order mode.
Target feature list:
paperboi
engine is loaded with it's feeds; we need a fix for this.positions.toml
? Probably want to coordinate with Phil MacKraken #214.