Represents the Rectangle chart object. A rectangle of any preferable size and rotation that can be drawn directly in the chart, bound to X-Y axises.
Signature
1
publicabstractinterfaceChartRectangle
Namespace
cAlgo.API
Examples
1 2 3 4 5 6 7 8 910111213141516171819
usingcAlgo.API;namespacecAlgo{// This sample shows how to use Chart.DrawRectangle method to draw a rectangle[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]publicclassChartRectangleSample:Indicator{protectedoverridevoidInitialize(){varperiod=Chart.LastVisibleBarIndex-Chart.FirstVisibleBarIndex;varrectangle=Chart.DrawRectangle("rectangle_sample",Chart.FirstVisibleBarIndex,Bars.LowPrices.Minimum(period),Chart.LastVisibleBarIndex,Bars.HighPrices.Maximum(period),Color.FromArgb(100,Color.Red));rectangle.IsFilled=true;rectangle.IsInteractive=true;}publicoverridevoidCalculate(intindex){}}}