PanelUI

View as Markdown

Definition

The zero-based index of the chart panel in which the calling script is configured.

The “Panel” property configured in the Indicators or Strategies window on a chart is non-zero-based, while PanelUI is zero-based. For example, if an indicator is configured in Panel # 1 in the Indicators window, PanelUI will return an index of 0. If the indicator were configured in Panel # 4 in the Indicators window, PanelUI would return an index of 3.

Property Value

An int value representing the panel the object is configured. This property is read-only.

Syntax

PanelUI

Examples

1protected override void OnBarUpdate()
2{
3 // Print the zero-based panel index on which the script is configured
4 Print("My object is on is on panel # " + **PanelUI**);
5}