amml's avatar


Member since: 27 Apr 2021





Last Forum Posts

@cTrader Desktop 4.2 Has Been Released!:  17 Apr 2022, 19:54

That's great news. Looking forward to testing v4.2 in the coming days.

Thanks a lot for the nice tech you guys are developing.

@Restrictions on Parameter's attributes MinValue, MaxValue based on other Parameter values:  23 Nov 2021, 14:19

Thanks, amusleh. Yes, I'm using OnStart to verify validity. I like your suggestion of implementing my own UI using Windows form and resolving this limitation from there. Many thanks.

@Restrictions on Parameter's attributes MinValue, MaxValue based on other Parameter values:  23 Nov 2021, 12:16

Dear cTrader,

I would like to constrain some bot parameters based on values passed to other parameter. For example, something like this:

namespace cAlgo.Robots
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class SomeBot : Robot
        [Parameter("Param1", Group = "General", DefaultValue = 0.0)]
        public double Param1 { get; set; }

        [Parameter("Param2", Group = "General", DefaultValue = 1.0, MinValue = Param1)]
        public double Param2 { get; set; }

Note above that `Param2` must have a value greater of equal to `Param1` because of `MinValue = Param1`.

What I do at the moment is to check validity in the `OnStart` method, and call `Stop()` if parameters do not have valid values.

Is there a better approach for this? I would like to avoid many invalid bot instantiations during optimization. 

@Build from terminal/command line:  11 Nov 2021, 13:31

These are actually very good news. Many thanks for your support, Panagiotis.

Best wishes,

@Build from terminal/command line:  11 Nov 2021, 11:51

Hi Panagiotis,

I would appreciate to know if there are more command-line options to cTrader.exe besides /compile. Maybe there is an option for verbose output (to detect if there were errors).

Many thanks and best regards,

@Build from terminal/command line:  11 Nov 2021, 10:43

For whoever that wants to use Visual Studio Code and build from there, create a task.json file under the .vscode folder and add the following:

    // See
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
            "label": "Build",
            "type": "shell",
            "command": "C:\\Users\\USERNAME\\AppData\\Local\\Apps\\FIND\\YOURSELF\\YOUR\\PATH\\TO\\cTrader.exe",
            "args": [
            "problemMatcher": [],
            "group": {
                "kind": "build",
                "isDefault": true

You can now press Ctrl+Shift+B and build your .algo file.

@Build from terminal/command line:  11 Nov 2021, 10:25

Hi Panagiotis,

I got it working now - many thanks. The output is a MyFirstRobot.algo file under 


Could you please tell me other command line options besides /compile? I'm particularly interested in a more verbose output (currently, I see no output, so not sure if there are errors).

Best regards,

@Build from terminal/command line:  11 Nov 2021, 10:06

Hi Panagiotis,

Many thanks for this. It's been a while since you replied and only now I could come back to my algo trading experiments using ctrader. I'm still (apparently) not able to get this right.

I managed to find the path to cTrader.exe via Visual Studio (not sure why, but this was a non-trivial finding, as things in AppData are hidden away from users -- I'm new to Windows):


Let's say the path to MyFirstRobot.csproj is 


In the command prompt, if I execute this:

C:\Users\amml\AppData\Local\Apps\2.0\RW0TM076.FG6\4SEMHSJE.LY5\xtrader_9ah856fd4bdxd746_0002.0002_270472ff031s70h9\cTrader.exe /compile=C:\Users\amml\Documents\cAlgo\Sources\Robots\MyFirstRobot\MyFirstRobot

nothing seems to happen (no algo file built, no output whatsoever). I've also tried adding MyFirstRobot.csproj to the end of the path above, and nothing seems to happen.

Could you please point me to the documentation of this (I could not find docs for cTrader.exe) or tell me what I'm doing wrong? 

Best regards,

@Robot Inheritance Problem:  06 Oct 2021, 15:40

Any revision of plans now, in 2021, to allow properties from a base class to show up in the cAlgo robot GUI (under Parameters)? The above solution makes sense only when there are a few parameters. In case there are many/several, and they become common among many robots, a lot of duplicate code is needed.


Just found out here, cTDN Forum - Inherited Parameter Attributes (, that this is planned to be released in cTrader Desktop v4.2 - great!

@Build from terminal/command line:  20 May 2021, 12:48

Dear Community,

I've been successfully using Visual Studio Code to develop bots and indicators for cTrader. 

However, the building process is at this point non-optimal. I need to switch to cTrader or Visual Studio to compile the project.

What I need is the compilation command so that I can build the MSVC project from the terminal in Visual Studio Code.

I've tried the command dotnet build and some variations of msbuild without success. Sorry, I'm a long-time Linux user and C++ programmer new to .NET projects. 

Best regards,

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.

No uploaded.

Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.

No uploaded.