Invalid token 'namespace' in class, struct, or interface member declaration
Invalid token '{' in class,struct, or interface declaration
} expected
Class member declaration expected.
Here is my indicator. Any other suggestions you see in the code would be helpful. Specifically drawing the indicators in the panel.
[
public class MyCustomIndicator : Indicator { protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "MyCustomIndicator"; IsOverlay = false; DisplayInDataBox = true; DrawOnPricePanel = true; DrawHorizontalGridLines = true; DrawVerticalGridLines = true; PaintPriceMarkers = true; IsSuspendedWhileInactive = true; } else if (State == State.Configure) { AddDataSeries(Data.BarsPeriodType.Minute, 3); } else if (State == State.DataLoaded) { primaryseriesd = new Series<double>(Stochastic(BarsArray[0],3,5,3).D); primaryseriesd = new Series<double>(Stochastic(BarsArray[0],3,5,3)).D; secondaryseriesk = new Series<double>(Stochastic(BarsArray[1],3.5,3).K); secondaryseriesk = new Series<double>(Stochastic(BarsArray[1],3.5,3).K); } } protected override void OnBarUpdate() { } protected override void OnRender(ChartControl chartControl, ChartScale chartscale) { // 1 - SetUp Your Resource SharpDX.Direct2D1.SolidColorBrush customDXBrush = new SharpDX.Direct2D1.SolidColorBrush(RenderTarget, SharpDX.Color.DodgerBlue); // 2 - Use your resource RenderTarget.DrawLine(startPoint, endPoint, customDXBrush); // 3 - dispose of your resource customDXBrush.Dispose();
Comment