3.7.4Chart sidebar/dock widgets

A widget can be loaded as a "chart widget", into the chart's dock area as used by the built-in Market Timer and Notepad indicators. You do this by choosing Add Indicator > External Widget from a chart. Widgets which are loaded in this way have access to some extra features, letting them behave like user-defined indicators (UDIs). They can create drawings, event markers, or bar highlights on the chart.

You can detect whether your widget is loaded as a chart widget by checking privateSettings.isChartWidget. If this is not turned on, the following features will not be available, and attempting to use a function such as ChartWidget_SetTitle() will raise an exception.