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