ChartDisplaySettings


Summary

Represents the chart display settings.

Syntax

public interface ChartDisplaySettings

Members

NameTypeSummary
AskPriceLine PropertyDefines if the Ask Price Line is displayed on the chart.
BidPriceLine PropertyDefines if the Bid Price Line is displayed on the chart.
ChartScale PropertyDefines if the Chart Scale is displayed on the chart.
DealMap PropertyDefines if the Deal Map is displayed on the chart.
Grid PropertyDefines if the Grid is displayed on the chart background.
MarketSentiment PropertyDefines if the Market Sentiment is visible on the chart.
Orders PropertyDefines if the Orders are displayed on the chart.
PeriodSeparators PropertyDefines if the Period Separators are displayed on the chart.
Positions PropertyDefines if the Positions are displayed on the chart.
PriceAlerts PropertyDefines if the Price Alerts are visible on the chart.
PriceAxisOverlayButtons PropertyDefines if the price axis overlays buttons are visible on the chart.
QuickTradeButtons PropertyDefines if the QuickTrade buttons are visible on the chart.
Targets PropertyDefines if the Target is visible on the chart.
TickVolume PropertyDefines if the Tick Volume is displayed on the chart.

Example 1

using cAlgo.API;
namespace cAlgo
{
    // You can use this sample indicator to change some of the chart display settings via chart controls
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class ChartDisplaySettingsSample : Indicator
    {
        protected override void Initialize()
        {
            var stackPanel = new StackPanel
            {
                HorizontalAlignment = HorizontalAlignment.Left,
                VerticalAlignment = VerticalAlignment.Bottom,
                BackgroundColor = Color.Gold,
                Opacity = 0.7,
                Margin = 5,
                Orientation = Orientation.Vertical
            };
            var askPriceLineCheckBox = new CheckBox
            {
                Text = "Ask Price Line",
                Margin = 5,
                IsChecked = Chart.DisplaySettings.AskPriceLine
            };
            askPriceLineCheckBox.Click += args => Chart.DisplaySettings.AskPriceLine = args.CheckBox.IsChecked.Value;
            stackPanel.AddChild(askPriceLineCheckBox);
            var bidPriceLineCheckBox = new CheckBox
            {
                Text = "Bid Price Line",
                Margin = 5,
                IsChecked = Chart.DisplaySettings.BidPriceLine
            };
            bidPriceLineCheckBox.Click += args => Chart.DisplaySettings.BidPriceLine = args.CheckBox.IsChecked.Value;
            stackPanel.AddChild(bidPriceLineCheckBox);
            var chartScaleCheckBox = new CheckBox
            {
                Text = "Chart Scale",
                Margin = 5,
                IsChecked = Chart.DisplaySettings.ChartScale
            };
            chartScaleCheckBox.Click += args => Chart.DisplaySettings.ChartScale = args.CheckBox.IsChecked.Value;
            stackPanel.AddChild(chartScaleCheckBox);
            var dealMapCheckBox = new CheckBox
            {
                Text = "Deal Map",
                Margin = 5,
                IsChecked = Chart.DisplaySettings.DealMap
            };
            dealMapCheckBox.Click += args => Chart.DisplaySettings.DealMap = args.CheckBox.IsChecked.Value;
            stackPanel.AddChild(dealMapCheckBox);
            var gridCheckBox = new CheckBox
            {
                Text = "Grid",
                Margin = 5,
                IsChecked = Chart.DisplaySettings.Grid
            };
            gridCheckBox.Click += args => Chart.DisplaySettings.Grid = args.CheckBox.IsChecked.Value;
            stackPanel.AddChild(gridCheckBox);
            var volumeCheckBox = new CheckBox
            {
                Text = "Volume",
                Margin = 5,
                IsChecked = Chart.DisplaySettings.TickVolume
            };
            volumeCheckBox.Click += args => Chart.DisplaySettings.TickVolume = args.CheckBox.IsChecked.Value;
            stackPanel.AddChild(volumeCheckBox);
            Chart.AddControl(stackPanel);
        }
        public override void Calculate(int index)
        {
        }
    }
}
Reference