Topics

Forum Topics not found

Replies

don.schriefer
06 Jul 2024, 21:43

RE: RE: Bots not working on .NET 6

ctid1779370 said: 

Did you solve this? It's the exact problem i am having.

 

 

Try giving the bot [Robot(AccessRights = AccessRights.FullAccess)]


@don.schriefer

don.schriefer
03 Apr 2023, 19:46

RE: RE:

kerming said:

PanagiotisChar said:

Hi,

Try 4.6.5. They have fixed a lot of issues since then.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

Alright.  will try it out on 4.6.5  thanks

Hi Kerming,

try setting the AccessRights to Full in your cBot and see if that works. I had the same issue.

Don


@don.schriefer

don.schriefer
03 Apr 2023, 19:44

RE: Found a Solution [Workaround]

PanagiotisChar said:

Hi Don,

Which cTrader version do you use? Did you try using the latest one (4.6.4)?

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

Hi there Panagiotis,

since there hasn't been much activity on this thread, I just wanted to post a workaround that I discovered whilst searching the forums.

If I set the AccessRights to Full in the cBot, the error is gone and I can compile and run bots using Automate. Hope it helps anyone else that is struggling with this issue.

Cheers,

Don


@don.schriefer

don.schriefer
08 Mar 2023, 09:42 ( Updated at: 21 Dec 2023, 09:23 )

RE:

PanagiotisChar said:

Hi Don,

Which cTrader version do you use? Did you try using the latest one (4.6.4)?

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

Hi Panagiotis,

I am using cTrader version 4.6.4.13909 and I have installed the .NET SDK and set to use it in cTrader's settings.



The following code produces the "process terminated unexpectedly" error:


Thanks for the reply, hope that we can find a solution for this.


@don.schriefer

don.schriefer
07 Mar 2023, 16:51

RE:

PanagiotisChar said:

Hi Don,

Does your cBot reference any indicators?

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

 

Hi Panagiotis,

thanks for the reply. No, in an attempt to have a simple "Hello World" program, there are no custom indicators.

The indicator instances in the log are because I had them open on the backtesting chart. Even if I have a clean chart without any indicators on, the cBot process terminates unexpectedly on runtime. Is there a way to provide a detailed log output of what is happening in the background to debug?


@don.schriefer

don.schriefer
06 Mar 2023, 17:17

RE: Same Issue

Hi there,

ever since I installed Windows 11 this has been happening to me. I've had to use .NET 4 for backtesting.

OS: Windows 11 Pro 22H2 (Build: 22621.1265)
cTrader Version: 4.5.9.13513 (ICMarkets)

Using the following code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class SimpleTrader : Robot
    {
        [Parameter(DefaultValue = "Hello world!")]
        public string Message { get; set; }

        protected override void OnStart()
        {
            Print("Hello world");
        }

        protected override void OnTick()
        {
            
        }

        protected override void OnStop()
        {
            
        }
    }
}

My output in the console is:

05/02/2023 01:00:00.000 | Indicator instance [Bollinger Bands, EURUSD, Hh4] unloaded.
05/02/2023 01:00:00.000 | Indicator instance [Aroon, EURUSD, Hh4] unloaded.
05/02/2023 01:00:00.000 | Indicator instance [MACD Crossover, EURUSD, Hh4] unloaded.
05/02/2023 01:00:00.000 | Indicator instance [Chaikin Money Flow, EURUSD, Hh4] unloaded.
05/02/2023 01:00:00.000 | CBot instance [SimpleTrader, EURUSD, Hh4] started.
05/02/2023 01:00:00.000 | Indicator instance [Chaikin Money Flow, EURUSD, Hh4] loaded.
05/02/2023 01:00:00.000 | Indicator instance [MACD Crossover, EURUSD, Hh4] loaded.
05/02/2023 01:00:00.000 | Indicator instance [Aroon, EURUSD, Hh4] loaded.
05/02/2023 01:00:00.000 | Indicator instance [Bollinger Bands, EURUSD, Hh4] loaded.
05/02/2023 01:00:00.000 | CBot instance [SimpleTrader, EURUSD, Hh4] process was unexpectedly terminated.

I have tried everything, but could not get it to work on Windows 11. I have just resorted to compiling in .NET 4, and that still works.

Hoping this issue gets some more attention, glad to see I'm not the only one struggling with this.

Cheers


@don.schriefer