Tyler Goodlet
dfb9c55944
Compute symbol digits at creation time
...
Add a new factory func `mk_symbol()` to create the initial
instance at feed creation time.
2021-09-06 09:28:10 -04:00
Tyler Goodlet
6744f59c58
Add numberline hotkeys for slots config
2021-09-06 09:28:10 -04:00
Tyler Goodlet
07b20a5e68
Fill out allocator calcs for $size and #units, draft pp ui tracking
2021-09-06 09:28:10 -04:00
Tyler Goodlet
17fbe6a6ab
Start drafting out alloctor settings per asset type
2021-09-06 09:28:10 -04:00
Tyler Goodlet
be956c4031
Move fill status bar to module level, draft out order pane composite
2021-09-06 09:28:10 -04:00
Tyler Goodlet
7192264818
Position pane UI improvements
...
- pass label text and field widget key separately
- fix fill status bar slot sizing logic (once and for all) and
create a new type that allows generating / resizing the bar's
size / values with a `.set_slots()` method
- pull account names from allocator attr
- set `.fill_bar` as the fill status bar on the form for now
2021-09-06 09:28:10 -04:00
Tyler Goodlet
a1d4e61fc2
Port chart code to new subsys apis
...
- make `GodWidget.load_symbol()` async
- track loaded feeds with a private `._feeds` dict
- add methods to pause/resume all feeds when chart is (un)focussed
- add some commented test code for 2nd feed consumer task and rsi2 fsp
- load async signal handler for view clicking
2021-09-06 09:28:10 -04:00
Tyler Goodlet
1cb311602c
Revert commenting bounding rect fix..
2021-09-06 09:28:10 -04:00
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
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
Tyler Goodlet
d022a105bb
Start using a small schema for generating forms
2021-09-06 09:28:10 -04:00
Tyler Goodlet
011f36fc3c
WIP add input handler for each widget in the form
2021-09-06 09:28:10 -04:00
Tyler Goodlet
43b769a136
Support opening a handler on a collection of widgets
2021-09-06 09:28:10 -04:00
Tyler Goodlet
d1244608bd
Use font scaled delegate from forms module
2021-09-06 09:28:10 -04:00
Tyler Goodlet
5ec00ee762
Size view delegate from monkey patched parent
2021-09-06 09:28:10 -04:00
Tyler Goodlet
940aafe1be
OMG Qt view item sizing is sooo dumb..
2021-09-06 09:28:10 -04:00
Tyler Goodlet
29ea91553d
Use "slots" as name for "number of entries"
2021-09-06 09:28:10 -04:00
Tyler Goodlet
c18cf4f0bf
Mock up initial selection field and progress bar
2021-09-06 09:28:10 -04:00
Tyler Goodlet
7e2e316cbf
"Forms" is a better module name
2021-09-06 09:28:10 -04:00
Tyler Goodlet
a2b61a67b5
Allocate pp config with new actory, drop old line update method
2021-09-06 09:28:10 -04:00
Tyler Goodlet
e8e9e20124
Use mode name setter throughout
2021-09-06 09:28:10 -04:00
Tyler Goodlet
00ff0e96cd
Add mode name setter
2021-09-06 09:28:10 -04:00
Tyler Goodlet
97f4d9bc2d
Drop stale anchors
2021-09-06 09:28:10 -04:00
Tyler Goodlet
1ed7be7c00
Move font-aware line edit to "text entry" mod
2021-09-06 09:28:10 -04:00
Tyler Goodlet
8d65a55f9e
Toggle pp config widget on order mode active
2021-09-06 09:28:10 -04:00
Tyler Goodlet
64ccc79a33
Change order label format to color:count
2021-09-06 09:28:10 -04:00
Tyler Goodlet
0f176425b1
First WIP of pp config entry widget on status bar
2021-09-06 09:28:10 -04:00
Tyler Goodlet
c4a9d53306
Use one marker, drop old anchors, add graphics update on marker paint
2021-09-06 09:28:10 -04:00
Tyler Goodlet
4d5afc2e25
Add dpi font scale getter
2021-09-06 09:28:10 -04:00
Tyler Goodlet
4ce6edae70
Skip line stage when chart not yet initialized
2021-09-06 09:28:10 -04:00
Tyler Goodlet
da3f149646
Add a tight pp anchor
2021-09-06 09:28:10 -04:00
Tyler Goodlet
5473c9848d
Start a "text entry widgets" module
2021-09-06 09:28:10 -04:00
Tyler Goodlet
3fb0e02788
Factor font-size-based labeled-line edit into generics widget
2021-09-06 09:28:10 -04:00
Tyler Goodlet
5fb00f726e
Add support for a marker "on paint" callback
2021-09-06 09:28:10 -04:00
Tyler Goodlet
d283872eb6
Add a scene bounding rect getter to our label
2021-09-06 09:28:10 -04:00
Tyler Goodlet
5144492534
Just warn for now on unknown dialogs
2021-09-06 09:28:10 -04:00
Tyler Goodlet
568dd488b5
Move level marker to annotate module
2021-09-06 09:28:10 -04:00
Tyler Goodlet
dc279a48c2
Move DPI / screen get logging to debug; reduce cli noise
2021-09-06 09:28:10 -04:00
Tyler Goodlet
7367ed5464
Drop all `ChartPlotWidget._lc` remap to `.linked
2021-09-06 09:28:10 -04:00
Tyler Goodlet
c8b14e9445
Pass position msg to tracker, append fill msgs
2021-09-06 09:28:10 -04:00
Tyler Goodlet
3b0b7475c8
Fixup commented view locate call
2021-09-06 09:28:10 -04:00
Tyler Goodlet
1a5770c127
Only hide position (extra) info on order mode exit
2021-09-06 09:28:10 -04:00
Tyler Goodlet
1abbd095ec
Fix oustanding label bugs, make `.update()` accept a position msg
2021-09-06 09:28:10 -04:00
Tyler Goodlet
826c4408ea
Stop pulling lot size precision from symbol for now in the UI
2021-09-06 09:28:10 -04:00
Tyler Goodlet
d3457cd423
Drop position-line factory from lines module, add endpoint getter
2021-09-06 09:28:10 -04:00
Tyler Goodlet
444421bddf
Make our default label opaque (since it's normally just text)
2021-09-06 09:28:10 -04:00
Tyler Goodlet
565380368a
Increase cursor debounce delay slightly?
2021-09-06 09:28:10 -04:00
Tyler Goodlet
f06e05c9cb
Switch mode to touch `.pp`
2021-09-06 09:28:10 -04:00
Tyler Goodlet
71eef1b7fd
Add `.view` property, throttle to 50Hz by default
2021-09-06 09:28:10 -04:00
Tyler Goodlet
20a8045127
Add a left-side-of-marker orientation
2021-09-06 09:28:10 -04:00
Tyler Goodlet
74d6dd5957
Move position tracking to new module
...
It was becoming too much with all the labels and markers and lines..
Might as well package it all together instead of cramming it in the
order mode loop, chief.
The techincal summary,
- move `_lines.position_line()` -> `PositionInfo.position_line()`.
- slap a `.pp` on the order mode instance which *is* a `PositionInfo`
- drop the position info info label for now (let's see what users want
eventually but for now let's keep it super minimal).
- add a `LevelMarker` type to replace the old `LevelLine` internal
marker system (includes ability to change the style and level on the
fly).
- change `_annotate.mk_marker()` -> `mk_maker_path()` and expect caller
to wrap in a `QGraphicsPathItem` if needed.
2021-09-06 09:28:10 -04:00
Tyler Goodlet
afcb323c49
Use `QGraphicsPathItem` for marker, add line hide method
2021-09-06 09:28:10 -04:00
Tyler Goodlet
45d6682ae0
Update entry count on position msgs, draft a composite position info type
2021-09-06 09:28:10 -04:00
Tyler Goodlet
ff6ac6ba4f
Add label location description param for graphics path anchor
2021-09-06 09:28:10 -04:00
Tyler Goodlet
d21112dcd7
Drop the open ctx mng; add wip pp label
2021-09-06 09:28:10 -04:00
Tyler Goodlet
69091a894f
Move marker label anchor to anchors mod
2021-09-06 09:28:10 -04:00
Tyler Goodlet
e58a980786
Move all anchor funcs to new mod
2021-09-06 09:28:10 -04:00
Tyler Goodlet
94d3f67707
Move marker level-line-positioning anchor to new module
2021-09-06 09:28:10 -04:00
Tyler Goodlet
3aab6d67e9
Use label anchor
2021-09-06 09:28:10 -04:00
Tyler Goodlet
791fd23524
Remove `LevelLine.add_label()`, add dynamic pp marker label
2021-09-06 09:28:10 -04:00
Tyler Goodlet
62517c1662
Add user defined anchor support to label; reorg mod
2021-09-06 09:28:10 -04:00
Tyler Goodlet
0dc18598fb
Add a client side order dialog type for tracking flows in the UI
2021-09-05 13:59:40 -04:00
Tyler Goodlet
62dd327ef3
Drop `_graphics` subpkg; flat is better then nested
2021-09-05 13:59:40 -04:00
Tyler Goodlet
1c59a01a78
Make subplot proportion slightly larger
2021-09-05 13:59:40 -04:00
Tyler Goodlet
fd5c72f97d
WIP position market offscreen nav
2021-09-05 13:59:40 -04:00
Conrad Steenberg
afafe56ec0
Remove List typing
2021-07-21 18:30:50 -07:00
Conrad Steenberg
c830183073
More fixes, some reversions
2021-07-21 18:26:24 -07:00
Conrad Steenberg
3912b22b41
Fix a few QtGui -> QtWidget issues
2021-07-21 18:26:24 -07:00
Conrad Steenberg
9d8d8fd1a2
Fix PyQt5 error
2021-07-21 10:53:40 -07:00
Tyler Goodlet
83ad071cb4
Load provider search engines in tasks instead of exit stack
2021-07-11 11:13:35 -04:00
Tyler Goodlet
90588018a6
Label doc tweak
2021-07-11 11:13:35 -04:00
Tyler Goodlet
26c333ff22
Only close event send side (facepalm)
2021-07-08 10:55:47 -04:00
Tyler Goodlet
48053588da
Don't cancel handler nursery, let errors bubble
2021-07-08 10:55:47 -04:00
Tyler Goodlet
830ef90721
Enable contents labels on q for "query"
2021-07-08 10:55:47 -04:00
Tyler Goodlet
8b966cd7e4
Port all to use new cursor and ohlc refs
2021-07-08 10:55:47 -04:00
Tyler Goodlet
b6eeed1ae0
Move contents labels management to cursor mod
...
Add a new type/api to manage "contents labels" (labels that sit in
a view and display info about viewed data) since it's mostly used by
the linked charts cursor. Make `LinkedSplits.cursor` the new and only
instance var for the cursor such that charts can look it up from that
common class. Drop the `ChartPlotWidget._ohlc` array, just add
a `'ohlc'` entry to `._arrays`.
2021-07-08 10:55:47 -04:00
Tyler Goodlet
d3d5d4ad06
Drop global order lines map
...
Orders in order mode should be chart oriented since there's a mode per
chart. If you want all orders just ask the ems or query all the charts
in a loop.
This fixes cancel-all-orders such that when 'cc' is tapped only the
orders on the *current* chart are cancelled, lel.
2021-07-08 10:55:47 -04:00
Tyler Goodlet
91209b7d6e
Use group status for symbol loading
2021-07-08 10:55:47 -04:00
Tyler Goodlet
37180a4e4e
Fix old msg clearing var name
2021-07-08 10:55:47 -04:00
Tyler Goodlet
eeeeb29f71
Add order cancellation and submission statuses
...
Generalize the methods for cancelling groups of orders (all or those
under cursor) and add new group status support such that statuses for
each cancel or order submission is displayed in the status bar. In the
"cancel-all-orders" case, use the new group status stuff.
2021-07-08 10:55:47 -04:00
Tyler Goodlet
572f984d06
Add an all order lines getter method
2021-07-08 10:55:47 -04:00
Tyler Goodlet
0133f0b589
Add "group statuses" support to status bar
...
Allows for submitting a top level "group status" associated with
a "group key" which eventually resolves once all sub-statuses associated
with that group key (and thus top level status) complete and are also
removed. Also add support for a "final message" for each status such
that once the status clear callback is called a final msg is placed on
the status bar that is then removed when the next status is set.
It's all a questionable bunch of closures/callbacks but it worx.
2021-07-08 10:55:47 -04:00
Tyler Goodlet
53074b552a
Add fast tap key sequence support and order-mode-type statuses
2021-07-08 10:55:47 -04:00
Tyler Goodlet
3650db3321
Make alerts solid line only
2021-07-08 10:55:47 -04:00
Tyler Goodlet
0ded790330
Didn't end up needing a task stack
2021-07-08 10:55:47 -04:00
Tyler Goodlet
ca23825aff
Start input handling **after** order mode is up
2021-07-08 10:55:47 -04:00
Tyler Goodlet
c971997f1a
Don't access unset cursor
2021-07-08 10:55:47 -04:00
Tyler Goodlet
aabbc12b82
Beautifully simplify kb handling code with set ops
2021-07-08 10:55:47 -04:00
Tyler Goodlet
983a517a8c
Drop old commented behaviour; see parent class if needed
2021-07-08 10:55:47 -04:00
Tyler Goodlet
03c95ca908
Factor press and release handling into same qtloop
2021-07-08 10:55:47 -04:00
Tyler Goodlet
569b2efb51
Move region selection to editors mod
2021-07-08 10:55:47 -04:00
Tyler Goodlet
4a37cf768f
Move line and arrow editors to new mod
2021-07-08 10:55:47 -04:00
Tyler Goodlet
93af8c936c
Port cursor and axes to new widget names
2021-07-08 10:55:47 -04:00
Tyler Goodlet
75804a441c
Convert view box to async input handling
...
Instead of callbacks for key presses/releases convert our `ChartView`'s
kb input handling to async code using our event relaying-over-mem-chan
system. This is a first step toward a more async driven modal control
UX. Changed a bunch of "chart" component naming as part of this as well,
namely: `ChartSpace` -> `GodWidget` and `LinkedSplitCharts` ->
`LinkedSplits`. Engage the view boxe's async handler code as part of new
symbol data loading in `display_symbol_data()`. More re-orging to come!
2021-07-08 10:55:47 -04:00
Tyler Goodlet
85621af8af
Extend Qt event relaying
...
Add an `open_handler()` ctx manager for wholesale handling event sets
with a passed in async func. Better document and implement the event
filtering core including adding support for key "auto repeat" filtering;
it turns out the events delivered when `trio` does its guest-most tick
are not the same (Qt has somehow consumed them or something) so we have
to do certain things (like getting the `.type()`, `.isAutoRepeat()`,
etc.) before shipping over the mem chan. The alt might be to copy the
event objects first but haven't tried it yet. For now just offer
auto-repeat filtering through a flag.
2021-07-08 10:55:47 -04:00
Tyler Goodlet
df2f6487ff
Apply `brokerd` quote rate throttling when requested in `open_feed()`
2021-06-14 21:55:51 -04:00
Tyler Goodlet
f320f95288
Drop old hi-dpi font inches sizes
2021-06-13 23:59:02 -04:00
Tyler Goodlet
d269edc0b3
Re-org main window singleton into a new module
...
Avoids some cyclical and confusing import time stuff that we needed to get
DPI aware fonts configured from the active display. Move the main window
singleton into its own module and add a `main_window()` getter for it.
Make `current_screen()` a ``MainWindow` method to avoid so many module
variables.
2021-06-13 23:47:52 -04:00
Tyler Goodlet
84f61c9a92
Avoid clearing cached results; detect repeats later
2021-06-10 13:23:28 -04:00
Tyler Goodlet
0dcadec11a
Add multi-status updates throughout chart init
2021-06-10 13:23:28 -04:00
Tyler Goodlet
90b0673052
Add multi-status support to window
2021-06-10 13:23:28 -04:00
Tyler Goodlet
ce67022e2e
Only add font size scaled down when dpi scaling > 2
2021-06-10 13:23:28 -04:00
Tyler Goodlet
9d31f8ca6a
Add default "small" dpi aware font
2021-06-10 13:23:28 -04:00
Tyler Goodlet
f68295653d
Load cache search before other providers
2021-06-10 13:23:28 -04:00
Tyler Goodlet
112b3f0f07
Drop hidpi font size hacking from contents labels
2021-06-10 13:23:28 -04:00
Tyler Goodlet
e924cbeb43
Min debounce period for faster cached completions
2021-06-10 13:23:28 -04:00
Tyler Goodlet
62c456f8eb
Downscale fonts on scaled-down hidpi displays
2021-06-10 13:23:28 -04:00
Tyler Goodlet
193f4f945c
Flip to using scaled hi DPI detected by Qt
2021-06-10 13:23:28 -04:00
Tyler Goodlet
bb1c549d94
Add some initial status updates during startup
2021-06-10 13:23:28 -04:00
Tyler Goodlet
df50700aa5
Style a basic status bar and add a mode label to it
2021-06-10 13:23:28 -04:00
Tyler Goodlet
a9cdb94ff3
Port styling to latest `qtdarkstyle` version
2021-06-10 13:23:28 -04:00
Tyler Goodlet
74b63b9868
Add mode label to right side
2021-06-10 13:23:28 -04:00
Tyler Goodlet
cc60ad46fc
Skip chart updates if parent widget is hidden to save cpus
2021-06-10 13:23:28 -04:00
Tyler Goodlet
7da7dee02b
Add mode name to viewbox
2021-06-10 13:23:28 -04:00
Tyler Goodlet
78e04e66a5
Add mode names to search, repair LIFO ordering on select
2021-06-10 13:23:28 -04:00
Tyler Goodlet
0564bbd9c3
Use focus switch signal to update status bar
2021-06-10 13:23:28 -04:00
Tyler Goodlet
754a5cce4f
WIP toying with a simple status bar
2021-06-10 13:23:28 -04:00
Tyler Goodlet
8d02778158
Don't bail on unknown order ids
2021-06-10 12:02:57 -04:00
Tyler Goodlet
b06cb5bb5a
Comments clean and improvments
2021-06-10 08:24:10 -04:00
Tyler Goodlet
6e58f31fd8
Port EMS to typed messaging + bidir streaming
...
This moves the entire clearing system to use typed messages using
`pydantic.BaseModel` such that the streamed request-response order
submission protocols can be explicitly viewed in terms of message
schema, flow, and sequencing. Using the explicit message formats we can
now dig into simplifying and normalizing across broker provider apis to
get the best uniformity and simplicity.
The order submission sequence is now fully async: an order request is
expected to be explicitly acked with a new message and if cancellation
is requested by the client before the ack arrives, the cancel message is
stashed and then later sent immediately on receipt of the order
submission's ack from the backend broker. Backend brokers are now
controlled using a 2-way request-response streaming dialogue which is
fully api agnostic of the clearing system's core processing; This
leverages the new bi-directional streaming apis from `tractor`. The
clearing core (emsd) was also simplified by moving the paper engine to
it's own sub-actor and making it api-symmetric with expected `brokerd`
endpoints.
A couple of the ems status messages were changed/added:
'dark_executed' -> 'dark_triggered'
added 'alert_triggered'
More cleaning of old code to come!
2021-06-08 14:33:30 -04:00
Tyler Goodlet
0bcad35c70
Set ack time on pydantic model
2021-06-08 14:31:04 -04:00
Tyler Goodlet
b689adaeb0
Throttle L1 label updates at a lower rate
2021-05-28 14:11:02 -04:00
Tyler Goodlet
1a7b06c147
Limit l1 graphics updates to half the refresh rate
2021-05-28 14:11:02 -04:00
Tyler Goodlet
ee71f445fb
Clear entries on no results returned per task
2021-05-28 14:08:24 -04:00
Tyler Goodlet
a31b83c5ca
Don't ever send plain whitespace a search pattern
2021-05-28 13:44:30 -04:00
Tyler Goodlet
ea3d96e7ed
Accept arbitrary QEvent subscriptions via a set
2021-05-28 13:30:26 -04:00
Tyler Goodlet
c56c7b8540
Increase min debounce period, stop searching on user nav selection
2021-05-28 10:16:00 -04:00
Tyler Goodlet
ec6ea32dda
Don't pass through linked charts x-axis handle
2021-05-27 13:05:23 -04:00
Tyler Goodlet
7dfc7f7fa2
Factor chart selection into widget, cleanups, add resource links
2021-05-27 13:05:23 -04:00
Tyler Goodlet
ab3adcee9e
Get basic switch-on-click mouse support working
2021-05-27 13:05:23 -04:00
Tyler Goodlet
607e1a8299
Add per-provider-async searching with status updates
2021-05-27 13:05:23 -04:00
Tyler Goodlet
89beb92866
Add api for per-section filling/clearing
...
Makes it so we can move toward separate provider results fills in an
async way, on demand.
Also,
- add depth 1 iteration helper method
- add section finder helper method
- fix last selection loading to be mostly consistent
2021-05-27 13:05:23 -04:00
Tyler Goodlet
c478ddaed0
Disable cursor blink globally
2021-05-27 13:05:23 -04:00
Tyler Goodlet
924960a359
Add label to search bar
2021-05-27 13:05:23 -04:00
Tyler Goodlet
46d88965d3
Get LIFO sort on cache syms working properly
2021-05-27 13:05:23 -04:00
Tyler Goodlet
59475cfd81
Store lowercase symbols within piker data internals
2021-05-27 13:05:23 -04:00
Tyler Goodlet
af9dcf9230
Use an ordered dict to get LIFO cache sorting on sym selection
2021-05-27 13:05:23 -04:00
Tyler Goodlet
9bfc230dde
Speedup: load provider searches async at startup
2021-05-27 13:05:23 -04:00
Tyler Goodlet
82cdb176e1
Make ctrl-l highlight current text in edit
2021-05-27 13:05:23 -04:00
Tyler Goodlet
212882a5a5
Don't try to show xhair if no active plot
2021-05-27 13:05:23 -04:00
Tyler Goodlet
307afb1935
Clean some key handling
2021-05-27 13:05:23 -04:00
Tyler Goodlet
67498c60af
More UX features
...
- load previous search state on open
- show cached on empty search bar
- allow ctrl-u/d to navigate provider "sections"
2021-05-27 13:05:23 -04:00
Tyler Goodlet
8129fcc648
Ignore key auto-repeats
2021-05-27 13:05:23 -04:00
Tyler Goodlet
07d8bf1453
Add a `.select_first()` view method + more cleaning
2021-05-27 13:05:23 -04:00
Tyler Goodlet
d5e83e61d4
Reorder, drop some cruft
2021-05-27 13:05:23 -04:00
Tyler Goodlet
9d2c8a9526
Factor selection details into completer view methods
2021-05-27 13:05:23 -04:00
Tyler Goodlet
43d73b4a7c
Info log the current provider search
2021-05-27 13:05:23 -04:00
Tyler Goodlet
64c1d9a965
Support ctrl-space to open search pane
2021-05-27 13:05:23 -04:00
Tyler Goodlet
d8a200aadc
Increase completion-tree width, support ctrl-space toggle
2021-05-27 13:05:23 -04:00
Tyler Goodlet
2471ce446e
Require `<symbol>.<provider>` format to cli
2021-05-27 13:05:23 -04:00
Tyler Goodlet
e77a51f16e
Support multi-provider cache symbol switching
2021-05-27 13:05:23 -04:00
Tyler Goodlet
1bd0ee8746
Support loading multi-brokerds search at startup
2021-05-27 13:05:23 -04:00
Tyler Goodlet
fd8dc4f1a3
Make -b a multi-option for backends
2021-05-27 13:05:23 -04:00
Tyler Goodlet
b2ff09f193
Support min and max keyboard pauses
...
Some providers do well with a "longer" debounce period (like ib) since
searching them too frequently causes latency and stalls. By supporting
both a min and max debounce period on keyboard input we can only send
patterns to the slower engines when that period is triggered via
`trio.move_on_after()` and continue to relay to faster engines when the
measured period permits. Allow search routines to register their "min
period" such that they can choose to ignore patterns that arrive before
their heuristically known ideal wait.
2021-05-27 13:05:23 -04:00
Tyler Goodlet
63363d750c
Port chart to multi-search api
2021-05-27 13:05:23 -04:00
Tyler Goodlet
cb102f692c
Top level widget `.focus()`
2021-05-27 13:05:23 -04:00
Tyler Goodlet
0163a582a5
Move search machinery to ui module, add fast cached chart selection
2021-05-27 13:05:23 -04:00
Tyler Goodlet
82ece83d33
Drop commented cruft
2021-05-27 13:05:23 -04:00
Tyler Goodlet
b39fd5e1fc
Use per-provider indented tree layout for results
2021-05-27 13:05:23 -04:00
Tyler Goodlet
25dbe60c77
Flip to ctrl-l to pop out search/list
2021-05-27 13:05:23 -04:00
Tyler Goodlet
51c61587d2
Make list pop out next to primary y-axis
2021-05-27 13:05:23 -04:00
Tyler Goodlet
2c24c9ef2d
Compose search bar and view under parent widget
2021-05-27 13:05:23 -04:00
Tyler Goodlet
25d7122cb6
Throttle requests using a static "typing paused period"
2021-05-27 13:05:22 -04:00
Tyler Goodlet
5766dd518d
Enforce lower case symbols across providers
2021-05-27 13:05:22 -04:00
Tyler Goodlet
478b114708
First draft completion in background task
2021-05-27 13:05:22 -04:00
Tyler Goodlet
c9efbcc6d2
Drop completion list from startup
2021-05-27 13:05:22 -04:00
Tyler Goodlet
431fdd3f9c
Add initial working symbol search with async completions
2021-05-27 13:05:22 -04:00
Tyler Goodlet
a5826e6e22
Up the kb event queue size
2021-05-27 13:05:22 -04:00
Tyler Goodlet
be39e9bdf5
Load async kb search handler at startup
2021-05-27 13:05:22 -04:00
Tyler Goodlet
60d44f30ee
Make search kb handling async
2021-05-27 13:05:22 -04:00
Tyler Goodlet
2861f321ce
Add async keyboard cloner sub-sys
2021-05-27 13:05:22 -04:00
Tyler Goodlet
5e1b15f319
Repair indents from rebasing
2021-05-27 13:05:22 -04:00
Tyler Goodlet
821d5ab9ec
Bring back in and merge tractor stream api patch
2021-05-27 13:05:22 -04:00
Tyler Goodlet
da0cb9b2ac
Call search focus directly
2021-05-27 13:05:22 -04:00
Tyler Goodlet
0e83906f11
Initial WIP search completer; still a mess
2021-05-27 13:05:22 -04:00
Tyler Goodlet
157f6ab02b
Drop lingering chart focus call
2021-05-27 13:05:22 -04:00
Tyler Goodlet
1f9f2b873a
Super fast switching, just hide loaded charts
2021-05-27 13:05:22 -04:00
Tyler Goodlet
0627f7dcee
First draft: symbol switching via QLineEdit widget
2021-05-27 13:05:22 -04:00
goodboy
9c821c8cfd
Merge pull request #181 from pikers/syseng_tweaks
...
Syseng tweaks
2021-05-25 08:39:06 -04:00
Tyler Goodlet
9e367432fd
Minimize update to Qt reported display's refresh rate
2021-05-25 06:56:18 -04:00
Tyler Goodlet
e623c58754
Naively throttle graphics updates to 60 FPS
2021-05-25 06:33:22 -04:00
Tyler Goodlet
319eacd8c1
Use compact async with tuple syntax from py3.9
2021-05-24 12:26:50 -04:00
Tyler Goodlet
f6f4a0cd8d
Use tractor settings for qtractor
2021-05-24 12:26:34 -04:00
Tyler Goodlet
435e005d6e
Drop quantdum legend item
2021-05-24 12:23:02 -04:00
Tyler Goodlet
ecd94ce24d
Better indexing logic?
2021-05-24 12:17:08 -04:00
Tyler Goodlet
c08f192f77
Move charting to new tractor stream api
...
This required a fsp task spawning logic rework which ended up being
cleaner just spawning tasks in a loop sequentially instead of trying
a 2-phase spawn-then-initialize approach.
This also includes changes from the symbol search branch hacked in.
Mostly it includes isolating the main chart startup-sequence to a
function that can be run in a new task every time a new symbol is
requested by the selector/searcher. The actual search functionality
obviously isn't in here yet but minor changes are included as part of
pulling out the `tractor` stream api patch from the symbol search dev
branch.
2021-04-29 11:28:00 -04:00
Tyler Goodlet
3375735914
Port kivy monitor to new tractor stream api
2021-04-29 09:10:11 -04:00
Tyler Goodlet
7d6bc4d856
Move feed api(s) into new submodule
...
Also add a --pdb flag to chart app.
2021-04-15 10:43:29 -04:00
Tyler Goodlet
0b10c8d6d6
Make standalone mode work again
2021-04-15 08:23:08 -04:00
Tyler Goodlet
9622254cdb
Hack broadcast chan for order submissions, smh
2021-04-14 11:02:14 -04:00
Tyler Goodlet
9a15cd48f0
Just symbol info in window title
2021-04-10 14:18:40 -04:00
Tyler Goodlet
1523637979
Always update L1 labels
2021-04-10 14:18:40 -04:00
Tyler Goodlet
3506bbe05c
Nest async withs
2021-04-10 14:18:40 -04:00
Tyler Goodlet
a18a4b5a4c
Call the app what it is
2021-04-10 14:18:40 -04:00
Tyler Goodlet
20c99733b6
Let cli pass through actor name
2021-04-10 14:18:40 -04:00
Tyler Goodlet
a8a3f098cf
Drop lingering prints
2021-04-10 14:18:40 -04:00
Tyler Goodlet
3ebb7ab6b1
Only activate Qt hidpi detection on windows for now
2021-04-10 14:18:40 -04:00
goodboy
feb8d5bbad
Merge pull request #153 from wattygetlood/windows_patches
...
Windows patches
2021-04-06 11:55:51 -04:00
Tyler Goodlet
6891309abd
Fix import
2021-04-03 12:22:14 -04:00
Tyler Goodlet
fb996bfffb
Change subpkg name in cli
2021-04-03 12:22:14 -04:00
Tyler Goodlet
20a9617c18
Use open pikerd from chart entrypoint
2021-04-03 12:22:14 -04:00
Tyler Goodlet
d4395dbcbc
Make default view more zooomed in
2021-03-31 14:26:32 -04:00
Tyler Goodlet
f75b3108ce
Size execution arrows to dpi
2021-03-31 14:26:13 -04:00
Tyler Goodlet
0dfa92230d
Size level line markers to dpi aware font size
2021-03-31 14:25:51 -04:00
Tyler Goodlet
54d36f26f0
Base anchor contents labels based on dpi-aware font bounding rect
2021-03-31 14:25:17 -04:00
Tyler Goodlet
3f7d9c5c15
Base axis text offset on dpi-aware font size
2021-03-31 14:24:39 -04:00
Tyler Goodlet
3bd87caf4b
Hip shot: try making low dpi font sizes "just work"
2021-03-29 17:52:32 -04:00
wattygetlood
c39c4f11db
Forcinng trio spawner seems to work?
2021-03-28 17:24:30 -04:00
Tyler Goodlet
07a5bf4b7c
Use low dpi inches on 96 dpi
2021-03-19 09:33:47 -04:00
Tyler Goodlet
77fbde1115
Override the inverse transform func from pg
2021-03-19 00:40:39 -04:00
Tyler Goodlet
6fa1d4dc88
Show xhair even if order is filled while line is hovered
2021-03-18 21:57:08 -04:00
Tyler Goodlet
5610807b8e
Move marker factory funcs to new mod
2021-03-18 16:59:22 -04:00
Tyler Goodlet
55de079320
Add low dpi settings and different default view bars counts
2021-03-18 13:40:31 -04:00
Tyler Goodlet
67c5563090
Enable marker-on-select through order mode
2021-03-18 13:33:10 -04:00
Tyler Goodlet
68f75b582a
More fixes for kivy shit
2021-03-18 13:32:34 -04:00
Tyler Goodlet
cd5da45abf
Show order line marker on hover
2021-03-18 13:28:28 -04:00
Tyler Goodlet
2c7d8cdbb0
Support hiding only "half" the xhair
2021-03-18 13:27:49 -04:00
Tyler Goodlet
e1dc2b9225
Enable daemon debug through top level kwarg
2021-03-17 08:36:34 -04:00
Tyler Goodlet
aaca2b2f33
Tweak L1 labels to have more spaces
2021-03-17 08:26:28 -04:00
Tyler Goodlet
17b66e685f
Experiment with zoom focal @ L1 edge
2021-03-17 08:25:58 -04:00
Tyler Goodlet
d1c8c2a072
More level line reworking
...
- break (custom) graphics item style marker drawing into separate func
but keep using it since it still seems oddly faster then the
QGraphicsPathItem thing..
- unfactor hover handler; it was uncessary
- make both the graphics path item and custom graphics items approaches
both work inside ``.paint()``
2021-03-16 19:36:05 -04:00
Tyler Goodlet
adf6437449
Move margin settings to class scope
2021-03-16 15:59:44 -04:00
Tyler Goodlet
61198818dc
Fix label snap on line highlight bug
2021-03-14 12:28:11 -04:00
Tyler Goodlet
cf2f001bcc
Add save last datum toggle to y-label
2021-03-13 21:06:53 -05:00
Tyler Goodlet
776395791a
Pass action to line editor
2021-03-13 19:31:22 -05:00
Tyler Goodlet
c75dacb239
Support func ops on field data, extend anchor logics
2021-03-13 19:29:52 -05:00
Tyler Goodlet
c71a3e0fc5
Level line look and feel rework
...
Add support for drawing ``QPathGraphicsItem`` markers but don't use them
since they seem to be shitting up when combined with the infinite line
(bounding rect?): weird artifacts and whatnot. The only way to avoid
said glitches seems to be to update inside the infinite line's
`.paint()` but that slows stuff down.. Instead stick with the manual
paint job use the same pin point: left of the L1 spread graphics - where
the lines now also extend to.
Further stuff:
- Pin the y-label to a line's value on hover.
- Disable x-dimension line moving
- Rework the labelling to be more minimal
2021-03-13 17:31:15 -05:00
Tyler Goodlet
887c305d46
Allow y-label pinning on cross hair hide
2021-03-13 17:29:35 -05:00
Tyler Goodlet
9798689961
Lengthen label arrow a tad
2021-03-13 17:28:57 -05:00
Tyler Goodlet
396f6b2a0d
Fix type annot
2021-03-12 07:41:47 -05:00
Tyler Goodlet
18ab81a967
Make crosshair lines a milder gray
2021-03-11 21:44:35 -05:00
Tyler Goodlet
624617d8e1
Don't run brokerds in debug mode by default
2021-03-11 21:44:10 -05:00
Tyler Goodlet
d016abcd0d
Adjust right axis anchor closure to include l1 label size
2021-03-11 21:43:29 -05:00
Tyler Goodlet
4a1df686a5
Update max l1 label size on chart
2021-03-11 21:42:38 -05:00
Tyler Goodlet
a51d5c536e
Add a couple more grays
2021-03-11 21:41:13 -05:00
Tyler Goodlet
31c14a2f9f
Add l1 label size tracking to chart widget
2021-03-11 21:40:50 -05:00
Tyler Goodlet
ea8120156f
Add position line updating to order mode
2021-03-11 21:40:06 -05:00
Tyler Goodlet
98bfee028a
Add a position line api
...
Add a line which shows the current average price position with and arrow
marker denoting the direction (long or short). Required some further
rewriting of the infinite line from pyqtgraph including:
- adjusting marker (arrow) placement to be offset from axis + l1 labels
- fixing the hover event to not require the `.movable` attribute to be
set
2021-03-11 21:35:09 -05:00
Tyler Goodlet
7075a968b4
Create an order mode module
2021-03-08 09:05:37 -05:00
Tyler Goodlet
fff9efe4aa
Snap level line movements to tick size
2021-03-07 22:16:46 -05:00
Tyler Goodlet
e71bcb363c
Drop stage line cacheing; the complexity isn't worth it.
2021-03-07 16:07:23 -05:00
Tyler Goodlet
de5a69c59c
Add mouse drag order update support to UI
2021-03-07 16:01:42 -05:00
Tyler Goodlet
6851bacd0a
Add drag start/end callback support, remove from cursor hovered on delete
2021-03-07 15:50:50 -05:00
Tyler Goodlet
a1a1dec885
Move L1 labels into lone module
2021-03-01 14:48:08 -05:00
Tyler Goodlet
9f9b5480a6
More explicit private var name
2021-02-24 12:05:09 -05:00
Tyler Goodlet
948e133cae
Split out ems daemon, client api and paper engine into new mods
2021-02-22 18:37:57 -05:00
Tyler Goodlet
a9bbc223bb
Add a new exchange subpackage
2021-02-22 17:28:34 -05:00
Tyler Goodlet
e6ea053d40
Get kivy/questrade shit working again
2021-02-21 12:32:40 -05:00
Tyler Goodlet
f724798336
Fix incorrect bounding rect calc
2021-02-21 12:02:20 -05:00
Tyler Goodlet
4b0e5662a5
Add default order lot sizes by asset type
2021-02-21 12:01:48 -05:00
Tyler Goodlet
6fb1945360
Fix and pass through piker loglevel correctly
2021-02-21 11:50:33 -05:00
Tyler Goodlet
aa4a2ef64f
Bump up font size one more time
2021-02-21 11:49:27 -05:00
Tyler Goodlet
c2890b8197
Port level line to xhair methods
2021-02-21 11:48:51 -05:00
Tyler Goodlet
d5b41e12c5
Add crosshair hide/show convenience methods
2021-02-21 11:45:24 -05:00