DefaultChartStyle

View as Markdown

Definition

Allows to set a default ChartStyle for usage with a NinjaTrader bars type

Property Value

A ChartStyleType enum value representing the ChartStyle to be set as default. System defaults include:

  • ChartStyleType.Box
  • ChartStyleType.CandleStick
  • ChartStyleType.LineOnClose
  • ChartStyleType.OHLC
  • ChartStyleType.PointAndFigure
  • ChartStyleType.KagiLine
  • ChartStyleType.OpenClose
  • ChartStyleType.Mountain

Syntax

DefaultChartStyle

Examples

1protected override void OnStateChange()
2{
3 if (State == State.SetDefaults)
4 {
5 Name = "SampleBarsType";
6 BarsPeriod = new BarsPeriod { BarsPeriodType = (BarsPeriodType) 15, BarsPeriodTypeName = "SampleBarsType(15)", Value = 1 };
7 BuiltFrom = BarsPeriodType.Minute;
8 DaysToLoad = 5;
9 DefaultChartStyle = Gui.Chart.ChartStyleType.CandleStick;
10 IsIntraday = true;
11 }
12}