ISupportSessions Interface

An extension object may implement the ISupportSessions interface in order to share a common Session object between all instances of the extension object used inside a single chart (or portfolio). Sessions provide a mechanism for multiple indicators within a chart to share a common resource, for example a connection to an external server.
interface ISupportSessions : IDispatch
{
    IEquillaExtensionSession CreateSessionObject();
    void AttachSession(IEquillaExtensionSession Session);
}
The first time an extension object is created that implements this interface, a chart will call the CreateSessionObject() factory method, which must return an object that implements the IEquillaExtensionSession interface. The newly created session will immediately be passed back to the extension object via a call to AttachSession().

Following the creation of other extension objects of the same type within the same chart, the AttachSession() method will also be called with the original session passed as the only parameter.

The example project RSSExtension uses a session object to manage a pool of RSS feeds so that the same data does not need to be re-requested by each use of the RSS indicator within a chart.

The example project ExcelOrderTracker uses a session object to manage a single Excel workbook that all instruments within a chart will forward strategy data to.