Commit Graph

1751 Commits (296863348df159bf689ec39e47599dbe006cb72f)

Author SHA1 Message Date
Tyler Goodlet 873d531521 Vastly simplify order mode line management
- generate lines from staged `Order` msgs
- apply level update callback to each order that dynamically
  updates the order size from the allocator calcs
- pass order msg instances to the ems client for submission
- update order size on line moves
- add `Order` msg and `Symbol` refs to each dialog
2021-09-06 09:28:10 -04:00
Tyler Goodlet ccad7cfc2a Allocate order size using lots digits calc 2021-09-06 09:28:10 -04:00
Tyler Goodlet 69a1f5e8a8 Add line copy func, drop old markers cruft 2021-09-06 09:28:10 -04:00
Tyler Goodlet 68e23fc567 Simplify line editor to track lines instead of create them 2021-09-06 09:28:10 -04:00
Tyler Goodlet 97ebd03508 Avoid position resets on label paint 2021-09-06 09:28:10 -04:00
Tyler Goodlet c1379001e5 Expect `Order` msg instance to ems client `.send()` 2021-09-06 09:28:10 -04:00
Tyler Goodlet 374967dc6f Support temp `Symbol` and non-copied model refs on `Order` msg 2021-09-06 09:28:10 -04:00
Tyler Goodlet 92d6b19777 Rejig order line creation / config
In an effort to simplify line creation and management from an order
mode here's a slew of changes:
- use our new ``LevelMarker`` for order lines and fully drop usage
 of the original marker implementation stuff from `pg.InfiniteLine`
- add a left side label which shows the instrument's "units" value
  - the most fundamental unit for the "size" of the order
- allow passing in an optional `marker_size: str` so that `action: str`
  doesn't necessarily have to be passed (eg. when copying from an
  existing line)
- change a couple of internal line config options to be public attrs
  which can now be configured dynamically in real-time (since they're
  all `bool` anyway):
  * `hl_on_hover` -> `highlight_on_hover`
  * `_always_show_labels` -> `always_show_labels`
- `LevelLine.set_level()` now only sets the position if it was **not**
  called from the position changed signal (which would be redundant)
