- ago
It would be great if WealthLab had some programmable function buttons that, when depressed, would execute user library (DLL) code. The buttons should be able to pass arguments (or a strategy instance of the strategy in focus) into the code.

Some applications might include opening a browser window to present a broker Quotes window or Earnings report of the current symbol. In fact, opening a browser URL would make a good example case of how to use these buttons.

Another example would be to open a ScottPlot window to show current characteristics (for example, P/E Ratio vs Price) of the current ticker symbol. Is the current price a good value relative to its P/E Ratio? The analytical possibilities are endless.
2
594
Solved
13 Replies

Reply

Bookmark

Sort
- ago
#1
I'm thrilled. You mean I'll be finally able to make the CPU overheat when I hold down spacebar as in that famous webcomic? 😋 https://xkcd.com/1172/
0
Glitch8
 ( 12.10% )
- ago
#2
Were you aware that most of this is already in place with our existing WL8 client extension API. The only difference is that instead of buttons, the interaction points are exposed as menu items under the Extensions menu. When you select the menu item it calls into your dll (.NET assembly) code to invoke a method defined there.

Some enhancements you mentioned could be around providing a way to access a Strategy in focus, etc. These kinds of ideas would need to be refined and clarified. But potentially these could be exposed via the already existing IWLClientHost interface which your extension code already has access to.

Exposing these elements as buttons rather than menu items would also need to be seriously considered. Like, where would these buttons appear in such a way that many extensions could leverage the capability without overloading the UI? Maybe keeping the menu items structure is better after all?
0
- ago
#3
QUOTE:
Were you aware that most of this is already in place with our existing WL8 client extension API.

I'm aware of that. And I thought about creating a floating extension window with such function buttons on it. But my knowledge of WPF is poor and I have too many other projects to attend to. So I'm not going in that direction.

Remember, I come from the embedded systems world, so I'm not a Windows developer. I'm more into real-time systems, numerical analysis, and signal processing.
0
Glitch8
 ( 12.10% )
- ago
#4
OK but that doesn't mean that the existing solution could not work for you. Your extension need not use WPF, it's just a DLL (.NET Assembly) that has a method that WL8 will call into.

0
- ago
#5
QUOTE:
Your extension need not use WPF,...

I already have DLLs in my strategy code library. What I need is a WPF button that will invoke that code on demand (manually) when I decide a stock is worth researching deeper. I need a manual control (WPF control) to invoke the custom code.

What I would really like is a way to pass trading opportunities into Fidelity's ATP trading platform easily for further research. But that's another topic.
0
Glitch8
 ( 12.10% )
- ago
#6
You could use the extension menu item to invoke code dynamically. The API already exists in WL8. It’s just exposed as a menu item and not a button.
1
Best Answer
- ago
#7
I think developing WL extensions is outside of my development experience and time commitment. Perhaps someone else wants to develop this extension with WPF buttons. My time is better focused on numerical analysis and statistics with this trading problem. That will provide the best return for my time investment.

But I appreciate your thoughts.
0
- ago
#8
QUOTE:
Perhaps someone else wants to develop this extension


I find the idea interesting. My idea was to have an XML configuration file which describes a set of buttons, a glyph, their actions and the keyboard-shortcut, like

Button: "Start MyStrategy"
Action: Open Strategy "MyStrategy" and run a backtest
Glyph: Strategy.jpg
Shortcut: Alt-F1

And here is the obstacle: It is not very hard to create a floating window using the Extension API, but I can't see a way to get the Keyboard key "Alt-F1" to execute something within such an extension.

Also I think it should not be a floating window. I'd prefer more a second line of buttons in WL's main window, just beneath "Chart" "New Strategy" and so forth.
Just the spot where my Chrome Browser has the "Bookmarks Bar" (Ctrl-Shift-B)

Remark: @eugene: Chrome has also this "Show bookmarks bar" menu entry to hide/show that line, so it does not clutter the GUI for innocent users.

WL already has the View->Show Toolbar action. Close to this one we could have a View->Quick Access Buttons action.
0
Glitch8
 ( 12.10% )
- ago
#9
But you first have to develop the Evolver Visualizer pack that you lobbied for causing us to spend a development cycle on that previous feature request :)
0
- ago
#10
QUOTE:
My idea was to have an XML configuration file which describes a set of buttons, a glyph, their actions and the keyboard-shortcut, like
That's fine, but as a "sub-implementation", I would include a specialized case for forming browser URLs like Firefox has it. Below is the Firefox definition I use for opening a Quotes window and searching the WL forum:
CODE:
www.google.com/finance?q=%s www.google.com/search?q=site:www.wealth-lab.com/Discussion/+%s
Firefox lets you pass one parameter, %s. For the Quotes window case, that would be bars.Symbol. For the forum search case, that would be the search term. (Note: I left the h...p:// prefix off the above URLs because the WL website messes with them.)

I can't think of an instance where the strategy in focus would want to pass more than one parameter (bars.Symbol) to format a URL lookup, so we can make the first version simple with just one parameter in this special case.
0
- ago
#11
Here's my take off the top of my head...

Support at least three action types...
- call into a DLL specifying the class that implements a specific interface. The interface would likely be simple so that it could receive the Host, IWLClientHost, and child window and some action-relevant arguments. Then, do whatever you need in the DLL.
- run an executable passing parameters to the exe (of course that depends on what the exe supports)
- call to a webpage (this is extremely simple to do) replacing URL parameters (may need so enhancements to WL8 to get info like symbol, etc.)

Make it easily configurable...
- have a preferences page with sub-tabs that allows specification of up to 10 of the above actions with arguments specification that can be fed to the above action types
- the preferences of course would be saved/loaded using SettingsManager class.

Make it easy to use...
The WL8 extension window would have a new menu entry with sub-menus for the user-defined actions. Also, as suggested in other post(s), a window with action launch buttons.

The problem I have with the concept is the potential support issues it introduces, and how much of a WL8 audience there would be for this functionality.
0
- ago
#12
QUOTE:
The problem ... is ... how much of a WL8 audience there would be for this functionality.
For simply formatting a URL to pass to the default browser, I think there would be significant acceptance because anyone can do it.

For the other features mentioned, there should be plug-in support so the programmers can post plug-ins that the non-programmers can download. For example, not everyone uses ScottPlot, but everyone can download a plug-in that plots P/E Ratio vs Price.

Gee, this "thing" has gotten complicated. It might turn into some kind of Performance Visualizer alternative (which sounds extreme).
0
mjj38
- ago
#13
I use the extension menu item for a lot of things. It is super easy once you have a template to create a simple WPF child window.

For what you want which is essentially a window with a series of configurable buttons (like a floating toolbar) is super simple. It's basically just a stackpanel with buttons. If I have time I'll can create a simple template that you can expand to do whatever you want.
0

Reply

Bookmark

Sort