This is my Sample code i have created
#region Using declarations using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Input; using System.Windows.Media; using System.Xml.Serialization; using NinjaTrader.Cbi; using NinjaTrader.Gui; using NinjaTrader.Gui.Chart; using NinjaTrader.Gui.SuperDom; using NinjaTrader.Gui.Tools; using NinjaTrader.Data; using NinjaTrader.NinjaScript; using NinjaTrader.Core.FloatingPoint; using NinjaTrader.NinjaScript.DrawingTools; #endregion //This namespace holds Indicators in this folder and is required. Do not change it. namespace NinjaTrader.NinjaScript.Indicators { public class customroc : Indicator { //ChartBars.Count protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @""; Name = "customroc"; Calculate = Calculate.OnBarClose; IsOverlay = false; DisplayInDataBox = true; DrawOnPricePanel = true; DrawHorizontalGridLines = true; DrawVerticalGridLines = true; PaintPriceMarkers = true; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; //Disable this property if your indicator requires custom values that cumulate with each new market data event. //See Help Guide for additional information. IsSuspendedWhileInactive = true; Period = 14; Smooth = 3; AddPlot(Brushes.Green, "Abovezero"); AddPlot(Brushes.OrangeRed, "Belowzero"); AddLine(Brushes.Cornsilk, 1, "Zeroline"); Plots[0].Min = 0; Plots[1].Max = 0; } else if (State == State.Configure) { } } protected override void OnBarUpdate() { //Add your custom indicator logic here. if (CurrentBar < Period) return; //double Abovezero = CurrentDayOHL().CurrentOpen[0]; // double Belowzero = CurrentDayOHL().CurrentOpen[0]; // Abovezero.Set(ROC(Period)[0]); //Belowzero.Set(ROC(Period)[0]); Abovezero[0] = CurrentDayOHL().CurrentOpen[0]; Belowzero[0] = CurrentDayOHL().CurrentHigh[0]; Abovezero[0] =ROC(Period)[0]; Belowzero[0] = ROC(Period)[0]; } #region Properties [NinjaScriptProperty] [Range(1, int.MaxValue)] [Display(Name="Period", Order=1, GroupName="Parameters")] public int Period { get; set; } [NinjaScriptProperty] [Range(1, int.MaxValue)] [Display(Name="Smooth", Order=2, GroupName="Parameters")] public int Smooth { get; set; } [Browsable(false)] [XmlIgnore] public Series<double> Abovezero { get { return Values[0]; } } [Browsable(false)] [XmlIgnore] public Series<double> Belowzero { get { return Values[1]; } } #endregion } } #region NinjaScript generated code. Neither change nor remove. namespace NinjaTrader.NinjaScript.Indicators { public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase { private customroc[] cachecustomroc; public customroc customroc(int period, int smooth) { return customroc(Input, period, smooth); } public customroc customroc(ISeries<double> input, int period, int smooth) { if (cachecustomroc != null) for (int idx = 0; idx < cachecustomroc.Length; idx++) if (cachecustomroc[idx] != null && cachecustomroc[idx].Period == period && cachecustomroc[idx].Smooth == smooth && cachecustomroc[idx].EqualsInput(input)) return cachecustomroc[idx]; return CacheIndicator<customroc>(new customroc(){ Period = period, Smooth = smooth }, input, ref cachecustomroc); } } } namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns { public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase { public Indicators.customroc customroc(int period, int smooth) { return indicator.customroc(Input, period, smooth); } public Indicators.customroc customroc(ISeries<double> input , int period, int smooth) { return indicator.customroc(input, period, smooth); } } } namespace NinjaTrader.NinjaScript.Strategies { public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase { public Indicators.customroc customroc(int period, int smooth) { return indicator.customroc(Input, period, smooth); } public Indicators.customroc customroc(ISeries<double> input , int period, int smooth) { return indicator.customroc(input, period, smooth); } } } #endregion
I need to expand the pointof indicator and after expanding the box will arrive , Need to chnage that box border color what is the method are code please expaline me.
Comment