Skip to content

Plugin.OnStop

method · Plugin · cAlgo.API

DesktopCLICloud

Called when Plugin is stopped.

Environment behaviour

CLI — not supported. Plugins cannot run in the CLI: ctrader-cli runs cBots only.

Cloud — not supported. Plugins cannot run in the cloud: it runs cBots only.

Definition

protected internal void OnStop()
api.OnStop() -> None

Examples

protected override void OnStop()
{
    // This method is called when the Plugin is stopped
    Print("Plugin stopped at {0}", Server.Time);
}
def on_stop(self):
    # This method is called when the Plugin is stopped
    api.Print(f"Plugin stopped at {api.Server.Time}")