usingcAlgo.API;namespacecAlgo{// This example shows how to use the Chart ChartIconType[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]publicclassChartIconTypeSample:Indicator{[Parameter("Icon Type", DefaultValue = ChartIconType.DownArrow)]publicChartIconTypeIconType{get;set;}protectedoverridevoidInitialize(){Chart.DrawIcon("Icon",IconType,Chart.LastVisibleBarIndex,Chart.Bars.LastBar.Low,Color.Red);}publicoverridevoidCalculate(intindex){}}}
1234567
importclrclr.AddReference("cAlgo.API")fromcAlgo.APIimport*classTest():definitialize(self):# IconType is a parameter of type ChartIconType enum defined in indicator C# fileapi.Chart.DrawIcon("Icon",api.IconType,api.Chart.LastVisibleBarIndex,api.Chart.Bars.LastBar.Low,Color.Red)