Properties

View as Markdown

Definition

A collection of properties related to the configuration of the Chart

Warning: These are UI properties which are designed to be set by a user. Attempting to modify these values through a custom script is NOT guaranteed to take effect.

Property Value

A ChartControlProperties object containing values for all properties configured on the specified ChartBars object.

PropertyReturn Type and Description
AllowSelectionDraggingA bool indicating selected chart objects can be moved within a chart panel or dragged to a new chart panel
AlwaysOnTopA bool indicating “Always on Top” is enabled for the chart window
AreHGridLinesVisibleA bool indicating the horizontal grid lines are visible on the chart
AreTabsVisibleA bool indicating tabs are visible in the chart window
AreVGridLinesVisibleA bool indicating the vertical grid lines are visible on the chart
AxisPenA Stroke object used in painting the x- and y-axis
BarDistanceA float measuring the distance (in pixels) between the left or right edge of one bar and the corresponding edge of the previous or subsequent bar
BarMarginRightAn int representing the “Right Margin” property value configured on the chart
ChartBackgroundA Brush object used to paint the chart background
ChartTextA Brush object used to paint text on the chart
ChartTraderVisibilityAn enum indicating the visibility status of Chart Trader. Possible values are Collapsed, Visible, and VisibleCollapsed
CrosshairCrosshairTypeAn enum indicating the type of Cross Hair enabled on the chart. Possible values are Off, Local, Global, and GlobalNoTimeScroll
CrosshairIsLockedA bool indicating the Cross Hair’s vertical line is locked in place
CrosshairLabelBackgroundA Brush object used to paint the Cross Hair’s price and time markers in the x- and y-axis
CrosshairLabelForegroundA Brush object used to paint the text in the Cross Hair’s price and time markers
CrosshairPenA string representing the Pen used within the Stroke that is used to draw the Cross Hair
CrosshairStrokeA CrosshairStroke object containing information on the Cross Hair’s Stroke, CrosshairType, and isLocked property
GridLineHPenA GridLine object containing information on the horizontal grid lines’ Stroke and isVisible property
GridLineVPenA GridLine object containing information on the vertical grid lines’ Stroke and isVisible property
InactivePriceMarkersBackgroundA Brush object used to paint the background of inactive price markers on the chart
InactivePriceMarkersForegroundA Brush object used to paint the display text of inactive price markers on the chart
LabelFontA NinjaTrader.Gui.Tools.SimpleFont object containing information on the font used in text labels throughout the chart
PanelSplitterPenA Stroke object used to paint the lines between chart panels
ShowDateRangeA bool indicating the date range of the bars painted on the visible chart canvas will be displayed within the chart
ShowScrollBarA bool indicating the horizontal scroll bar is visible beneath the x-axis
SnapModeAn enum indicating the currently enabled Snap Mode. Possible values are None, Bar, Price, and BarAndPrice
TabNameA string representing the name of the current tab

Syntax

\<chartcontrol\>.Properties

Examples

1protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
2{
3 // Instantiate a ChartControlProperties object to hold a reference to chartControl.Properties
4 ChartControlProperties myProperties = chartControl.Properties;
5
6 // Set the AllowSelectionDragging property to false
7 myProperties.AllowSelectionDragging = false;
8}