Skip to content

UserTimeOffsetChangedEventArgs

class cAlgo.API

DesktopCLICloud

Represents the user time offset change event data.

Definition

public class UserTimeOffsetChangedEventArgs

Namespace: cAlgo.API · Group: Application

Examples

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
    public partial class UserTimeOffsetChangedEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Application.UserTimeOffsetChanged += OnApplicationUserTimeOffsetChanged;
        }

        private void OnApplicationUserTimeOffsetChanged(UserTimeOffsetChangedEventArgs obj)
        {
            Print("User time offset changed to: {0}", obj.UserTimeOffset);
        }

        public override void Calculate(int index)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Application.UserTimeOffsetChanged += self.on_application_user_time_offset_changed

    def on_application_user_time_offset_changed(self, args):
        print(f"User time offset changed to: {args.UserTimeOffset}")
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Properties

Name Description
UserTimeOffsetDesktopCLICloudTimeSpan Gets the user time offset.

See also