public WaveDisplayUserControl(MainForm parentForm) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); // Ensure the paint methods are called if resized ResizeRedraw = true; // // Constructor code after the InitializeComponent() call. // this.parentForm = parentForm; // initialize the data arrays this.waveData = new float[128]; this.morphedData = new float[128]; // define the drawing properties for the waveform drawingProperties = DrawingProperties.Blue; drawingProperties.Margin = 0; drawingProperties.NumberOfHorizontalLines = 2; drawingProperties.DrawRoundedRectangles = false; drawingProperties.DrawHorizontalTickMarks = false; drawingProperties.DrawVerticalTickMarks = false; drawingProperties.DrawLabels = false; drawingProperties.DisplayTime = false; drawingProperties.TimeLineUnit = TimelineUnit.Samples; }
public static void DrawZigZag(NinjaScriptBase owner, DrawingProperties drawingProperties, Point pointOne, Point pointTwo) { DrawWrapper.DrawLine(owner, drawingProperties, pointTwo.Index, pointTwo.BarIndex, pointTwo.Price, pointOne.BarIndex, pointOne.Price); }
public static void DrawPivot(NinjaScriptBase owner, DrawingProperties drawingProperties, MatrixPoints matrixPoints) { switch (matrixPoints.TrendSideSignal) { case MatrixPoints.WhichTrendSideSignal.Bullish: DrawWrapper.DrawPathLine(owner, drawingProperties, matrixPoints.PointsList[3].Index, matrixPoints.PointsList[3].BarIndex, matrixPoints.PointsList[3].Price, matrixPoints.PointsList[2].BarIndex, matrixPoints.PointsList[2].Price, System.Windows.Media.Brushes.Green); DrawWrapper.DrawPathLine(owner, drawingProperties, matrixPoints.PointsList[2].Index, matrixPoints.PointsList[2].BarIndex, matrixPoints.PointsList[2].Price, matrixPoints.PointsList[1].BarIndex, matrixPoints.PointsList[1].Price, System.Windows.Media.Brushes.Green); DrawWrapper.DrawPathLine(owner, drawingProperties, matrixPoints.PointsList[1].Index, matrixPoints.PointsList[1].BarIndex, matrixPoints.PointsList[1].Price, matrixPoints.PointsList[0].BarIndex, matrixPoints.PointsList[0].Price, System.Windows.Media.Brushes.Green); break; case MatrixPoints.WhichTrendSideSignal.Bearish: DrawWrapper.DrawPathLine(owner, drawingProperties, matrixPoints.PointsList[3].Index, matrixPoints.PointsList[3].BarIndex, matrixPoints.PointsList[3].Price, matrixPoints.PointsList[2].BarIndex, matrixPoints.PointsList[2].Price, System.Windows.Media.Brushes.Red); DrawWrapper.DrawPathLine(owner, drawingProperties, matrixPoints.PointsList[2].Index, matrixPoints.PointsList[2].BarIndex, matrixPoints.PointsList[2].Price, matrixPoints.PointsList[1].BarIndex, matrixPoints.PointsList[1].Price, System.Windows.Media.Brushes.Red); DrawWrapper.DrawPathLine(owner, drawingProperties, matrixPoints.PointsList[1].Index, matrixPoints.PointsList[1].BarIndex, matrixPoints.PointsList[1].Price, matrixPoints.PointsList[0].BarIndex, matrixPoints.PointsList[0].Price, System.Windows.Media.Brushes.Red); break; } }
public tvRevs(ref DrawingProperties prop, ref DrawingRevs dr) { propertySet = prop; cd = prop.CutlistData; revSet = dr; InitializeComponent(); Init(); }
public CutlistHeaderInfo(DrawingProperties dp, string descr, SldWorks swapp) { _swApp = swapp; InitializeComponent(); SetLWHVisibility(Properties.Settings.Default.CHIHideLWH); DrawingPropertySet = dp; CutlistData = dp.CutlistData; Location = Properties.Settings.Default.CutlistHeaderLocation; Size = Properties.Settings.Default.CutlistHeaderSize; description = descr; InitControlsWithDrawing(); }
// Initialization public PriceActionSwingClass(NinjaScriptBase owner, DrawingProperties drawingProperties, CalculationTypeList calculationType, double strength, bool useHighLow, bool showPoints, bool showLines) { this.owner = owner; this.drawingProperties = drawingProperties; tickCalculation = new TickCalculation(owner, this); swingForwardCalculation = new SwingForwardCalculation(owner, this); swingForwardCalculationOld = new SwingForwardCalculationOld(owner, this); CalculationType = calculationType; Strength = strength; UseHighLow = useHighLow; ShowPoints = showPoints; ShowLines = showLines; }
protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "Dow Theory"; Calculate = Calculate.OnEachTick; IsOverlay = true; DisplayInDataBox = true; DrawOnPricePanel = true; DrawHorizontalGridLines = false; DrawVerticalGridLines = false; 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; CalculationTypeDT = CalculationTypeListDowTheory.Pivot; CalculationTypePCW = CalculationTypeList.SwingForward; Strength = 2; UseHighLow = true; ShowPoints = true; ShowLines = true; MaxPercentOfPivotRetraction = 80; MinPercentOfPivotRetraction = 20; AddPlot(Brushes.Transparent, "Long Short Signal"); } else if (State == State.Configure) { } else if (State == State.DataLoaded) { drawingProperties = new DrawingProperties(true, Brushes.Green, Brushes.Red, Brushes.Transparent, Brushes.White, true, 15, Brushes.White, new Gui.Tools.SimpleFont("Arial", 11), TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 100, true, Brushes.White, Gui.DashStyleHelper.Solid, 3); dowTheory = new DowTheoryClass(this, drawingProperties, CalculationTypeDT, CalculationTypePCW, Strength, UseHighLow, ShowPoints, ShowLines, MaxPercentOfPivotRetraction, MinPercentOfPivotRetraction); // Everytime the F5 key is pressed automatically will clear the output window. // LogPrinter.ResetOuputTabs(); } }
protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "Price Action Swing"; Calculate = Calculate.OnEachTick; IsOverlay = true; DisplayInDataBox = true; DrawOnPricePanel = true; DrawHorizontalGridLines = false; DrawVerticalGridLines = false; PaintPriceMarkers = true; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; IsSuspendedWhileInactive = true; CalculationType = CalculationTypeList.SwingForward; Strength = 2; UseHighLow = true; ShowPoints = true; ShowLines = true; DotParameters = new DotExpandableParameters() { IsDotAutoScale = true, UpDotColor = Brushes.Green, DowDotColor = Brushes.Red, UpDotOutlineColor = Brushes.Green, DownDotOutlineColor = Brushes.Red }; } else if (State == State.Configure) { drawingProperties = new DrawingProperties(DotParameters.IsDotAutoScale, DotParameters.UpDotColor, DotParameters.DowDotColor, DotParameters.UpDotOutlineColor, DotParameters.DownDotOutlineColor, true, 15, Brushes.White, new Gui.Tools.SimpleFont("Arial", 11), TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 100, true, Brushes.White, Gui.DashStyleHelper.Solid, 1); priceActionSwing = new PriceActionSwingClass(this, drawingProperties, CalculationType, Strength, UseHighLow, ShowPoints, ShowLines); // Everytime the F5 key is pressed automatically will clear the output window. // LogPrinter.ResetOuputTabs(); } }
// Initialization public DowTheoryClass(NinjaScriptBase owner, DrawingProperties drawingProperties, CalculationTypeListDowTheory calculationTypeListDT, CalculationTypeList calculationTypeListPCW, double strength, bool useHighLow, bool showPoints, bool showLines, double maxPercentOfPivotRetraction, double minPercentOfPivotRetraction) { this.owner = owner; this.drawingProperties = drawingProperties; CalculationType = calculationTypeListDT; priceActionSwingClass = new PriceActionSwingClass(owner, drawingProperties, calculationTypeListPCW, strength, useHighLow, showPoints, showLines); trendCalculation = new TrendCalculation(owner); pivotCalculation = new PivotCalculation(owner, maxPercentOfPivotRetraction, minPercentOfPivotRetraction); /* * if (!ShowLog) * { * logPrinter.SetIndicatorAsInvisible(owner); * } */ }
public WaveFormView(float[] waveData) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); // Ensure the paint methods are called if resized ResizeRedraw = true; this.waveData = waveData; // define the drawing properties for the waveform drawingProperties = DrawingProperties.Blue; drawingProperties.Margin = 15; drawingProperties.NumberOfHorizontalLines = 4; drawingProperties.DrawRoundedRectangles = false; drawingProperties.DrawHorizontalTickMarks = false; drawingProperties.DrawVerticalTickMarks = true; drawingProperties.DrawLabels = false; drawingProperties.DisplayTime = true; drawingProperties.TimeLineUnit = TimelineUnit.Samples; }
public static void DrawPoint(NinjaScriptBase owner, Point point, DrawingProperties drawingProperties) { switch (point.CurrentSideSwing) { case Point.SidePoint.High: DrawWrapper.DrawDot(owner, drawingProperties, point.Index, point.BarIndex, point.Price, drawingProperties.UpDotColor); DrawWrapper.DrawText(owner, drawingProperties, point.Index, point.BarIndex, point.Price, drawingProperties.TextYPixelOffSet); break; case Point.SidePoint.Low: DrawWrapper.DrawDot(owner, drawingProperties, point.Index, point.BarIndex, point.Price, drawingProperties.DownDotColor); DrawWrapper.DrawText(owner, drawingProperties, point.Index, point.BarIndex, point.Price, drawingProperties.TextYPixelOffSet * -1); break; case Point.SidePoint.Unknow: DrawWrapper.DrawDot(owner, drawingProperties, point.Index, point.BarIndex, point.Price, Brushes.Gray); break; } }