1.6.3.1Permanent widgets

By default, widgets in the page container are unloaded when the user navigates to a different page of the app's configuration. (They can save state and later reload it in order to provide a seamless transition between pages.)

However, it is possible for a widget to keep running after a change of the active page. Such widgets are also always reloaded on restart, even if they are not on the active page.

This mechanism is designed for trading algos (and for similar widgets such as the Excel RTD) which need to keep providing services even if they are not on the active page. It should only be used where necessary. Asking to run permanently, rather than saving state and reloading as the user switches between pages, can affect the performance of the whole MyTrader app.

A widget specifies that it needs to run permanently by returning mustRemain:truein its state. The widget must implement OnGetState(). For example:

Framework.OnGetState = function()

{

return {

// Keeps the widget open, and reloads it immediately on app startup even if

// not on the active page

mustRemain: true,

// Any other state which the widget wants to store/report

};

};