Skip to content

IndicatorAreaRemovedEventArgs

Summary

Provides data for the indicator area removing event.

Signature

1
public class IndicatorAreaRemovedEventArgs : IndicatorAreaEventArgs

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 using cAlgo.API;
 namespace cAlgo
 {
     // This example shows how to use the IndicatorAreaRemovedEventArgs
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class IndicatorAreaRemovedEventArgsSample : Indicator
     {
         protected override void Initialize()
         {
             ShowIndicatorAreasCount();
             Chart.IndicatorAreaRemoved += Chart_IndicatorAreaRemoved;
         }
         private void Chart_IndicatorAreaRemoved(IndicatorAreaRemovedEventArgs obj)
         {
             Print("An indicator area has been removed");
             ShowIndicatorAreasCount();
         }
         private void ShowIndicatorAreasCount()
         {
             var text = string.Format("Indicator Areas #: {0}", Chart.IndicatorAreas.Count);
             Chart.DrawStaticText("text", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also


Last update: September 26, 2022

Comments