lean-monitor
lean-monitor copied to clipboard
LiveResult support
As a user running live algorithms, I would like to be able to attach to a running session to see its current performance, or to open a exported live result to review previous live sessions.
- The
FileSession
supportsBacktestResult
. It should supportLiveResult
. - the
StreamSession
already supportsLiveResult
however there are problems merging live data and display in the charts.
I need to investigate how live support is shown in QuantConnect first before implementing live support.
I have found the issue. It's located in QuantConnect project in LiveTradingResultHandler.cs in SplitPackets method. Series are removed from packet sent out if the chart name is not equqlto _subscription value which is initialized by default to "Strategy Equity" and never modified. If you change code to //if (deltaChart.Name == _subscription || (_subscription == "*" && deltaChart.Name == "Strategy Equity")) //{ chart.Series = deltaChart.Series; //} then the monitoring application receives the series data
Personnally I have created a LiveTradingMonitorResultHandler.cs file with the modification because at the moment I don't understand how to modify the _subscription variable in the algos and it's purpose.
I guess the QuantConnect's implementation of the Lean API does support chart subscriptions. There are API methods that allow you to change chart subscriptions. My first guess is this is not implemented in the Lean engine itself. I am currently implementing a new (mobile) client, so I hope to find the answer soon.