Skip to main content Skip to footer

OnTimer - allows user to do some stuff periodically. To add OnTimer events it needs to use function AddTimer.

protected override void OnStateChanged()
 {
        if (State == ScriptCalculationState.Configured)
        {
            // Write your specific code to prepare any internal variables after the indicator is configured
        }
        else if (State == ScriptCalculationState.DataLoaded)
        {
            // Write your specific code to prepare any internal variables after data for indicator is loaded
            // Timer initialization
            AddTimer(500, OnTimer);
        }
}

private void OnTimer()
{
        // Place your code to handle timer events
}

Cookies Notice

We use cookies to improve your experience, personalize content, and analyze our traffic. By clicking "Accept All Cookies," you agree to the storing of cookies on your device. You can manage your cookie preferences at any time by visiting our Cookie Settings.