Visual monitoring
To simplify monitoring, you can use the special Monitor component. See also Visual logging components.
This window allows you to display messages from all ILogSource:
- strategies (Strategy);
- connectors (IConnector);
- own ILogSource implementations (for example, the main window in the algorithm).
The nesting of sources is shown in the form of a tree. Each parent node contains messages from all nested sources and so on down to the lowest level. For connectors this is also useful when using BasketTrader. Similarly, the same nesting can be arranged for your own algorithm by implementing the ILogSource.Parent property.
Using Monitor
First, you need to create a window and add the component.
Then, the created window must be added to your LogManager through the GuiLogListener:
_logManager.Listeners.Add(new GuiLogListener(monitor));
Thereafter all sources LogManager.Sources (strategies, connectors, etc.) will send messages to the Monitor.