Skip to content

UserTimeOffsetChangedEventArgs

Summary

Represents the user time offset change event data.

Signature

1
public class UserTimeOffsetChangedEventArgs

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
 using cAlgo.API;
 namespace cAlgo
 {
     // This example shows how to use the UserTimeOffsetChangedEventArgs
     // Change your cTrader platform time offset/zone to see the print message
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class UserTimeOffsetChangedEventArgsSample : Indicator
     {
         protected override void Initialize()
         {
             Application.UserTimeOffsetChanged += Application_UserTimeOffsetChanged;
         }
         private void Application_UserTimeOffsetChanged(UserTimeOffsetChangedEventArgs obj)
         {
             Print("User time offset changed to: {0}", obj.UserTimeOffset);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also

Properties

UserTimeOffset

Summary

Gets the user time offset.

Signature

1
public TimeSpan UserTimeOffset {get;}

Return Value

TimeSpan