Skip to content

Configuration

Ahmad Noman Musleh edited this page May 31, 2020 · 4 revisions

The Alert pop-up has a configuration class that allows for changes to some basic features like alerts and settings file paths, the window title, and logging method.

Use your indicator "Initialize" or the cBot "OnStart" method to change the configuration:

        protected override void Initialize()
        {
            // Using API default Print method for logging
            cAlgo.API.Alert.Utility.Logger.Tracer = Print;
            // Changing the alert window title
            cAlgo.API.Alert.Models.Configuration.Title = "My Alerts"
            // Changing file paths
            cAlgo.API.Alert.Models.Configuration.AlertFilePath = "C:\\Users\\my_system\\Documents\\cAlgo\\alerts.csv";
            cAlgo.API.Alert.Models.Configuration.OptionsFilePath = "C:\\Users\\my_system\\Documents\\cAlgo\\PopupOptions.xml";
        }
Clone this wiki locally