usingcAlgo.API;namespacecAlgo{// This sample shows how to use a shape Stroke Line Join[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]publicclassPenLineJoinSample:Indicator{[Parameter("Stroke Line Join", DefaultValue = PenLineJoin.Miter)]publicPenLineJoinStrokeLineJoin{get;set;}protectedoverridevoidInitialize(){varrectangle=newRectangle{HorizontalAlignment=HorizontalAlignment.Center,VerticalAlignment=VerticalAlignment.Center,StrokeLineJoin=StrokeLineJoin,StrokeColor=Color.Red,StrokeThickness=4,Width=200,Height=100,};Chart.AddControl(rectangle);}publicoverridevoidCalculate(intindex){}}}
1 2 3 4 5 6 7 8 910111213141516
importclrclr.AddReference("cAlgo.API")fromcAlgo.APIimport*classTest():definitialize(self):rectangle=Rectangle()rectangle.HorizontalAlignment=HorizontalAlignment.Centerrectangle.VerticalAlignment=VerticalAlignment.Center# StrokeLineJoin is a parameter of type StrokeLineJoin defined# in indicator C# filerectangle.StrokeLineJoin=api.StrokeLineJoinrectangle.StrokeColor=Color.Redrectangle.StrokeThickness=4rectangle.Width=200rectangle.Height=100api.Chart.AddControl(rectangle)