.Net 4.0 vs .Net 6.0

Created at 16 Aug 2022, 09:08
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
JM

jmmslagter

Joined 17.11.2021

.Net 4.0 vs .Net 6.0
16 Aug 2022, 09:08


I use the "Grid" function in my Bots. in the .Net 4.x this worked fine. When I choose .Net 6 and recompile the Bot, the Bot stops saying "CBot instance [(name of the bot), (Valutapair), h6] process was unexpectedly terminated.". This happens by several brokers.

 

@jmmslagter
Replies

deolaolalere
16 Aug 2022, 22:35

I am having same issue


@deolaolalere

PanagiotisCharalampous
17 Aug 2022, 08:06

Hi jmmslagter,

What is the "Grid" function?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

jmmslagter
17 Aug 2022, 14:45

RE:

PanagiotisCharalampous said:

Hi jmmslagter,

What is the "Grid" function?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

 Hello, Maybe I wasn't clear enough, sorry. Here is part of the code.

            var grid = new Grid(25, 7)
            {
                BackgroundColor = Color.DarkGreen,
                Opacity = 0.9,
                HorizontalAlignment = HorizontalAlignment.Left,
                VerticalAlignment = VerticalAlignment.Top
                
            };


            var style = new Style();
            style.Set(ControlProperty.Padding, 1);
            style.Set(ControlProperty.Margin, 0.1);
            style.Set(ControlProperty.BackgroundColor, Color.LightGreen);
            style.Set(ControlProperty.ForegroundColor, Color.Black);
            
            style.Set(ControlProperty.FontSize, 10);
            style.Set(ControlProperty.Width,70);
            style.Set(ControlProperty.MinHeight,60);
//***************************************************
            
            grid.AddChild(new TextBlock
            {
                BackgroundColor = Color.Black,
                Text = "Timeframes",
                Style = style
            }, 0, 0);

-

-

-

-

 

Chart.AddControl(grid);
            

 


@jmmslagter

PanagiotisCharalampous
17 Aug 2022, 15:20

Hi jmmslagter,

I tried this and had no problem. Can you share the complete cBot code that creates the problem to you?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

jmmslagter
17 Aug 2022, 21:41

RE:

PanagiotisCharalampous said:

Hi jmmslagter,

I tried this and had no problem. Can you share the complete cBot code that creates the problem to you?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Yes, I can. It's over 800 lines. Maybe I can send this in a file to a (mail) address?

Kind regards,

Hans


@jmmslagter

jmmslagter
17 Aug 2022, 21:51

RE:

PanagiotisCharalampous said:

Hi jmmslagter,

I tried this and had no problem. Can you share the complete cBot code that creates the problem to you?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Hi, I send it in a DM on Telegram.


@jmmslagter

jmmslagter
18 Aug 2022, 08:42

RE: Hi, if I get a solution, I will let you know.

deolaolalere said:

I am having same issue

 


@jmmslagter

jmmslagter
28 Aug 2022, 13:32

RE:

PanagiotisCharalampous said:

Hi jmmslagter,

I tried this and had no problem. Can you share the complete cBot code that creates the problem to you?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

I have written a Bot, which trades with 3 pairs (hedge). There is no 'grid' in it, but it also does not work under .Net6. It seems to me to be deeper and it makes little sense to focus on individual cBots.


@jmmslagter