CrosshairType

View as Markdown

Definition

Indicates the Cross Hair type currently enabled on the chart.

Property Value

An enum specifying the type of Cross Hair currently enabled on the chart. Possible values are listed below:

PropertyDescription
LocalThe local (single-chart) Cross Hair is enabled
GlobalGlobal Cross Hair
GlobalNoTimeScrollGlobal Cross Hair (No Time Scroll) is enabled

Syntax

\<chartcontrol\>.CrosshairType

Examples

1protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
2{
3 // Print a message if the user enables the Global Cross Hair without time scrolling
4 if (chartControl.CrosshairType == CrosshairType.GlobalNoTimeScroll)
5 Print("It is recommended to enable Global Cross Hair time scrolling with this indicator");
6}

In the image below, CrosshairType reveals that Global Cross Hair (No Time Scroll) is enabled on the chart.

ChartControl_CrosshairType