2021-09-06 09:28:10 -04:00
Tyler Goodlet c37ce664f5 Uggh, don't override click handler on view; pg has it's own mouse events.. 2021-09-06 09:28:10 -04:00
Tyler Goodlet f2376f90ad Support "next to be focussed" args to async form handlers 2021-09-06 09:28:10 -04:00
Tyler Goodlet ac35e26d9a Make completer view click handler async 2021-09-06 09:28:10 -04:00
Tyler Goodlet 4f4f9f66b4 Move view mode mouse click into async handler 2021-09-06 09:28:10 -04:00
Tyler Goodlet 5ce6dcf3cb Properly capture graphics scene mouse events 2021-09-06 09:28:10 -04:00
Tyler Goodlet 3ddd4bc2c2 Add a private level change cb, fix marker hidingn 2021-09-06 09:28:10 -04:00
Tyler Goodlet 7fc7f72643 Add mouse event and signal proxying support 2021-09-06 09:28:10 -04:00
Tyler Goodlet cebfe9dca3 Split up form creation and input handling, require a `.model` 2021-09-06 09:28:10 -04:00
Tyler Goodlet 1d7300577e Drop godwidget ref to `FieldsForm` 2021-09-06 09:28:10 -04:00
Tyler Goodlet 7295ceb51a Pass labels to form builder, toy with broadcast consumer task 2021-09-06 09:28:10 -04:00
Tyler Goodlet a40205728f Position tracker is passed at init 2021-09-06 09:28:10 -04:00
Tyler Goodlet 4ddfea654b Lol, initial size calcs on order line update 2021-09-06 09:28:10 -04:00
Tyler Goodlet 5528e80c22 Basic allocator state updates from pp sidepane 2021-09-06 09:28:10 -04:00
Tyler Goodlet ce7eb75ada Validate allocator assignments with pydantic 2021-09-06 09:28:10 -04:00
Tyler Goodlet a7920689b6 Add reference gist for Qt guest mode stuff 2021-09-06 09:28:10 -04:00
Tyler Goodlet a3d1a71017 Unpack keyboard events into an explicit msg model 2021-09-06 09:28:10 -04:00
Tyler Goodlet b302707bf3 Order mode docs/comments updates 2021-09-06 09:28:10 -04:00
Tyler Goodlet c982634839 Add draft `pydantic`-`QWidget` ORM system
Move all the ``pydantic`` finagling to an `_orm.py` and
just keep an `Allocator` as the backing model for our pp controls
in the position module. This all needs to be tied together in some sane
with with facility for multiple symbols/streams per chart for when we
get to charting-trading aggregate feeds.
2021-09-06 09:28:10 -04:00
Tyler Goodlet 2d1deb7ab7 Drop uneeded `typing` types for py3.9+ 2021-09-06 09:28:10 -04:00
Tyler Goodlet b79b9c8c41 "last" and "current" are better names 2021-09-06 09:28:10 -04:00
Tyler Goodlet deedcb2c4a Flip to view mode on field exit key combos 2021-09-06 09:28:10 -04:00
Tyler Goodlet 5f7c9a16fb Make god widget focus to chart / "view mode" 2021-09-06 09:28:10 -04:00
Tyler Goodlet 70a283e336 Call god what it is 2021-09-06 09:28:10 -04:00
Tyler Goodlet d1f9273418 Use lightest default for pp line 2021-09-06 09:28:10 -04:00
Tyler Goodlet 8eaf2a1afe Allocate minority to OHLC chart since 2 fsps by default is likely 2021-09-06 09:28:10 -04:00
Tyler Goodlet 75f50f4b7e "bracket"-ify fills bar + labels and try to evenly space the pane sections 2021-09-06 09:28:10 -04:00
Tyler Goodlet 1fc9047746 Drop old pp config widget inserts; use new pane layout func 2021-09-06 09:28:10 -04:00
Tyler Goodlet 3e237124ec Break health bar and pane layout into separate routines 2021-09-06 09:28:10 -04:00
Tyler Goodlet b0ab240f9e Match search bar margins to pp pane 2021-09-06 09:28:10 -04:00
Tyler Goodlet 41b79d0f9a Fix pp pane to show on symbol switches 2021-09-06 09:28:10 -04:00
Tyler Goodlet e005c8b345 Use `QFormLayout` instead of rolling our own; add pp and feed status sections 2021-09-06 09:28:10 -04:00
Tyler Goodlet 318f3b45c5 Just always use a lambda ; it's innocuous 2021-09-06 09:28:10 -04:00
Tyler Goodlet b6c68e381d Move status back to gunmetal 2021-09-06 09:28:10 -04:00
Tyler Goodlet 0ffbb15bc7 Add a "health bar" factor B) 2021-09-06 09:28:10 -04:00
Tyler Goodlet 63138ccbf4 WIP add a lambda-QFrame to get per chart sidpanes for each linkedsplits row 2021-09-06 09:28:10 -04:00
Tyler Goodlet 825680b8c6 Support (sub)plot names separate from data array keys 2021-09-06 09:28:10 -04:00
Tyler Goodlet 65158b8c64 Add position status (health) bar math for sizing and styling 2021-09-06 09:28:10 -04:00
Tyler Goodlet 3eabe93d54 Always hide contents labels at startup 2021-09-06 09:28:10 -04:00
Tyler Goodlet 21d1e17c6a Better search label styling 2021-09-06 09:28:10 -04:00
Tyler Goodlet 30ac32da55 Add ctrl-p as "pane toggle" 2021-09-06 09:28:10 -04:00
Tyler Goodlet 0ce356f5d9 Make field form a vertical layout, add formatted style sheets 2021-09-06 09:28:10 -04:00
Tyler Goodlet 1ae39c963a Allocate pp config form alongside god widget as a side-pane 2021-09-06 09:28:10 -04:00