Skip to content

ChartScrollEventArgs

Summary

Provides data for the chart scrolling event.

Signature

1
public class ChartScrollEventArgs

Namespace

cAlgo.API

Properties

Name Description
Chart { get; } Gets the chart.
ChartArea { get; } Gets the chart area.
BarsDelta { get; } Gets a value that indicates the amount of bars that the chart was scrolled for
BottomYDelta { get; } Gets the lowest value of the bars delta.
TopYDelta { get; } Gets the highest value of the bars delta.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 using cAlgo.API;
 namespace cAlgo
 {
     // This example shows how to use the Chart ChartScrollEventArgs
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ChartScrollEventArgsSample : Indicator
     {
         protected override void Initialize()
         {
             Chart.ScrollChanged += Chart_ScrollChanged;
         }
         private void Chart_ScrollChanged(ChartScrollEventArgs obj)
         {
             Print("Scrolled, Bars Delta : {0} | Top Y Delta: {1} | Bottom Y Delta: {2}", obj.BarsDelta, obj.TopYDelta, obj.BottomYDelta);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also


Last update: July 1, 2022

Comments